EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql.spi.java
Class JavaTypeDeclaration

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.spi.java.JavaTypeDeclaration
All Implemented Interfaces:
ITypeDeclaration

public class JavaTypeDeclaration
extends java.lang.Object
implements ITypeDeclaration

The concrete implementation of ITypeDeclaration that is wrapping the representation of the declaration description of a type.

Version:
2.4
See Also:
IMapping, IType
Author:
Pascal Filion
Since:
2.3

Constructor Summary
JavaTypeDeclaration(ITypeRepository typeRepository, IType type, java.lang.Object genericType, boolean array)
          Creates a new JavaTypeDeclaration.
 
Method Summary
protected  java.lang.String buildArrayTypeName(java.lang.String arrayTypeName)
           
protected  ITypeDeclaration[] buildParameterTypes()
           
protected  JavaTypeDeclaration buildTypeDeclaration(java.lang.Class<?> javaType)
           
protected  JavaTypeDeclaration buildTypeDeclaration(java.lang.Object genericType)
           
protected  java.lang.String elementType(java.lang.String typeName)
           
 int getDimensionality()
          Returns the dimensionality of the type if (ITypeDeclaration.isArray() is true) or 0 if the type is not an array.
 IType getType()
          Returns the type defined for the Java member.
protected  IType getType(java.lang.Class<?> type)
           
 ITypeDeclaration[] getTypeParameters()
          Returns the ITypeDeclarations that represent the variables declared by the generic declaration represented by this ITypeDeclaration.
 boolean isArray()
          Determines whether this type represents an array or not.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaTypeDeclaration

public JavaTypeDeclaration(ITypeRepository typeRepository,
                           IType type,
                           java.lang.Object genericType,
                           boolean array)
Creates a new JavaTypeDeclaration.

Parameters:
typeRepository - The repository of ITypes
type - The external form of the Java type
genericType - The actual type that contains the generics, if any is present
array - Determines whether the type declaration represents an array
Method Detail

buildArrayTypeName

protected java.lang.String buildArrayTypeName(java.lang.String arrayTypeName)

buildParameterTypes

protected ITypeDeclaration[] buildParameterTypes()

buildTypeDeclaration

protected JavaTypeDeclaration buildTypeDeclaration(java.lang.Class<?> javaType)

buildTypeDeclaration

protected JavaTypeDeclaration buildTypeDeclaration(java.lang.Object genericType)

elementType

protected java.lang.String elementType(java.lang.String typeName)

getDimensionality

public int getDimensionality()
Returns the dimensionality of the type if (ITypeDeclaration.isArray() is true) or 0 if the type is not an array.

Specified by:
getDimensionality in interface ITypeDeclaration
Returns:
The array dimensionality if the IType is an array; otherwise 0

getType

public IType getType()
Returns the type defined for the Java member.

Specified by:
getType in interface ITypeDeclaration
Returns:
The type defined for the Java member

getType

protected IType getType(java.lang.Class<?> type)

getTypeParameters

public ITypeDeclaration[] getTypeParameters()
Returns the ITypeDeclarations that represent the variables declared by the generic declaration represented by this ITypeDeclaration.

Specified by:
getTypeParameters in interface ITypeDeclaration
Returns:
The array over the ITypeDeclarations

isArray

public boolean isArray()
Determines whether this type represents an array or not.

Specified by:
isArray in interface ITypeDeclaration
Returns:
true if this type is an array; false otherwise

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference