Top Description Fields Methods
org.eclipse.persistence.jpa.jpql.tools.spi

public Interface IType

extends IExternalForm
Annotations
@SuppressWarnings:nls
Imports
java.lang.annotation.Annotation

The external representation of a Java type.

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.

Author
Pascal Filion
Since
2.3
Version
2.5

Field Summary

Modifier and TypeField and Description
public static final String
UNRESOLVABLE_TYPE

Special constant used to specify this IType represents an unresolvable type, or simply an unknown type.

Method Summary

Modifier and TypeMethod and Description
public Iterable<IConstructor>

Returns:

The declared constructors
constructors
()

Returns the external representation of the Java class's constructors.

public boolean

Returns:

true if the given type and this one represents the same Java type; false otherwise
equals
(IType
The type to compare with this one
type
)

Determines whether the given type represents the same Java type thank this one.

public String[]

Returns:

The name of the Enum constant or an empty list if the type is not an Enum
getEnumConstants
()

If this IType represents an Enum type, then this method should returns the name of the constants.

public String

Returns:

The name of the class represented by this one
getName
()

Returns the fully qualified class name.

public ITypeDeclaration

Returns:

The external form of the class' type declaration
getTypeDeclaration
()

Returns the declaration of the Java class, which gives the information about type parameters, dimensionality, etc.

public boolean

Returns:

true if the annotation is defined on this type; false otherwise
hasAnnotation
(Class<? extends Annotation>
The class of the annotation
annotationType
)

Determines whether the given annotation is present on this type.

public boolean

Returns:

true if this type is an instance of the given type; false otherwise
isAssignableTo
(IType
The type used to determine if the class represented by this external form is an instance of with one
type
)

Determines whether this type is an instance of the given type.

public boolean

Returns:

true if this is an Enum; false otherwise
isEnum
()

Determines whether this IType represents an Enum.

public boolean

Returns:

true if the actual Java type can be located on the application's class path; false if it could not be found
isResolvable
()

Determines whether this Java type actually exists.

Field Detail

UNRESOLVABLE_TYPEback to summary
public static final String UNRESOLVABLE_TYPE

Special constant used to specify this IType represents an unresolvable type, or simply an unknown type. This has to be handled by ITypeRepository#getType(String).

Method Detail

constructorsback to summary
public Iterable<IConstructor> constructors()

Returns the external representation of the Java class's constructors. All public, protected, default (package) access, and private constructors should be included.

Returns:Iterable<IConstructor>

The declared constructors

equalsback to summary
public boolean equals(IType type)

Determines whether the given type represents the same Java type thank this one.

Note

Object#hashCode() needs to be overridden.

Parameters
type:IType

The type to compare with this one

Returns:boolean

true if the given type and this one represents the same Java type; false otherwise

getEnumConstantsback to summary
public String[] getEnumConstants()

If this IType represents an Enum type, then this method should returns the name of the constants.

Returns:String[]

The name of the Enum constant or an empty list if the type is not an Enum

getNameback to summary
public String getName()

Returns the fully qualified class name.

Returns:String

The name of the class represented by this one

getTypeDeclarationback to summary
public ITypeDeclaration getTypeDeclaration()

Returns the declaration of the Java class, which gives the information about type parameters, dimensionality, etc.

Returns:ITypeDeclaration

The external form of the class' type declaration

hasAnnotationback to summary
public boolean hasAnnotation(Class<? extends Annotation> annotationType)

Determines whether the given annotation is present on this type.

Parameters
annotationType:Class<? extends Annotation>

The class of the annotation

Returns:boolean

true if the annotation is defined on this type; false otherwise

isAssignableToback to summary
public boolean isAssignableTo(IType type)

Determines whether this type is an instance of the given type.

Parameters
type:IType

The type used to determine if the class represented by this external form is an instance of with one

Returns:boolean

true if this type is an instance of the given type; false otherwise

isEnumback to summary
public boolean isEnum()

Determines whether this IType represents an Enum.

Returns:boolean

true if this is an Enum; false otherwise

isResolvableback to summary
public boolean isResolvable()

Determines whether this Java type actually exists.

Returns:boolean

true if the actual Java type can be located on the application's class path; false if it could not be found