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 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 isBoolean(String type)
           
static boolean isBoxed(String type)
           
static boolean isPrimitive(String type)
          Returns true if the provided type is a primitive type
static int returnType(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:

isPrimitive

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

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)


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