Fix error: class not found jdt.core.dom.PrimitiveType 
by replacing direct call with runtime function