org.drools.factmodel
Class BuildUtils

java.lang.Object
  extended by org.drools.factmodel.BuildUtils

public class BuildUtils
extends Object


Constructor Summary
BuildUtils()
           
 
Method Summary
static int arrayDimSize(String type)
           
static String arrayType(String type)
           
static String box(String type)
           
static String extractor(String type)
           
static Object getDefaultValue(FieldDefinition fld)
           
static String getGenericTypes(String[] interfaces)
           
static String getInternalType(String type)
          Returns the corresponding internal type representation for the given type.
static String[] getInternalTypes(String[] superClasses)
           
static String getterName(String fieldName, String type)
           
static String getTypeDescriptor(String type)
          Returns the corresponding type descriptor for the given type.
static String injector(String type)
           
static boolean isArray(String type)
          Returns true if the provided type is an arrayType
static boolean isBoolean(String type)
           
static boolean isBoxed(String type)
           
static boolean isPrimitive(String type)
          Returns true if the provided type is a primitive type
static String numericMorph(String type)
           
static void pushInt(org.mvel2.asm.MethodVisitor mv, int j)
           
static int returnType(String type)
           
static String serializationReaderName(String type)
           
static String serializationWriterName(String type)
           
static String setterName(String fieldName, String type)
           
static int sizeOf(String type)
           
static int storeType(String type)
           
static String unBox(String type)
           
static int varType(String type)
           
static int zero(String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildUtils

public BuildUtils()
Method Detail

getInternalTypes

public static String[] getInternalTypes(String[] superClasses)

getGenericTypes

public static String getGenericTypes(String[] interfaces)

getInternalType

public static String getInternalType(String type)
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

public static String getTypeDescriptor(String type)
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

public static String arrayType(String type)

arrayDimSize

public static int arrayDimSize(String type)

isPrimitive

public static boolean isPrimitive(String type)
Returns true if the provided type is a primitive type

Parameters:
type -
Returns:

isArray

public static boolean isArray(String type)
Returns true if the provided type is an arrayType

Parameters:
type -
Returns:

getDefaultValue

public static Object getDefaultValue(FieldDefinition fld)

isBoxed

public static boolean isBoxed(String type)

unBox

public static String unBox(String type)

box

public static String box(String type)

sizeOf

public static int sizeOf(String type)

returnType

public static int returnType(String type)

varType

public static int varType(String type)

storeType

public static int storeType(String type)

isBoolean

public static boolean isBoolean(String type)

zero

public static int zero(String type)

getterName

public static String getterName(String fieldName,
                                String type)

setterName

public static String setterName(String fieldName,
                                String type)

extractor

public static String extractor(String type)

injector

public static String injector(String type)

numericMorph

public static String numericMorph(String type)

pushInt

public static void pushInt(org.mvel2.asm.MethodVisitor mv,
                           int j)

serializationWriterName

public static String serializationWriterName(String type)

serializationReaderName

public static String serializationReaderName(String type)


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.