|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.ast.ClassHelper
public class ClassHelper extends java.lang.Object
This class is a Helper for ClassNode and classes handling ClassNodes. It does contain a set of predefined ClassNodes for the most used types and some code for cached ClassNode creation and basic ClassNode handling
Method Summary | |
---|---|
static ClassNode
|
getUnwrapper(ClassNode cn)
|
static ClassNode
|
getWrapper(ClassNode cn)
Creates a ClassNode containing the wrapper of a ClassNode of primitive type. |
static boolean
|
isCachedType(ClassNode type)
|
static boolean
|
isNumberType(ClassNode cn)
|
static boolean
|
isPrimitiveType(ClassNode cn)
Test to determine if a ClassNode is a primitive type. |
static boolean
|
isStaticConstantInitializerType(ClassNode cn)
Test to determine if a ClassNode is a type belongs to the list of types which are allowed to initialize constants directly in bytecode instead of using <cinit> |
static ClassNode[]
|
make(java.lang.Class[] classes)
Creates an array of ClassNodes using an array of classes. |
static ClassNode
|
make(java.lang.Class c)
Creates a ClassNode using a given class. |
static ClassNode
|
make(java.lang.Class c, boolean includeGenerics)
|
static ClassNode
|
make(java.lang.String name)
Creates a ClassNode using a given class. |
static ClassNode
|
makeCached(java.lang.Class c)
|
static ClassNode
|
makeReference()
|
static ClassNode
|
makeWithoutCaching(java.lang.Class c)
|
static ClassNode
|
makeWithoutCaching(java.lang.Class c, boolean includeGenerics)
|
static ClassNode
|
makeWithoutCaching(java.lang.String name)
Creates a ClassNode using a given class. |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
public static final ClassNode Annotation_TYPE
public static final ClassNode BigDecimal_TYPE
public static final ClassNode BigInteger_TYPE
public static final ClassNode Boolean_TYPE
public static final ClassNode Byte_TYPE
public static final ClassNode CLASS_Type
public static final ClassNode CLOSURE_TYPE
public static final ClassNode COMPARABLE_TYPE
public static final ClassNode Character_TYPE
public static final ClassNode DYNAMIC_TYPE
public static final ClassNode Double_TYPE
public static final ClassNode ELEMENT_TYPE_TYPE
protected static final ClassNode[] EMPTY_TYPE_ARRAY
public static final ClassNode Enum_Type
public static final ClassNode Float_TYPE
public static final ClassNode GENERATED_CLOSURE_Type
public static final ClassNode GROOVY_INTERCEPTABLE_TYPE
public static final ClassNode GROOVY_OBJECT_SUPPORT_TYPE
public static final ClassNode GROOVY_OBJECT_TYPE
public static final ClassNode GSTRING_TYPE
public static final ClassNode Integer_TYPE
public static final ClassNode Iterator_TYPE
public static final ClassNode LIST_TYPE
public static final ClassNode Long_TYPE
public static final ClassNode MAP_TYPE
public static final ClassNode METACLASS_TYPE
public static final ClassNode Number_TYPE
public static final java.lang.String OBJECT
public static final ClassNode OBJECT_TYPE
public static final ClassNode PATTERN_TYPE
public static final ClassNode RANGE_TYPE
public static final ClassNode REFERENCE_TYPE
public static final ClassNode SCRIPT_TYPE
public static final ClassNode STRING_TYPE
public static final ClassNode Short_TYPE
public static final ClassNode VOID_TYPE
public static final ClassNode boolean_TYPE
public static final ClassNode byte_TYPE
public static final ClassNode char_TYPE
public static final ClassNode double_TYPE
public static final ClassNode float_TYPE
public static final ClassNode int_TYPE
public static final ClassNode long_TYPE
public static final ClassNode short_TYPE
public static final ClassNode void_WRAPPER_TYPE
Method Detail |
---|
public static ClassNode getUnwrapper(ClassNode cn)
public static ClassNode getWrapper(ClassNode cn)
cn
- the ClassNode containing a possible primitive type
public static boolean isCachedType(ClassNode type)
public static boolean isNumberType(ClassNode cn)
public static boolean isPrimitiveType(ClassNode cn)
cn
- the ClassNode containing a possible primitive type
public static boolean isStaticConstantInitializerType(ClassNode cn)
cn
- the ClassNode to be tested
public static ClassNode[] make(java.lang.Class[] classes)
classes
- an array of classes used to create the ClassNodes
public static ClassNode make(java.lang.Class c)
c
- class used to created the ClassNode
public static ClassNode make(java.lang.Class c, boolean includeGenerics)
public static ClassNode make(java.lang.String name)
name
- of the class the ClassNode is representing
public static ClassNode makeCached(java.lang.Class c)
public static ClassNode makeReference()
public static ClassNode makeWithoutCaching(java.lang.Class c)
public static ClassNode makeWithoutCaching(java.lang.Class c, boolean includeGenerics)
public static ClassNode makeWithoutCaching(java.lang.String name)
name
- of the class the ClassNode is representing
Groovy Documentation