public class XJCJavaModelImpl extends java.lang.Object implements JavaModel
Purpose: JavaModel
implementation wrapping XJC's JCodeModel
. Used when
bootstrapping a DynamicJAXBContext
from an XML Schema.
Responsibilities:
JavaClass
based on a Class
or Class
name.Annotation
for a given JavaAnnotation
.JavaModel
Constructor and Description |
---|
XJCJavaModelImpl(com.sun.codemodel.JCodeModel codeModel,
DynamicClassLoader loader)
Construct a new instance of
XJCJavaModelImpl . |
Modifier and Type | Method and Description |
---|---|
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. |
public XJCJavaModelImpl(com.sun.codemodel.JCodeModel codeModel, DynamicClassLoader loader)
XJCJavaModelImpl
.codeModel
- - the XJC JCodeModel
to be wrapped.loader
- - the ClassLoader
used to bootstrap the DynamicJAXBContext
.public JavaClass getClass(java.lang.Class<?> jClass)
JavaClass
given the corresponding Java Class
.public JavaClass getClass(java.lang.String className)
JavaClass
given the corresponding Java Class'
name.public java.lang.annotation.Annotation getAnnotation(JavaAnnotation annotation, java.lang.Class<?> jClass)
Annotation
representation of the given JavaAnnotation
.getAnnotation
in interface JavaModel
annotation
- - the JavaAnnotation
to be converted.jClass
- - the Java Class
this annotation belogs to.Annotation
representation of the given JavaAnnotation
.public java.util.Map<java.lang.String,JavaClass> getJavaModelClasses()
Map
of this JavaModel's
JavaClasses
, keyed on class name.JavaModel's
Map
of JavaClasses
.public void setJavaModelClasses(java.util.Map<java.lang.String,JavaClass> javaModelClasses)
Map
of JavaClasses
for this JavaModel's
, keyed on class name.javaModelClasses
- - a Map
of JavaClasses
, keyed on class name.public java.lang.ClassLoader getClassLoader()
JavaModel's
ClassLoader
.getClassLoader
in interface JavaModel
ClassLoader
used by this JavaModel
.