public class RuntimeModelBuilder extends ModelBuilder<Type,Class,Field,Method>
ModelBuilder
that works at the run-time by using
the java.lang.reflect
package.
This extends ModelBuilder
by providing more functionalities such
as accessing the fields and classes.
Modifier and Type | Field and Description |
---|---|
JAXBContextImpl |
context
The
JAXBContextImpl for which the model is built. |
defaultNsUri, hasSwaRef, nav, reader
Constructor and Description |
---|
RuntimeModelBuilder(JAXBContextImpl context,
RuntimeAnnotationReader annotationReader,
Map<Class,Class> subclassReplacements,
String defaultNamespaceRemap) |
Modifier and Type | Method and Description |
---|---|
com.sun.xml.bind.v2.model.impl.RuntimeArrayInfoImpl |
createArrayInfo(Locatable upstream,
Type arrayType) |
protected com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl |
createClassInfo(Class clazz,
Locatable upstream) |
com.sun.xml.bind.v2.model.impl.RuntimeElementInfoImpl |
createElementInfo(com.sun.xml.bind.v2.model.impl.RegistryInfoImpl<Type,Class,Field,Method> registryInfo,
Method method) |
protected com.sun.xml.bind.v2.model.impl.RuntimeEnumLeafInfoImpl |
createEnumLeafInfo(Class clazz,
Locatable upstream) |
static Transducer |
createTransducer(RuntimeNonElementRef ref)
Creates a
Transducer given a reference. |
protected com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl |
createTypeInfoSet() |
RuntimeNonElement |
getClassInfo(Class clazz,
boolean searchForSuperClass,
Locatable upstream)
For limited cases where the caller needs to search for a super class.
|
RuntimeNonElement |
getClassInfo(Class clazz,
Locatable upstream)
Builds a JAXB
ClassInfo model from a given class declaration
and adds that to this model owner. |
RuntimeTypeInfoSet |
link()
Called after all the classes are added to the type set
to "link" them together.
|
addRegistry, getNavigator, getReader, getRegistry, getTypeInfo, getTypeInfo, isReplaced, reportError, setErrorHandler
@Nullable public final JAXBContextImpl context
JAXBContextImpl
for which the model is built.
Null when created for reflection.public RuntimeModelBuilder(JAXBContextImpl context, RuntimeAnnotationReader annotationReader, Map<Class,Class> subclassReplacements, String defaultNamespaceRemap)
public RuntimeNonElement getClassInfo(Class clazz, Locatable upstream)
ModelBuilder
ClassInfo
model from a given class declaration
and adds that to this model owner.
Return type is either ClassInfo
or LeafInfo
(for types like
String
or Enum
-derived ones)
getClassInfo
in class ModelBuilder<Type,Class,Field,Method>
public RuntimeNonElement getClassInfo(Class clazz, boolean searchForSuperClass, Locatable upstream)
ModelBuilder
ModelBuilder.subclassReplacements
to kick in for the super class search, which will cause infinite recursion.getClassInfo
in class ModelBuilder<Type,Class,Field,Method>
protected com.sun.xml.bind.v2.model.impl.RuntimeEnumLeafInfoImpl createEnumLeafInfo(Class clazz, Locatable upstream)
createEnumLeafInfo
in class ModelBuilder<Type,Class,Field,Method>
protected com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl createClassInfo(Class clazz, Locatable upstream)
createClassInfo
in class ModelBuilder<Type,Class,Field,Method>
public com.sun.xml.bind.v2.model.impl.RuntimeElementInfoImpl createElementInfo(com.sun.xml.bind.v2.model.impl.RegistryInfoImpl<Type,Class,Field,Method> registryInfo, Method method) throws IllegalAnnotationException
createElementInfo
in class ModelBuilder<Type,Class,Field,Method>
IllegalAnnotationException
public com.sun.xml.bind.v2.model.impl.RuntimeArrayInfoImpl createArrayInfo(Locatable upstream, Type arrayType)
createArrayInfo
in class ModelBuilder<Type,Class,Field,Method>
protected com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl createTypeInfoSet()
createTypeInfoSet
in class ModelBuilder<Type,Class,Field,Method>
public RuntimeTypeInfoSet link()
ModelBuilder
Don't expose implementation classes in the signature.
link
in class ModelBuilder<Type,Class,Field,Method>
TypeInfoSet
that represents the model,
or null if there was an error.public static Transducer createTransducer(RuntimeNonElementRef ref)
Transducer
given a reference.
Used to implement RuntimeNonElementRef.getTransducer()
.
Shouldn't be called from anywhere else.
TODO: this is not the proper place for this class to be in.Copyright © 2019 JBoss by Red Hat. All rights reserved.