TypeInfoSet (a set of JAXB properties)
by using ElementInfoImpl and ClassInfoImpl.
from annotated Java classes.
This class uses Navigator and AnnotationReader to
work with arbitrary annotation source and arbitrary Java model.
For this purpose this class is parameterized.
| Modifier and Type | Field and Description |
|---|---|
| public final String | defaultNsUri
JAXB doesn't want to use namespaces unless we are told to, but WS-I BP conformace requires JAX-RPC to always use a non-empty namespace URI. |
| private ErrorHandler | |
| private boolean | |
| public boolean | hasSwaRef
Set to true if the model includes |
| private boolean | |
| private static final Logger | |
| public final Navigator | |
| private final ErrorHandler | |
| public final AnnotationReader | |
| pack-priv final Map | registries
Packages whose registries are already added. |
| private final Map | |
| pack-priv final TypeInfoSetImpl | typeInfoSet
|
| private final Map | typeNames
Used to detect collisions among global type names. |
| Access | Constructor and Description |
|---|---|
| public | ModelBuilder(AnnotationReader<T, C, F, M> reader, Navigator<T, C, F, M> navigator, Map<C, C> subclassReplacements, String defaultNamespaceRemap)
|
| Modifier and Type | Method and Description |
|---|---|
| public RegistryInfo | addRegistry(C registryClass, Locatable upstream)
Visits a class with |
| private void | addToRegistry(C
which package will be used clazz, Locatable location p)Adding package's ObjectFactory methods to registry |
| private void | |
| protected ArrayInfo | |
| protected ClassInfo | |
| protected ElementInfo | |
| protected EnumLeafInfo | |
| protected TypeInfoSet | |
| public NonElement | getClassInfo(C clazz, Locatable upstream)
Builds a JAXB |
| public NonElement | getClassInfo(C clazz, boolean searchForSuperClass, Locatable upstream)
For limited cases where the caller needs to search for a super class. |
| public Navigator | |
| private Class | Returns: null - if it's not JAXBElement property, or it's not parametrized, and array of parametrized classes in other caseproperty which parametrized types we will try to get p)Getting parametrized classes of |
| public AnnotationReader | |
| public RegistryInfo | Returns: null if no registry exists for the package. unlike other getXXX methods on this class, this method is side-effect free.Gets a |
| public NonElement | Returns: always non-null.Have the builder recognize the type (if it hasn't done so yet),
and returns a |
| public NonElement | |
| public boolean | |
| public TypeInfoSet | Returns: fully builtTypeInfoSet that represents the model,
or null if there was an error.Called after all the classes are added to the type set to "link" them together. |
| public final void | |
| public void | setErrorHandler(ErrorHandler
can be null. errorHandler)Sets the error handler that receives errors discovered during the model building. |
| defaultNsUri | back to summary |
|---|---|
| public final String defaultNsUri JAXB doesn't want to use namespaces unless we are told to, but WS-I BP conformace requires JAX-RPC to always use a non-empty namespace URI. (see http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#WSDLTYPES R2105) To work around this issue, we allow the use of the empty namespaces to be replaced by a particular designated namespace URI. This field keeps the value of that replacing namespace URI. When there's no replacement, this field is set to "". | |
| errorHandler | back to summary |
|---|---|
private ErrorHandler errorHandler
| |
| hadError | back to summary |
|---|---|
| private boolean hadError | |
| hasSwaRef | back to summary |
|---|---|
| public boolean hasSwaRef Set to true if the model includes | |
| linked | back to summary |
|---|---|
| private boolean linked | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| nav | back to summary |
|---|---|
| public final Navigator<T, C, F, M> nav | |
| proxyErrorHandler | back to summary |
|---|---|
| private final ErrorHandler proxyErrorHandler | |
| reader | back to summary |
|---|---|
| public final AnnotationReader<T, C, F, M> reader | |
| registries | back to summary |
|---|---|
| pack-priv final Map<String, RegistryInfoImpl<T, C, F, M>> registries Packages whose registries are already added. | |
| subclassReplacements | back to summary |
|---|---|
| private final Map<C, C> subclassReplacements | |
| typeInfoSet | back to summary |
|---|---|
| pack-priv final TypeInfoSetImpl<T, C, F, M> typeInfoSet
| |
| typeNames | back to summary |
|---|---|
| private final Map<QName, TypeInfo<T, C>> typeNames Used to detect collisions among global type names. | |
| ModelBuilder | back to summary |
|---|---|
| public ModelBuilder(AnnotationReader<T, C, F, M> reader, Navigator<T, C, F, M> navigator, Map<C, C> subclassReplacements, String defaultNamespaceRemap) | |
| addRegistry | back to summary |
|---|---|
| public RegistryInfo Visits a class with | |
| addToRegistry | back to summary |
|---|---|
| private void addToRegistry(C clazz, Locatable p) Adding package's ObjectFactory methods to registry
| |
| addTypeName | back to summary |
|---|---|
| private void addTypeName(NonElement<T, C> r) Checks the uniqueness of the type name. | |
| createArrayInfo | back to summary |
|---|---|
| protected ArrayInfo | |
| createClassInfo | back to summary |
|---|---|
| protected ClassInfo | |
| createElementInfo | back to summary |
|---|---|
| protected ElementInfo | |
| createEnumLeafInfo | back to summary |
|---|---|
| protected EnumLeafInfo | |
| createTypeInfoSet | back to summary |
|---|---|
| protected TypeInfoSet | |
| getClassInfo | back to summary |
|---|---|
| public NonElement Builds a JAXB
Return type is either | |
| getClassInfo | back to summary |
|---|---|
| public NonElement For limited cases where the caller needs to search for a super class.
This is necessary because we don't want | |
| getNavigator | back to summary |
|---|---|
| public Navigator Implements org.
| |
| getParametrizedTypes | back to summary |
|---|---|
| private Class Getting parametrized classes of
| |
| getReader | back to summary |
|---|---|
| public AnnotationReader Implements org.
| |
| getRegistry | back to summary |
|---|---|
| public RegistryInfo Gets a
| |
| getTypeInfo | back to summary |
|---|---|
| public NonElement Have the builder recognize the type (if it hasn't done so yet),
and returns a
| |
| getTypeInfo | back to summary |
|---|---|
| public NonElement This method is used to add a root reference to a model. | |
| isReplaced | back to summary |
|---|---|
| public boolean isReplaced(C sc) | |
| link | back to summary |
|---|---|
| public TypeInfoSet Called after all the classes are added to the type set to "link" them together. Don't expose implementation classes in the signature.
| |
| reportError | back to summary |
|---|---|
| public final void reportError(IllegalAnnotationException e) | |
| setErrorHandler | back to summary |
|---|---|
| public void setErrorHandler(ErrorHandler errorHandler) Sets the error handler that receives errors discovered during the model building.
| |