Class XJCJavaModelImpl
java.lang.Object
org.eclipse.persistence.jaxb.javamodel.xjc.XJCJavaModelImpl
- All Implemented Interfaces:
JavaModel
INTERNAL:
Purpose: JavaModel
implementation wrapping XJC's JCodeModel
. Used when
bootstrapping a DynamicJAXBContext
from an XML Schema.
Responsibilities:
- Return a
JavaClass
based on aClass
orClass
name. - Return a Java
Annotation
for a givenJavaAnnotation
.
- See Also:
-
Constructor Summary
ConstructorDescriptionXJCJavaModelImpl
(com.sun.codemodel.JCodeModel codeModel, DynamicClassLoader loader) Construct a new instance ofXJCJavaModelImpl
. -
Method Summary
Modifier and TypeMethodDescriptiongetAnnotation
(JavaAnnotation annotation, Class<?> jClass) Return a JavaAnnotation
representation of the givenJavaAnnotation
.Obtain theJavaClass
given the corresponding JavaClass
.Obtain theJavaClass
given the corresponding JavaClass'
name.Returns thisJavaModel's
ClassLoader
.Returns aMap
of thisJavaModel's
JavaClasses
, keyed on class name.void
setJavaModelClasses
(Map<String, JavaClass> javaModelClasses) Sets theMap
ofJavaClasses
for thisJavaModel's
, keyed on class name.
-
Constructor Details
-
XJCJavaModelImpl
Construct a new instance ofXJCJavaModelImpl
.- Parameters:
codeModel
- - the XJCJCodeModel
to be wrapped.loader
- - theClassLoader
used to bootstrap theDynamicJAXBContext
.
-
-
Method Details
-
getClass
Obtain theJavaClass
given the corresponding JavaClass
. -
getClass
Obtain theJavaClass
given the corresponding JavaClass'
name. -
getAnnotation
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
Returns aMap
of thisJavaModel's
JavaClasses
, keyed on class name.- Returns:
- this
JavaModel's
Map
ofJavaClasses
.
-
setJavaModelClasses
Sets theMap
ofJavaClasses
for thisJavaModel's
, keyed on class name.- Parameters:
javaModelClasses
- - aMap
ofJavaClasses
, keyed on class name.
-
getClassLoader
Returns thisJavaModel's
ClassLoader
.- Specified by:
getClassLoader
in interfaceJavaModel
- Returns:
- the
ClassLoader
used by thisJavaModel
.
-