Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.core.jpql.spi
Class JavaType

java.lang.Object
  extended by org.eclipse.jpt.jpa.core.jpql.spi.JavaType
All Implemented Interfaces:
IJpaType

public class JavaType
extends Object
implements IJpaType

The concrete implementation of IType that is wrapping 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.

Since:
3.0

Constructor Summary
JavaType(JpaTypeRepository typeRepository, Class<?> type)
          Creates a new JavaType.
 
Method Summary
protected  IConstructor buildConstructor(Constructor<?> constructor)
           
protected  Collection<IConstructor> buildConstructors()
           
protected  String[] buildEnumConstants()
           
 Iterable<IConstructor> constructors()
          
 boolean equals(IType type)
          
 String[] getEnumConstants()
          
 String getName()
          
protected  Class<?> getType()
          Returns the encapsulated Class, which is the actual type.
 ITypeDeclaration getTypeDeclaration()
          
protected  JpaTypeRepository getTypeRepository()
          Returns the type repository for the application.
 boolean hasAnnotation(Class<? extends Annotation> annotationType)
          
 int hashCode()
          
 boolean isAssignableTo(IType otherType)
          
 boolean isEnum()
          
 boolean isResolvable()
          
 void setTypeDeclaration(JpaTypeDeclaration typeDeclaration)
          Manually sets the declaration of this IType, which gives the information about type parameters, dimensionality, etc.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaType

public JavaType(JpaTypeRepository typeRepository,
                Class<?> type)
Creates a new JavaType.

Parameters:
typeRepository - The external form of a type repository
type - The actual Java type wrapped by this class
Method Detail

buildConstructor

protected IConstructor buildConstructor(Constructor<?> constructor)

buildConstructors

protected Collection<IConstructor> buildConstructors()

buildEnumConstants

protected String[] buildEnumConstants()

constructors

public Iterable<IConstructor> constructors()


equals

public boolean equals(IType type)

Overrides:
equals in class Object

getEnumConstants

public String[] getEnumConstants()


getName

public String getName()


getType

protected Class<?> getType()
Returns the encapsulated Class, which is the actual type.

Returns:
The actual Java type, if null is returned; then the class could not be resolved

getTypeDeclaration

public ITypeDeclaration getTypeDeclaration()


getTypeRepository

protected JpaTypeRepository getTypeRepository()
Returns the type repository for the application.

Returns:
The repository of ITypes

hasAnnotation

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


hashCode

public int hashCode()

Overrides:
hashCode in class Object

isAssignableTo

public boolean isAssignableTo(IType otherType)


isEnum

public boolean isEnum()


isResolvable

public boolean isResolvable()


setTypeDeclaration

public void setTypeDeclaration(JpaTypeDeclaration typeDeclaration)
Manually sets the declaration of this IType, which gives the information about type parameters, dimensionality, etc.

Specified by:
setTypeDeclaration in interface IJpaType
Parameters:
typeDeclaration - The external form of the type declaration

toString

public String toString()

Overrides:
toString in class Object

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.