EclipseLink 2.5.0, build 'v20130425-368d603' API Reference

org.eclipse.persistence.jpa.jpql.tools.spi.java
Class JavaTypeRepository

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.tools.spi.java.JavaTypeRepository
All Implemented Interfaces:
ITypeRepository

public class JavaTypeRepository
extends java.lang.Object
implements ITypeRepository

The concrete implementation of ITypeRepository that is wrapping the Java class loader.

Version:
2.4
Author:
Pascal Filion
Since:
2.3

Constructor Summary
JavaTypeRepository(java.lang.ClassLoader classLoader)
          Creates a new JavaTypeRepository.
 
Method Summary
protected  java.lang.Class<?> attemptLoadType(java.lang.String typeName)
          Retrieves the Java type for the given type name, which has to be the fully qualified type name.
protected  JavaType buildType(java.lang.Class<?> javaType)
           
protected  JavaType buildType(java.lang.String typeName)
           
 java.lang.ClassLoader getClassLoader()
          Returns the ClassLoader that is used to load Java classes.
 IType getEnumType(java.lang.String enumTypeName)
          Returns the IType representing the possible given enum constant.
 JavaType getType(java.lang.Class<?> javaClass)
          Retrieves the external type for the given Java type.
 JavaType getType(java.lang.String typeName)
          Retrieves the external class for the given fully qualified class name.
 TypeHelper getTypeHelper()
          Returns a helper that gives access to the most common types.
protected  JavaType loadArrayType(java.lang.String typeName)
           
protected  JavaType loadInnerType(java.lang.String typeName)
           
protected  JavaType loadTypeImp(java.lang.String typeName)
           
protected  JavaType unresolvableType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaTypeRepository

public JavaTypeRepository(java.lang.ClassLoader classLoader)
Creates a new JavaTypeRepository.

Parameters:
classLoader - The repository used to access the application's classes
Method Detail

attemptLoadType

protected java.lang.Class<?> attemptLoadType(java.lang.String typeName)
Retrieves the Java type for the given type name, which has to be the fully qualified type name.

Parameters:
typeName - The fully qualified type name
Returns:
The Java type if it could be retrieved; null otherwise

buildType

protected JavaType buildType(java.lang.Class<?> javaType)

buildType

protected JavaType buildType(java.lang.String typeName)

getClassLoader

public java.lang.ClassLoader getClassLoader()
Returns the ClassLoader that is used to load Java classes.

Returns:
The ClassLoader that is used to load Java classes

getEnumType

public IType getEnumType(java.lang.String enumTypeName)
Returns the IType representing the possible given enum constant. If the given value does not represent an enum constant, then null is returned.

Specified by:
getEnumType in interface ITypeRepository
Parameters:
enumTypeName - The fully qualified enum type with the constant
Returns:
The external form for the given Enum type or null if none exists

getType

public JavaType getType(java.lang.Class<?> javaClass)
Retrieves the external type for the given Java type.

Specified by:
getType in interface ITypeRepository
Parameters:
javaClass - The Java type to wrap with an external form
Returns:
The external form of the given type

getType

public JavaType getType(java.lang.String typeName)
Retrieves the external class for the given fully qualified class name.

Specified by:
getType in interface ITypeRepository
Parameters:
typeName - The fully qualified class name of the class to retrieve
Returns:
The external form of the class to retrieve

getTypeHelper

public TypeHelper getTypeHelper()
Returns a helper that gives access to the most common types.

Specified by:
getTypeHelper in interface ITypeRepository
Returns:
A helper containing a collection of methods related to IType

loadArrayType

protected JavaType loadArrayType(java.lang.String typeName)

loadInnerType

protected JavaType loadInnerType(java.lang.String typeName)

loadTypeImp

protected JavaType loadTypeImp(java.lang.String typeName)

unresolvableType

protected JavaType unresolvableType()

EclipseLink 2.5.0, build 'v20130425-368d603' API Reference