Package spoon.reflect.factory
Class InterfaceFactory
java.lang.Object
spoon.reflect.factory.SubFactory
spoon.reflect.factory.TypeFactory
spoon.reflect.factory.InterfaceFactory
The
CtInterface
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
Modifier and TypeMethodDescription<T> CtInterface<T>
Creates an interface from its qualified name.<T> CtInterface<T>
Creates an interface.<T> CtInterface<T>
Creates an inner interface<T> CtInterface<T>
Gets a interface from its runtime Java class.<T> CtInterface<T>
Gets a created interfaceMethods 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, getAll, getAll, getDeclaringTypeName, getDefaultBoundingType, getPackageName, getSimpleName, hasInnerType, hasPackage, integerPrimitiveType, integerType, longPrimitiveType, longType, nullType, objectType, shortPrimitiveType, shortType, stringType, voidPrimitiveType, voidType
-
Constructor Details
-
InterfaceFactory
Creates a new interface sub-factory.- Parameters:
factory
- the parent factory
-
-
Method Details
-
create
Creates an interface. -
create
Creates an inner interface -
create
Creates an interface from its qualified name.- Type Parameters:
T
- type of created interface- Parameters:
qualifiedName
- full name of interface to create. Name can contain $ for inner types
-
get
Gets a created interface- Overrides:
get
in classTypeFactory
- Returns:
- the interface or null if does not exist
-
get
Gets a interface from its runtime Java class.- Overrides:
get
in classTypeFactory
- 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
-