EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jaxb.javamodel.xjc
Class XJCJavaModelImpl

java.lang.Object
  extended by org.eclipse.persistence.jaxb.javamodel.xjc.XJCJavaModelImpl
All Implemented Interfaces:
JavaModel

public class XJCJavaModelImpl
extends java.lang.Object
implements JavaModel

INTERNAL:

Purpose: JavaModel implementation wrapping XJC's JCodeModel. Used when bootstrapping a DynamicJAXBContext from an XML Schema.

Responsibilities:

See Also:
JavaModel
Since:
EclipseLink 2.1

Constructor Summary
XJCJavaModelImpl(JCodeModel codeModel, DynamicClassLoader loader)
          Construct a new instance of XJCJavaModelImpl.
 
Method Summary
 java.lang.annotation.Annotation getAnnotation(JavaAnnotation annotation, java.lang.Class<?> jClass)
          Return a Java Annotation representation of the given JavaAnnotation.
 JavaClass getClass(java.lang.Class<?> jClass)
          Obtain the JavaClass given the corresponding Java Class.
 JavaClass getClass(java.lang.String className)
          Obtain the JavaClass given the corresponding Java Class' name.
 java.lang.ClassLoader getClassLoader()
          Returns this JavaModel's ClassLoader.
 java.util.Map<java.lang.String,JavaClass> getJavaModelClasses()
          Returns a Map of this JavaModel's JavaClasses, keyed on class name.
 void setJavaModelClasses(java.util.Map<java.lang.String,JavaClass> javaModelClasses)
          Sets the Map of JavaClasses for this JavaModel's, keyed on class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XJCJavaModelImpl

public XJCJavaModelImpl(JCodeModel codeModel,
                        DynamicClassLoader loader)
Construct a new instance of XJCJavaModelImpl.

Parameters:
codeModel - - the XJC JCodeModel to be wrapped.
loader - - the ClassLoader used to bootstrap the DynamicJAXBContext.
Method Detail

getClass

public JavaClass getClass(java.lang.Class<?> jClass)
Obtain the JavaClass given the corresponding Java Class.

Specified by:
getClass in interface JavaModel
Parameters:
jClass - - the Java Class to search for.
Returns:
the JavaClass corresponding to jClass.

getClass

public JavaClass getClass(java.lang.String className)
Obtain the JavaClass given the corresponding Java Class' name.

Specified by:
getClass in interface JavaModel
Parameters:
className - - the name of the Java Class to search for.
Returns:
the JavaClass corresponding to className.

getAnnotation

public java.lang.annotation.Annotation getAnnotation(JavaAnnotation annotation,
                                                     java.lang.Class<?> jClass)
Return a Java Annotation representation of the given JavaAnnotation.

Specified by:
getAnnotation in interface JavaModel
Parameters:
annotation - - the JavaAnnotation to be converted.
jClass - - the Java Class this annotation belogs to.
Returns:
a Java Annotation representation of the given JavaAnnotation.

getJavaModelClasses

public java.util.Map<java.lang.String,JavaClass> getJavaModelClasses()
Returns a Map of this JavaModel's JavaClasses, keyed on class name.

Returns:
this JavaModel's Map of JavaClasses.

setJavaModelClasses

public void setJavaModelClasses(java.util.Map<java.lang.String,JavaClass> javaModelClasses)
Sets the Map of JavaClasses for this JavaModel's, keyed on class name.

Parameters:
javaModelClasses - - a Map of JavaClasses, keyed on class name.

getClassLoader

public java.lang.ClassLoader getClassLoader()
Returns this JavaModel's ClassLoader.

Specified by:
getClassLoader in interface JavaModel
Returns:
the ClassLoader used by this JavaModel.

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference