Module com.sun.xml.bind.core
Interface TypeInfoSet<T,C,F,M>
-
public interface TypeInfoSet<T,C,F,M>Root of models. Set ofTypeInfos.- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<? extends T,? extends ArrayInfo<T,C>>arrays()Returns all theArrayInfos known to this set.Map<C,? extends ClassInfo<T,C>>beans()Returns all theClassInfos known to this set.Map<T,? extends BuiltinLeafInfo<T,C>>builtins()Returns all theBuiltinLeafInfos known to this set.voiddump(Result out)Dumps this model into XML.Map<C,? extends EnumLeafInfo<T,C>>enums()Returns all theEnumLeafInfos known to this set.Iterable<? extends ElementInfo<T,C>>getAllElements()Returns all theElementInfoknown to this set.NonElement<T,C>getAnyTypeInfo()Gets theTypeInfofor the any type.jakarta.xml.bind.annotation.XmlNsFormgetAttributeFormDefault(String nsUri)Gets the reasonableXmlNsFormfor the given namespace URI.NonElement<T,C>getClassInfo(C type)jakarta.xml.bind.annotation.XmlNsFormgetElementFormDefault(String nsUri)Gets the reasonableXmlNsFormfor the given namespace URI.ElementInfo<T,C>getElementInfo(C scope, QName name)Returns aElementInfofor the given element.Map<QName,? extends ElementInfo<T,C>>getElementMappings(C scope)Returns allElementInfos in the given scope.Navigator<T,C,F,M>getNavigator()Navigatorfor this model.Map<String,String>getSchemaLocations()GetsXmlSchema.location()found in this context.NonElement<T,C>getTypeInfo(Ref<T,C> ref)Returns a type information for the given reference.NonElement<T,C>getTypeInfo(T type)Returns aTypeInfofor the given type.Map<String,String>getXmlNs(String namespaceUri)Gets allXmlSchema.xmlns()found in this context for the given namespace URI.
-
-
-
Method Detail
-
getTypeInfo
NonElement<T,C> getTypeInfo(T type)
Returns aTypeInfofor the given type.- Returns:
- null if the specified type cannot be bound by JAXB, or not known to this set.
-
getAnyTypeInfo
NonElement<T,C> getAnyTypeInfo()
Gets theTypeInfofor the any type.
-
getClassInfo
NonElement<T,C> getClassInfo(C type)
Returns aClassInfo,ArrayInfo, orLeafInfofor the given bean.This method is almost like refinement of
getTypeInfo(Object)except our C cannot derive from T.- Returns:
- null if the specified type is not bound by JAXB or otherwise unknown to this set.
-
arrays
Map<? extends T,? extends ArrayInfo<T,C>> arrays()
Returns all theArrayInfos known to this set.
-
builtins
Map<T,? extends BuiltinLeafInfo<T,C>> builtins()
Returns all theBuiltinLeafInfos known to this set.
-
enums
Map<C,? extends EnumLeafInfo<T,C>> enums()
Returns all theEnumLeafInfos known to this set.
-
getElementInfo
ElementInfo<T,C> getElementInfo(C scope, QName name)
Returns aElementInfofor the given element.- Parameters:
scope- if null, return the info about a global element. Otherwise return a local element in the given scope if available, then look for a global element next.
-
getTypeInfo
NonElement<T,C> getTypeInfo(Ref<T,C> ref)
Returns a type information for the given reference.
-
getElementMappings
Map<QName,? extends ElementInfo<T,C>> getElementMappings(C scope)
Returns allElementInfos in the given scope.- Parameters:
scope- if non-null, this method only returns the local element mapping.
-
getAllElements
Iterable<? extends ElementInfo<T,C>> getAllElements()
Returns all theElementInfoknown to this set.
-
getXmlNs
Map<String,String> getXmlNs(String namespaceUri)
Gets allXmlSchema.xmlns()found in this context for the given namespace URI.This operation is expected to be only used in schema generator, so it can be slow.
- Returns:
- A map from prefixes to namespace URIs, which should be declared when generating a schema. Could be empty but never null.
-
getSchemaLocations
Map<String,String> getSchemaLocations()
GetsXmlSchema.location()found in this context.This operation is expected to be only used in schema generator, so it can be slow.
- Returns:
- A map from namespace URI to the value of the location.
If the entry is missing, that means a schema should be generated for that namespace.
If the value is "", that means the schema location is implied
(
<xs:schema namespace="..."/>w/o schemaLocation.)
-
getElementFormDefault
jakarta.xml.bind.annotation.XmlNsForm getElementFormDefault(String nsUri)
Gets the reasonableXmlNsFormfor the given namespace URI.The spec doesn't define very precisely what the
XmlNsFormvalue for the given namespace would be, so this method is implemented in rather ad-hoc way. It should work as what most people expect for simple cases.- Returns:
- never null.
-
getAttributeFormDefault
jakarta.xml.bind.annotation.XmlNsForm getAttributeFormDefault(String nsUri)
Gets the reasonableXmlNsFormfor the given namespace URI.The spec doesn't define very precisely what the
XmlNsFormvalue for the given namespace would be, so this method is implemented in rather ad-hoc way. It should work as what most people expect for simple cases.- Returns:
- never null.
-
dump
void dump(Result out) throws jakarta.xml.bind.JAXBException
Dumps this model into XML. For debug only. TODO: not sure if this actually works. We don't really know what are T,C.- Throws:
jakarta.xml.bind.JAXBException
-
-