- java.lang.Object
-
- org.glassfish.jaxb.runtime.v2.model.impl.ModelBuilder<Type,Class,Field,Method>
-
- org.glassfish.jaxb.runtime.v2.model.impl.RuntimeModelBuilder
-
- All Implemented Interfaces:
ModelBuilderI<Type,Class,Field,Method>
public class RuntimeModelBuilder extends ModelBuilder<Type,Class,Field,Method>
ModelBuilderthat works at the run-time by using thejava.lang.reflectpackage.This extends
ModelBuilderby providing more functionalities such as accessing the fields and classes.- Author:
- Kohsuke Kawaguchi (kk@kohsuke.org)
-
-
Field Summary
Fields Modifier and Type Field Description JAXBContextImplcontextTheJAXBContextImplfor which the model is built.-
Fields inherited from class org.glassfish.jaxb.runtime.v2.model.impl.ModelBuilder
defaultNsUri, hasSwaRef, nav, reader
-
-
Constructor Summary
Constructors Constructor Description RuntimeModelBuilder(JAXBContextImpl context, RuntimeAnnotationReader annotationReader, Map<Class,Class> subclassReplacements, String defaultNamespaceRemap)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.glassfish.jaxb.runtime.v2.model.impl.RuntimeArrayInfoImplcreateArrayInfo(Locatable upstream, Type arrayType)protected org.glassfish.jaxb.runtime.v2.model.impl.RuntimeClassInfoImplcreateClassInfo(Class clazz, Locatable upstream)org.glassfish.jaxb.runtime.v2.model.impl.RuntimeElementInfoImplcreateElementInfo(org.glassfish.jaxb.runtime.v2.model.impl.RegistryInfoImpl<Type,Class,Field,Method> registryInfo, Method method)protected org.glassfish.jaxb.runtime.v2.model.impl.RuntimeEnumLeafInfoImplcreateEnumLeafInfo(Class clazz, Locatable upstream)static TransducercreateTransducer(RuntimeNonElementRef ref)Creates aTransducergiven a reference.protected org.glassfish.jaxb.runtime.v2.model.impl.RuntimeTypeInfoSetImplcreateTypeInfoSet()RuntimeNonElementgetClassInfo(Class clazz, boolean searchForSuperClass, Locatable upstream)For limited cases where the caller needs to search for a super class.RuntimeNonElementgetClassInfo(Class clazz, Locatable upstream)Builds a JAXBClassInfomodel from a given class declaration and adds that to this model owner.RuntimeTypeInfoSetlink()Called after all the classes are added to the type set to "link" them together.-
Methods inherited from class org.glassfish.jaxb.runtime.v2.model.impl.ModelBuilder
addRegistry, getNavigator, getReader, getRegistry, getTypeInfo, getTypeInfo, isReplaced, reportError, setErrorHandler
-
-
-
-
Field Detail
-
context
@Nullable public final JAXBContextImpl context
TheJAXBContextImplfor which the model is built. Null when created for reflection.
-
-
Constructor Detail
-
RuntimeModelBuilder
public RuntimeModelBuilder(JAXBContextImpl context, RuntimeAnnotationReader annotationReader, Map<Class,Class> subclassReplacements, String defaultNamespaceRemap)
-
-
Method Detail
-
getClassInfo
public RuntimeNonElement getClassInfo(Class clazz, Locatable upstream)
Description copied from class:ModelBuilderBuilds a JAXBClassInfomodel from a given class declaration and adds that to this model owner.Return type is either
ClassInfoorLeafInfo(for types likeStringorEnum-derived ones)- Overrides:
getClassInfoin classModelBuilder<Type,Class,Field,Method>
-
getClassInfo
public RuntimeNonElement getClassInfo(Class clazz, boolean searchForSuperClass, Locatable upstream)
Description copied from class:ModelBuilderFor limited cases where the caller needs to search for a super class. This is necessary because we don't wantModelBuilder.subclassReplacementsto kick in for the super class search, which will cause infinite recursion.- Overrides:
getClassInfoin classModelBuilder<Type,Class,Field,Method>
-
createEnumLeafInfo
protected org.glassfish.jaxb.runtime.v2.model.impl.RuntimeEnumLeafInfoImpl createEnumLeafInfo(Class clazz, Locatable upstream)
- Overrides:
createEnumLeafInfoin classModelBuilder<Type,Class,Field,Method>
-
createClassInfo
protected org.glassfish.jaxb.runtime.v2.model.impl.RuntimeClassInfoImpl createClassInfo(Class clazz, Locatable upstream)
- Overrides:
createClassInfoin classModelBuilder<Type,Class,Field,Method>
-
createElementInfo
public org.glassfish.jaxb.runtime.v2.model.impl.RuntimeElementInfoImpl createElementInfo(org.glassfish.jaxb.runtime.v2.model.impl.RegistryInfoImpl<Type,Class,Field,Method> registryInfo, Method method) throws IllegalAnnotationException
- Overrides:
createElementInfoin classModelBuilder<Type,Class,Field,Method>- Throws:
IllegalAnnotationException
-
createArrayInfo
public org.glassfish.jaxb.runtime.v2.model.impl.RuntimeArrayInfoImpl createArrayInfo(Locatable upstream, Type arrayType)
- Overrides:
createArrayInfoin classModelBuilder<Type,Class,Field,Method>
-
createTypeInfoSet
protected org.glassfish.jaxb.runtime.v2.model.impl.RuntimeTypeInfoSetImpl createTypeInfoSet()
- Overrides:
createTypeInfoSetin classModelBuilder<Type,Class,Field,Method>
-
link
public RuntimeTypeInfoSet link()
Description copied from class:ModelBuilderCalled after all the classes are added to the type set to "link" them together.Don't expose implementation classes in the signature.
- Overrides:
linkin classModelBuilder<Type,Class,Field,Method>- Returns:
- fully built
TypeInfoSetthat represents the model, or null if there was an error.
-
createTransducer
public static Transducer createTransducer(RuntimeNonElementRef ref)
Creates aTransducergiven a reference. Used to implementRuntimeNonElementRef.getTransducer(). Shouldn't be called from anywhere else. TODO: this is not the proper place for this class to be in.
-
-