|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.jpa.jpql.spi.java.JavaType
public class JavaType
The concrete implementation of IType
that is wrapping a Java type.
Field Summary |
---|
Fields inherited from interface org.eclipse.persistence.jpa.jpql.spi.IType |
---|
UNRESOLVABLE_TYPE |
Constructor Summary | |
---|---|
JavaType(ITypeRepository typeRepository,
java.lang.Class<?> type)
Creates a new JavaType . |
|
JavaType(ITypeRepository typeRepository,
java.lang.String typeName)
Creates a new JavaType . |
Method Summary | |
---|---|
protected IConstructor |
buildConstructor(java.lang.reflect.Constructor<?> constructor)
|
protected java.util.Collection<IConstructor> |
buildConstructors()
|
protected java.lang.String[] |
buildEnumConstants()
|
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. |
protected ITypeRepository |
getTypeRepository()
Returns the type repository for the application. |
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 typeMethod Detail |
---|
protected IConstructor buildConstructor(java.lang.reflect.Constructor<?> constructor)
protected java.util.Collection<IConstructor> buildConstructors()
protected java.lang.String[] buildEnumConstants()
public IterableIterator<IConstructor> constructors()
constructors
in interface IType
public boolean equals(IType type)
Note: Object.hashCode()
needs to be overridden.
equals
in interface IType
type
- The type to compare with this one
true
if the given type and this one represents the
same Java type; false
otherwisepublic boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public java.lang.String[] getEnumConstants()
IType
represents an Enum
type, then this method should returns the
name of the constants.
getEnumConstants
in interface IType
Enum
constant or an empty list if the type is not an
Enum
public java.lang.String getName()
getName
in interface IType
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 IType
protected ITypeRepository getTypeRepository()
ITypes
public boolean hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
hasAnnotation
in interface IType
annotationType
- The class of the annotation
true
if the annotation is defined on this type; false
otherwisepublic int hashCode()
hashCode
in class java.lang.Object
public boolean isAssignableTo(IType otherType)
isAssignableTo
in interface IType
otherType
- The type used to determine if the class represented by this external form is an
instance of with one
true
if this type is an instance of the given type; false
otherwisepublic boolean isEnum()
IType
represents an Enum
.
isEnum
in interface IType
true
if this is an Enum
; false
otherwisepublic boolean isResolvable()
isResolvable
in interface IType
true
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.Object
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |