Package spoon.reflect.factory
Class EnumFactory
java.lang.Object
spoon.reflect.factory.SubFactory
spoon.reflect.factory.TypeFactory
spoon.reflect.factory.EnumFactory
The
CtEnum
sub-factory.-
Field Summary
Fields inherited from class spoon.reflect.factory.TypeFactory
BOOLEAN, BOOLEAN_PRIMITIVE, BYTE, BYTE_PRIMITIVE, CHARACTER, CHARACTER_PRIMITIVE, COLLECTION, DATE, DOUBLE, DOUBLE_PRIMITIVE, ENUM, FLOAT, FLOAT_PRIMITIVE, INTEGER, INTEGER_PRIMITIVE, ITERABLE, LIST, LONG, LONG_PRIMITIVE, MAP, NULL_TYPE, OBJECT, OMITTED_TYPE_ARG_TYPE, SET, SHORT, SHORT_PRIMITIVE, STRING, VOID, VOID_PRIMITIVE
Fields inherited from class spoon.reflect.factory.SubFactory
factory
-
Constructor Summary
-
Method Summary
Methods inherited from class spoon.reflect.factory.TypeFactory
booleanPrimitiveType, booleanType, bytePrimitiveType, byteType, characterPrimitiveType, characterType, createArrayReference, createArrayReference, createArrayReference, createArrayReference, createImport, createIntersectionTypeReferenceWithBounds, createReference, createReference, createReference, createReference, createReference, createReference, createReferences, createSimplyQualifiedReference, createTypeAdapter, createTypeMemberWildcardImportReference, createTypeParameterReference, createUnresolvedImport, dateType, doublePrimitiveType, doubleType, floatPrimitiveType, floatType, get, getAll, getAll, getDeclaringTypeName, getDefaultBoundingType, getPackageName, getSimpleName, hasInnerType, hasPackage, integerPrimitiveType, integerType, longPrimitiveType, longType, nullType, objectType, shortPrimitiveType, shortType, stringType, voidPrimitiveType, voidType
-
Constructor Details
-
EnumFactory
Creates a new enum sub-factory.- Parameters:
factory
- the parent factory
-
-
Method Details
-
create
Creates a new enumeration type- Parameters:
owner
- packagesimpleName
- the simple name
-
create
Creates an enum from its qualified name. -
get
Gets an already created enumeration from its qualified name.- Overrides:
get
in classTypeFactory
- Returns:
- the enumeration or null if does not exist
-
getEnum
Gets a class from its runtime Java class.- Type Parameters:
T
- type of created class- Parameters:
cl
- the java class: note that this class should be Class<T> but it then poses problem when T is a generic type itself
-