Module com.sun.xml.bind
Class RuntimeBuiltinLeafInfoImpl<T>
- java.lang.Object
-
- org.glassfish.jaxb.runtime.v2.model.impl.BuiltinLeafInfoImpl<Type,Class>
-
- org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl<T>
-
- All Implemented Interfaces:
Locatable,BuiltinLeafInfo<Type,Class>,LeafInfo<Type,Class>,MaybeElement<Type,Class>,NonElement<Type,Class>,TypeInfo<Type,Class>,Location,RuntimeBuiltinLeafInfo,RuntimeLeafInfo,RuntimeNonElement,RuntimeTypeInfo,Transducer<T>
public abstract class RuntimeBuiltinLeafInfoImpl<T> extends BuiltinLeafInfoImpl<Type,Class> implements RuntimeBuiltinLeafInfo, Transducer<T>
BuiltinLeafInfoImplwith a support for runtime.In particular this class defines
Transducers for the built-in types.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description static List<RuntimeBuiltinLeafInfoImpl<?>>builtinBeanInfosList of allRuntimeBuiltinLeafInfoImpls.static Map<Type,RuntimeBuiltinLeafInfoImpl<?>>LEAVESAll instances ofRuntimeBuiltinLeafInfoImpls keyed by their type.static StringMAP_ANYURI_TO_URIstatic RuntimeBuiltinLeafInfoImpl<String>STRINGstatic StringUSE_OLD_GMONTH_MAPPING-
Fields inherited from interface org.glassfish.jaxb.core.v2.model.core.NonElement
ANYTYPE_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanBeReferencedByIDREF()Deprecated.why are you calling a method whose return value is always known?voiddeclareNamespace(T o, XMLSerializer w)Declares the namespace URIs used in the given value tow.ClassgetClazz()The same asTypeInfo.getType()but returns the type as aClass.LocationgetLocation()TransducergetTransducer()This method doesn't take the reference properties defined onRuntimeNonElementRefinto account (such as ID-ness.)TypeTgetType()A reference to the representation of the type.QNamegetTypeName()QNamegetTypeName(T instance)Transducers implicitly work against a single XML type, but sometimes (most notablyXMLGregorianCalendar, an instance may choose different XML types.LocatablegetUpstream()booleanisSimpleType()StringtoString()booleanuseNamespace()If true, thisTransducerdoesn't declare any namespace, and thereforeTransducer.declareNamespace(Object, XMLSerializer)is no-op.-
Methods inherited from class org.glassfish.jaxb.runtime.v2.model.impl.BuiltinLeafInfoImpl
asElement, createLeaves, getElementName, getTypeNames, isElement
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.core.BuiltinLeafInfo
getTypeName
-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.annotation.Locatable
getLocation, getUpstream
-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.core.MaybeElement
asElement, getElementName, isElement
-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.core.NonElement
isSimpleType
-
Methods inherited from interface org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeLeafInfo
getTypeNames
-
Methods inherited from interface org.glassfish.jaxb.runtime.v2.runtime.Transducer
parse, print, writeLeafElement, writeText
-
Methods inherited from interface org.glassfish.jaxb.core.v2.model.core.TypeInfo
canBeReferencedByIDREF, getType
-
-
-
-
Field Detail
-
LEAVES
public static final Map<Type,RuntimeBuiltinLeafInfoImpl<?>> LEAVES
All instances ofRuntimeBuiltinLeafInfoImpls keyed by their type.
-
STRING
public static final RuntimeBuiltinLeafInfoImpl<String> STRING
-
builtinBeanInfos
public static final List<RuntimeBuiltinLeafInfoImpl<?>> builtinBeanInfos
List of allRuntimeBuiltinLeafInfoImpls.This corresponds to the built-in Java classes that are specified to be handled differently than ordinary classes. See table 8-2 "Mapping of Standard Java classes".
-
MAP_ANYURI_TO_URI
public static final String MAP_ANYURI_TO_URI
- See Also:
- Constant Field Values
-
USE_OLD_GMONTH_MAPPING
public static final String USE_OLD_GMONTH_MAPPING
- See Also:
- Constant Field Values
-
-
Method Detail
-
getClazz
public final Class getClazz()
Description copied from interface:RuntimeLeafInfoThe same asTypeInfo.getType()but returns the type as aClass.Note that the returned
Classobject does not necessarily represents a class declaration. It can be primitive types.- Specified by:
getClazzin interfaceRuntimeLeafInfo
-
getTransducer
public final Transducer getTransducer()
Description copied from interface:RuntimeLeafInfoThis method doesn't take the reference properties defined onRuntimeNonElementRefinto account (such as ID-ness.)- Specified by:
getTransducerin interfaceRuntimeLeafInfo- Specified by:
getTransducerin interfaceRuntimeNonElement- Returns:
- always non-null.
- See Also:
RuntimeNonElementRef.getTransducer()
-
useNamespace
public boolean useNamespace()
Description copied from interface:TransducerIf true, thisTransducerdoesn't declare any namespace, and thereforeTransducer.declareNamespace(Object, XMLSerializer)is no-op. It also means that theTransducer.parse(CharSequence)method won't use the context parameter.- Specified by:
useNamespacein interfaceTransducer<T>
-
declareNamespace
public void declareNamespace(T o, XMLSerializer w) throws AccessorException
Description copied from interface:TransducerDeclares the namespace URIs used in the given value tow.- Specified by:
declareNamespacein interfaceTransducer<T>- Parameters:
o- never be null.w- may be null if!{@link #useNamespace()}.- Throws:
AccessorException
-
getTypeName
public QName getTypeName(T instance)
Description copied from interface:TransducerTransducers implicitly work against a single XML type, but sometimes (most notablyXMLGregorianCalendar, an instance may choose different XML types.- Specified by:
getTypeNamein interfaceTransducer<T>- Returns:
- return non-null from this method allows transducers to specify the type it wants to marshal to. Most of the time this method returns null, in which case the implicitly associated type will be used.
-
getType
public TypeT getType()
A reference to the representation of the type.
-
canBeReferencedByIDREF
public final boolean canBeReferencedByIDREF()
Deprecated.why are you calling a method whose return value is always known?Leaf-type cannot be referenced from IDREF.- Specified by:
canBeReferencedByIDREFin interfaceTypeInfo<TypeT,ClassDeclT>
-
getTypeName
public QName getTypeName()
- Specified by:
getTypeNamein interfaceNonElement<TypeT,ClassDeclT>
-
getUpstream
public Locatable getUpstream()
- Specified by:
getUpstreamin interfaceLocatable
-
getLocation
public Location getLocation()
- Specified by:
getLocationin interfaceLocatable
-
isSimpleType
public boolean isSimpleType()
- Specified by:
isSimpleTypein interfaceNonElement<TypeT,ClassDeclT>
-
-