UNRESOLVABLE_TYPE| Constructor and Description |
|---|
JavaType(ITypeRepository typeRepository,
java.lang.Class<?> type)
Creates a new
JavaType. |
JavaType(ITypeRepository typeRepository,
java.lang.String typeName)
Creates a new
JavaType. |
| Modifier and Type | Method and Description |
|---|---|
IterableIterator<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.
|
boolean |
equals(java.lang.Object object) |
java.lang.String[] |
getEnumConstants()
If this
IType represents an Enum type, then this method should returns the
name of the constants. |
java.lang.String |
getName()
Returns the fully qualified class name.
|
java.lang.Class<?> |
getType()
Returns the encapsulated
Class, which is the actual type. |
ITypeDeclaration |
getTypeDeclaration()
Returns the declaration of the Java class, which gives the information about type parameters,
dimensionality, etc.
|
boolean |
hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Determines whether the given annotation is present on this type.
|
int |
hashCode() |
boolean |
isAssignableTo(IType otherType)
Determines whether this type is an instance of the given type.
|
boolean |
isEnum()
Determines whether this
IType represents an Enum. |
boolean |
isResolvable()
Determines whether this Java type actually exists.
|
java.lang.String |
toString() |
public JavaType(ITypeRepository typeRepository, java.lang.Class<?> type)
JavaType.typeRepository - The external form of a type repositorytype - The actual Java type wrapped by this classpublic JavaType(ITypeRepository typeRepository, java.lang.String typeName)
JavaType.typeRepository - The external form of a type repositorytypeName - The fully qualified name of the Java typepublic IterableIterator<IConstructor> constructors()
constructors in interface ITypepublic boolean equals(IType type)
Note: Object.hashCode() needs to be overridden.
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic java.lang.String[] getEnumConstants()
IType represents an Enum type, then this method should returns the
name of the constants.getEnumConstants in interface ITypeEnum constant or an empty list if the type is not an
Enumpublic java.lang.String getName()
public java.lang.Class<?> getType()
Class, which is the actual type.null is returned; then the class could not be resolvedpublic ITypeDeclaration getTypeDeclaration()
getTypeDeclaration in interface ITypepublic boolean hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
hasAnnotation in interface ITypeannotationType - The class of the annotationtrue if the annotation is defined on this type; false
otherwisepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isAssignableTo(IType otherType)
isAssignableTo in interface ITypeotherType - 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
otherwisepublic boolean isEnum()
IType represents an Enum.public boolean isResolvable()
isResolvable in interface ITypetrue if the actual Java type can be located on the application's class
path; false if it could not be foundpublic java.lang.String toString()
toString in class java.lang.ObjectEclipseLink 2.4.2, "build v20130514-5956486" API Reference