public interface IType
Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Modifier and Type | Field and Description |
---|---|
static String |
UNRESOLVABLE_TYPE
Special constant used to specify this
IType represents an unresolvable type, or simply
an unknown type. |
Modifier and Type | Method and Description |
---|---|
Iterable<IConstructor> |
constructors()
Returns the external representation of the Java class's constructors.
|
boolean |
equals(IType type)
Determines whether the given type represents the same Java type thank this
one.
|
String[] |
getEnumConstants()
|
String |
getName()
Returns the fully qualified class name.
|
ITypeDeclaration |
getTypeDeclaration()
Returns the declaration of the Java class, which gives the information about type parameters,
dimensionality, etc.
|
boolean |
hasAnnotation(Class<? extends Annotation> annotationType)
Determines whether the given annotation is present on this type.
|
boolean |
isAssignableTo(IType type)
Determines whether this type is an instance of the given type.
|
boolean |
isEnum()
|
boolean |
isResolvable()
Determines whether this Java type actually exists.
|
static final String UNRESOLVABLE_TYPE
IType
represents an unresolvable type, or simply
an unknown type. This has to be handled by ITypeRepository.getType(String)
.Iterable<IConstructor> constructors()
boolean equals(IType type)
Note: Object.hashCode()
needs to be overridden.
type
- The type to compare with this onetrue
if the given type and this one represents the
same Java type; false
otherwiseString[] getEnumConstants()
Enum
constant or an empty list if the type is not an
Enum
String getName()
ITypeDeclaration getTypeDeclaration()
boolean hasAnnotation(Class<? extends Annotation> annotationType)
annotationType
- The class of the annotationtrue
if the annotation is defined on this type; false
otherwiseboolean isAssignableTo(IType type)
type
- The type used to determine if the class represented by this external form is an
instance of with onetrue
if this type is an instance of the given type; false
otherwiseboolean isEnum()
true
if this is an Enum
; false
otherwiseboolean isResolvable()
true
if the actual Java type can be located on the application's class
path; false
if it could not be foundEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference