Class XJCJavaModelImpl
- java.lang.Object
-
- 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'sJCodeModel
. Used when bootstrapping aDynamicJAXBContext
from an XML Schema.Responsibilities:
- Return a
JavaClass
based on aClass
orClass
name. - Return a Java
Annotation
for a givenJavaAnnotation
.
- See Also:
JavaModel
- Since:
- EclipseLink 2.1
-
-
Constructor Summary
Constructors Constructor Description XJCJavaModelImpl(com.sun.codemodel.JCodeModel codeModel, DynamicClassLoader loader)
Construct a new instance ofXJCJavaModelImpl
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.annotation.Annotation
getAnnotation(JavaAnnotation annotation, java.lang.Class<?> jClass)
Return a JavaAnnotation
representation of the givenJavaAnnotation
.JavaClass
getClass(java.lang.Class<?> jClass)
Obtain theJavaClass
given the corresponding JavaClass
.JavaClass
getClass(java.lang.String className)
Obtain theJavaClass
given the corresponding JavaClass'
name.java.lang.ClassLoader
getClassLoader()
Returns thisJavaModel's
ClassLoader
.java.util.Map<java.lang.String,JavaClass>
getJavaModelClasses()
Returns aMap
of thisJavaModel's
JavaClasses
, keyed on class name.void
setJavaModelClasses(java.util.Map<java.lang.String,JavaClass> javaModelClasses)
Sets theMap
ofJavaClasses
for thisJavaModel's
, keyed on class name.
-
-
-
Constructor Detail
-
XJCJavaModelImpl
public XJCJavaModelImpl(com.sun.codemodel.JCodeModel codeModel, DynamicClassLoader loader)
Construct a new instance ofXJCJavaModelImpl
.- Parameters:
codeModel
- - the XJCJCodeModel
to be wrapped.loader
- - theClassLoader
used to bootstrap theDynamicJAXBContext
.
-
-
Method Detail
-
getClass
public JavaClass getClass(java.lang.Class<?> jClass)
Obtain theJavaClass
given the corresponding JavaClass
.
-
getClass
public JavaClass getClass(java.lang.String className)
Obtain theJavaClass
given the corresponding JavaClass'
name.
-
getAnnotation
public java.lang.annotation.Annotation getAnnotation(JavaAnnotation annotation, java.lang.Class<?> jClass)
Return a JavaAnnotation
representation of the givenJavaAnnotation
.- Specified by:
getAnnotation
in interfaceJavaModel
- Parameters:
annotation
- - theJavaAnnotation
to be converted.jClass
- - the JavaClass
this annotation belogs to.- Returns:
- a Java
Annotation
representation of the givenJavaAnnotation
.
-
getJavaModelClasses
public java.util.Map<java.lang.String,JavaClass> getJavaModelClasses()
Returns aMap
of thisJavaModel's
JavaClasses
, keyed on class name.- Returns:
- this
JavaModel's
Map
ofJavaClasses
.
-
setJavaModelClasses
public void setJavaModelClasses(java.util.Map<java.lang.String,JavaClass> javaModelClasses)
Sets theMap
ofJavaClasses
for thisJavaModel's
, keyed on class name.- Parameters:
javaModelClasses
- - aMap
ofJavaClasses
, keyed on class name.
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Returns thisJavaModel's
ClassLoader
.- Specified by:
getClassLoader
in interfaceJavaModel
- Returns:
- the
ClassLoader
used by thisJavaModel
.
-
-