Class BuildUtils
java.lang.Object
org.drools.compiler.builder.impl.classbuilder.BuildUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic intarrayDimSize(String type) static Stringstatic Stringstatic intexternalArrayDimSize(String className) static Stringstatic Objectstatic StringgetDescriptor(GenericTypeDefinition typeDef) static StringgetGenericTypes(String[] interfaces) static StringgetInternalType(String type) Returns the corresponding internal type representation for the given type.static String[]getInternalTypes(String[] superClasses) static StringgetSignature(GenericTypeDefinition typeDef) static StringgetterName(String fieldName, String type) static StringgetTypeDescriptor(String type) Returns the corresponding type descriptor for the given type.static Stringstatic booleanReturns true if the provided type is an arrayType Can only be used with internal names, i.e.static booleanstatic booleanstatic booleanisPrimitive(String type) Returns true if the provided type is a primitive typestatic StringnumericMorph(String type) static Stringstatic StringserializationType(String type) static Stringstatic StringsetterName(String fieldName) static intstatic String
-
Method Details
-
getInternalTypes
-
getGenericTypes
-
getInternalType
Returns the corresponding internal type representation for the given type. I decided to not use the ASM Type class methods because they require resolving the actual type into a Class instance and at this point, I think it is best to delay type resolution until it is really needed.- Parameters:
type-- Returns:
-
getTypeDescriptor
Returns the corresponding type descriptor for the given type. I decided to not use the ASM Type class methods because they require resolving the actual type into a Class instance and at this point, I think it is best to delay type resolution until it is really needed.- Parameters:
type-- Returns:
-
arrayType
-
externalArrayDimSize
-
arrayDimSize
-
isPrimitive
Returns true if the provided type is a primitive type- Parameters:
type-- Returns:
-
isArray
Returns true if the provided type is an arrayType Can only be used with internal names, i.e. after [ has been prefix- Parameters:
type-- Returns:
-
getDefaultValue
-
isBoxed
-
unBox
-
box
-
sizeOf
-
isBoolean
-
getterName
-
setterName
-
extractor
-
injector
-
numericMorph
-
serializationWriterName
-
serializationReaderName
-
serializationType
-
getDescriptor
-
getSignature
-