Module org.glassfish.hk2.classmodel
Interface ExtensibleType<T extends ExtensibleType>
- Type Parameters:
T- parent type which is always the same as the child type (classes extends classes, interfaces extends interfaces...)
- All Superinterfaces:
AnnotatedElement,Type
- All Known Subinterfaces:
AnnotationType,ClassModel,EnumType,InterfaceModel
- All Known Implementing Classes:
AnnotationTypeImpl,ClassModelImpl,EnumTypeImpl,ExtensibleTypeImpl,InterfaceModelImpl
An extensible type is a type that can be subclassed like an interface
or a class.
- Author:
- Jerome Dochez
-
Method Summary
Modifier and TypeMethodDescriptionReturns all the children subtypes (including grand children) of this type.Represents the raw generic type and bounded parameterized type.Returns an unmodifiable list of interfaces implemented or extended by this type.Return the parent type instance.Returns the unqualified name of the underlying type.Returns an unmodifiable list of static fields defined by this typebooleanisInstanceOf(String className) Whether the type is an instance of the specified parent type or not.subTypes()Returns the child subtypes of this type.Methods inherited from interface org.glassfish.hk2.classmodel.reflect.AnnotatedElement
getAnnotation, getAnnotations, getName, shortDescMethods inherited from interface org.glassfish.hk2.classmodel.reflect.Type
getDefiningURIs, getMethods, getReferences, wasDefinedIn
-
Method Details
-
getParent
T getParent()Return the parent type instance. If there are more than one parent with the same FQCN within the various URI we parsed, we return the one defined within the same URI (if it exists). If there is more than one parsed metadata with the same FQCN and none of them are defined within the same URI as this type, then null is returned.- Returns:
- the parent type instance or null
-
isInstanceOf
Whether the type is an instance of the specified parent type or not.- Parameters:
className-- Returns:
- true if the type is an instance of the given parent type.
-
subTypes
Collection<T> subTypes()Returns the child subtypes of this type. A child subtype is a type which parent is this type.- Returns:
- the immediate subtypes
-
allSubTypes
Collection<T> allSubTypes()Returns all the children subtypes (including grand children) of this type.- Returns:
- all the children
-
getInterfaces
Collection<InterfaceModel> getInterfaces()Returns an unmodifiable list of interfaces implemented or extended by this type.- Returns:
- collection of implemented or extended interfaces
-
getParameterizedInterfaces
Collection<ParameterizedInterfaceModel> getParameterizedInterfaces()- Returns:
- the list of parameterized type of superclass and implemented interface.
-
getParameterizedInterface
- Parameters:
type- the extensible type- Returns:
- the parameterized type of the respective extensible type
-
getFormalTypeParameters
Map<String,ParameterizedInterfaceModel> getFormalTypeParameters()Represents the raw generic type and bounded parameterized type.- Returns:
- the list of generic type parameter declared on the class.
-
getStaticFields
Collection<FieldModel> getStaticFields()Returns an unmodifiable list of static fields defined by this type -
getSimpleName
String getSimpleName()Returns the unqualified name of the underlying type.- Returns:
- the simple name of class
-