Top Description Inners Fields Constructors Methods
org.glassfish.jaxb.runtime.v2.model.impl

public abstract Class RuntimeBuiltinLeafInfoImpl<T>

extends BuiltinLeafInfoImpl<Type, Class<T>>
implements RuntimeBuiltinLeafInfo, Transducer<T>
Class Inheritance
All Implemented Interfaces
org.glassfish.jaxb.runtime.v2.runtime.Transducer, org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeBuiltinLeafInfo, org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeLeafInfo, org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeNonElement, org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeTypeInfo, org.glassfish.jaxb.core.v2.model.core.TypeInfo, org.glassfish.jaxb.core.v2.model.annotation.Locatable, org.glassfish.jaxb.core.v2.model.core.NonElement, org.glassfish.jaxb.core.v2.model.core.LeafInfo, org.glassfish.jaxb.core.v2.model.core.MaybeElement, org.glassfish.jaxb.core.v2.model.core.BuiltinLeafInfo
Known Direct Subclasses
org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl.StringImpl, org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl.PcdataImpl
Imports
com.sun.istack.ByteArrayDataSource, org.glassfish.jaxb.core.Utils, .WhiteSpaceProcessor, org.glassfish.jaxb.runtime.DatatypeConverterImpl, org.glassfish.jaxb.runtime.api.AccessorException, org.glassfish.jaxb.core.v2.TODO, org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeBuiltinLeafInfo, org.glassfish.jaxb.runtime.v2.runtime.Name, .Transducer, .XMLSerializer, org.glassfish.jaxb.runtime.v2.runtime.output.Pcdata, org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Base64Data, .UnmarshallingContext, org.glassfish.jaxb.runtime.v2.util.ByteArrayOutputStreamEx, .DataSourceSource, jakarta.activation.DataHandler, .DataSource, .MimeType, .MimeTypeParseException, jakarta.xml.bind.ValidationEvent, jakarta.xml.bind.helpers.ValidationEventImpl, org.xml.sax.SAXException, javax.imageio.ImageIO, .ImageWriter, javax.imageio.stream.ImageOutputStream, javax.xml.XMLConstants, javax.xml.datatype.DatatypeConstants, .Duration, .XMLGregorianCalendar, javax.xml.namespace.QName, javax.xml.stream.XMLStreamException, javax.xml.transform.OutputKeys, .Source, .Transformer, .TransformerException, javax.xml.transform.stream.StreamResult, java.awt.*, java.awt.image.BufferedImage, java.io.*, java.lang.reflect.Type, java.math.BigDecimal, .BigInteger, java.net.MalformedURLException, .URI, .URISyntaxException, .URL, java.security.AccessController, .PrivilegedAction, java.util.List, java.util.*, java.util.logging.Level, .Logger

BuiltinLeafInfoImpl with a support for runtime.

In particular this class defines Transducers for the built-in types.

Author
Kohsuke Kawaguchi

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract static class
RuntimeBuiltinLeafInfoImpl.PcdataImpl<T>

Those built-in types that print to Pcdata.

private abstract static class
RuntimeBuiltinLeafInfoImpl.StringImpl<T>

Those built-in types that print to String.

private static class
private static class

Field Summary

Modifier and TypeField and Description
public static final List<RuntimeBuiltinLeafInfoImpl<?>>
private static final String
public static final Map<Type, RuntimeBuiltinLeafInfoImpl<?>>
LEAVES

All instances of RuntimeBuiltinLeafInfoImpls keyed by their type.

private static final Logger
public static final String
public static final RuntimeBuiltinLeafInfoImpl<String>
public static final String
private static final Map<QName, Integer>
xmlGregorianCalendarFieldRef

Field designations for XMLGregorianCalendar format string.

private static final Map<QName, String>

Constructor Summary

AccessConstructor and Description
private
RuntimeBuiltinLeafInfoImpl(Class<T> type, QName... typeNames)

Method Summary

Modifier and TypeMethod and Description
private static void
private static QName
createXS(String typeName)

public void
declareNamespace(T o, XMLSerializer w)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.declareNamespace.

Declares the namespace URIs used in the given value to w.

private static byte[]
public final Class<T>
public final <V> Transducer<V>
getTransducer()

Implements org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeLeafInfo.getTransducer.

This method doesn't take the reference properties defined on RuntimeNonElementRef into account (such as ID-ness.)

public QName
getTypeName(T instance)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.getTypeName.

Transducers implicitly work against a single XML type, but sometimes (most notably XMLGregorianCalendar, an instance may choose different XML types.

public boolean
useNamespace()

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.useNamespace.

If true, this doesn't declare any namespace, and therefore declareNamespace(Object, XMLSerializer) is no-op.

Inherited from org.glassfish.jaxb.runtime.v2.model.impl.BuiltinLeafInfoImpl:
asElementcreateLeavesgetElementNamegetTypeNamesisElement

Field Detail

builtinBeanInfosback to summary
public static final List<RuntimeBuiltinLeafInfoImpl<?>> builtinBeanInfos

List of all RuntimeBuiltinLeafInfoImpls.

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".

DATEback to summary
private static final String DATE
LEAVESback to summary
public static final Map<Type, RuntimeBuiltinLeafInfoImpl<?>> LEAVES

All instances of RuntimeBuiltinLeafInfoImpls keyed by their type.

loggerback to summary
private static final Logger logger
MAP_ANYURI_TO_URIback to summary
public static final String MAP_ANYURI_TO_URI
STRINGback to summary
public static final RuntimeBuiltinLeafInfoImpl<String> STRING
USE_OLD_GMONTH_MAPPINGback to summary
public static final String USE_OLD_GMONTH_MAPPING
xmlGregorianCalendarFieldRefback to summary
private static final Map<QName, Integer> xmlGregorianCalendarFieldRef

Field designations for XMLGregorianCalendar format string. sec 0x0000001 min 0x0000010 hrs 0x0000100 day 0x0001000 month 0x0010000 year 0x0100000 timezone 0x1000000

xmlGregorianCalendarFormatStringback to summary
private static final Map<QName, String> xmlGregorianCalendarFormatString

Format string for the XMLGregorianCalendar.

Constructor Detail

RuntimeBuiltinLeafInfoImplback to summary
private RuntimeBuiltinLeafInfoImpl(Class<T> type, QName... typeNames)

Method Detail

checkXmlGregorianCalendarFieldRefback to summary
private static void checkXmlGregorianCalendarFieldRef(QName type, XMLGregorianCalendar cal) throws MarshalException
createXSback to summary
private static QName createXS(String typeName)
declareNamespaceback to summary
public void declareNamespace(T o, XMLSerializer w) throws AccessorException

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.declareNamespace.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.declareNamespace.

Declares the namespace URIs used in the given value to w.

Annotations
@Override
decodeBase64back to summary
private static byte[] decodeBase64(CharSequence text)
Annotations
@SuppressWarnings:deprecation
getClazzback to summary
public final Class<T> getClazz()

Implements org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeLeafInfo.getClazz.

Doc from org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeLeafInfo.getClazz.

The same as getType() but returns the type as a Class.

Note that the returned Class object does not necessarily represents a class declaration. It can be primitive types.

Annotations
@Override
getTransducerback to summary
public final <V> Transducer<V> getTransducer()

Implements org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeLeafInfo.getTransducer.

Doc from org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeNonElement.getTransducer.

This method doesn't take the reference properties defined on RuntimeNonElementRef into account (such as ID-ness.)

Annotations
@Override
@SuppressWarnings:unchecked
getTypeNameback to summary
public QName getTypeName(T instance)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.getTypeName.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.getTypeName.

Transducers implicitly work against a single XML type, but sometimes (most notably XMLGregorianCalendar, an instance may choose different XML types.

Annotations
@Override
useNamespaceback to summary
public boolean useNamespace()

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.useNamespace.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.useNamespace.

If true, this doesn't declare any namespace, and therefore declareNamespace(Object, XMLSerializer) is no-op. It also means that the parse(CharSequence) method won't use the context parameter.

Annotations
@Override
org.glassfish.jaxb.runtime.v2.model.impl back to summary

private abstract Class RuntimeBuiltinLeafInfoImpl.PcdataImpl<T>

extends RuntimeBuiltinLeafInfoImpl<T>
Class Inheritance

Those built-in types that print to Pcdata.

Field Summary

Inherited from org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl:
builtinBeanInfosLEAVESMAP_ANYURI_TO_URISTRINGUSE_OLD_GMONTH_MAPPING

Constructor Summary

AccessConstructor and Description
protected
PcdataImpl(Class<T> type, QName... typeNames)

Method Summary

Modifier and TypeMethod and Description
public abstract Pcdata
print(T o)

Redeclares org.glassfish.jaxb.runtime.v2.runtime.Transducer.print.

Converts the given value to its lexical representation.

public final void
public final void
writeText(XMLSerializer w, T o, String fieldName)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Sends the result of the print(Object) operation to one of the XMLSerializer#text(String, String) method, but with the best representation of the value, not necessarily String.

Inherited from org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl:
declareNamespacegetClazzgetTransducergetTypeNameuseNamespace

Constructor Detail

PcdataImplback to summary
protected PcdataImpl(Class<T> type, QName... typeNames)

Method Detail

printback to summary
public abstract Pcdata print(T o) throws AccessorException

Redeclares org.glassfish.jaxb.runtime.v2.runtime.Transducer.print.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.print.

Converts the given value to its lexical representation.

Annotations
@Override
writeLeafElementback to summary
public final void writeLeafElement(XMLSerializer w, Name tagName, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeLeafElement.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeLeafElement.

Sends the result of the print(Object) operation to one of the XMLSerializer#leafElement(Name, String, String) method. but with the best representation of the value, not necessarily String.

Annotations
@Override
writeTextback to summary
public final void writeText(XMLSerializer w, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Sends the result of the print(Object) operation to one of the XMLSerializer#text(String, String) method, but with the best representation of the value, not necessarily String.

Annotations
@Override
org.glassfish.jaxb.runtime.v2.model.impl back to summary

private abstract Class RuntimeBuiltinLeafInfoImpl.StringImpl<T>

extends RuntimeBuiltinLeafInfoImpl<T>
Class Inheritance
Known Direct Subclasses
org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl.UUIDImpl, org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl.StringImplImpl

Those built-in types that print to String.

Field Summary

Inherited from org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl:
builtinBeanInfosLEAVESMAP_ANYURI_TO_URISTRINGUSE_OLD_GMONTH_MAPPING

Constructor Summary

AccessConstructor and Description
protected
StringImpl(Class<T> type, QName... typeNames)

Method Summary

Modifier and TypeMethod and Description
public abstract String
print(T o)

Redeclares org.glassfish.jaxb.runtime.v2.runtime.Transducer.print.

Converts the given value to its lexical representation.

public void
public void
writeText(XMLSerializer w, T o, String fieldName)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Sends the result of the print(Object) operation to one of the XMLSerializer#text(String, String) method, but with the best representation of the value, not necessarily String.

Inherited from org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl:
declareNamespacegetClazzgetTransducergetTypeNameuseNamespace

Constructor Detail

StringImplback to summary
protected StringImpl(Class<T> type, QName... typeNames)

Method Detail

printback to summary
public abstract String print(T o) throws AccessorException

Redeclares org.glassfish.jaxb.runtime.v2.runtime.Transducer.print.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.print.

Converts the given value to its lexical representation.

Annotations
@Override
writeLeafElementback to summary
public void writeLeafElement(XMLSerializer w, Name tagName, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeLeafElement.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeLeafElement.

Sends the result of the print(Object) operation to one of the XMLSerializer#leafElement(Name, String, String) method. but with the best representation of the value, not necessarily String.

Annotations
@Override
writeTextback to summary
public void writeText(XMLSerializer w, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Sends the result of the print(Object) operation to one of the XMLSerializer#text(String, String) method, but with the best representation of the value, not necessarily String.

Annotations
@Override
org.glassfish.jaxb.runtime.v2.model.impl back to summary

private Class RuntimeBuiltinLeafInfoImpl.StringImplImpl

extends RuntimeBuiltinLeafInfoImpl.StringImpl<String>
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
StringImplImpl(Class<T> type, QName[] typeNames)

Method Summary

Modifier and TypeMethod and Description
public String
parse(CharSequence text)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.parse.

Converts the lexical representation to a value object.

public String
public final void
public final void
writeText(XMLSerializer w, String o, String fieldName)

Overrides org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl.StringImpl.writeText.

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Sends the result of the print(Object) operation to one of the XMLSerializer#text(String, String) method, but with the best representation of the value, not necessarily String.

Constructor Detail

StringImplImplback to summary
public StringImplImpl(Class<T> type, QName[] typeNames)

Method Detail

parseback to summary
public String parse(CharSequence text)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.parse.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.parse.

Converts the lexical representation to a value object.

Annotations
@Override
printback to summary
public String print(String s)

Implements abstract org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl.StringImpl.print.

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.print.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.print.

Converts the given value to its lexical representation.

Annotations
@Override
writeLeafElementback to summary
public final void writeLeafElement(XMLSerializer w, Name tagName, String o, String fieldName) throws IOException, SAXException, XMLStreamException

Overrides org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl.StringImpl.writeLeafElement.

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeLeafElement.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeLeafElement.

Sends the result of the print(Object) operation to one of the XMLSerializer#leafElement(Name, String, String) method. but with the best representation of the value, not necessarily String.

Annotations
@Override
writeTextback to summary
public final void writeText(XMLSerializer w, String o, String fieldName) throws IOException, SAXException, XMLStreamException

Overrides org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl.StringImpl.writeText.

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Sends the result of the print(Object) operation to one of the XMLSerializer#text(String, String) method, but with the best representation of the value, not necessarily String.

Annotations
@Override
org.glassfish.jaxb.runtime.v2.model.impl back to summary

private Class RuntimeBuiltinLeafInfoImpl.UUIDImpl

extends RuntimeBuiltinLeafInfoImpl.StringImpl<UUID>
Class Inheritance

RuntimeBuiltinLeafInfoImpl for UUID. This class is given a name so that failing to load this class won't cause a fatal problem.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public UUID
parse(CharSequence text)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.parse.

Converts the lexical representation to a value object.

public String
Inherited from org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl.StringImpl:
writeLeafElementwriteText

Constructor Detail

UUIDImplback to summary
public UUIDImpl()

Method Detail

parseback to summary
public UUID parse(CharSequence text) throws SAXException

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.parse.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.parse.

Converts the lexical representation to a value object.

Annotations
@Override
Exceptions
SAXException:
if the lexical form is incorrect, the error should be reported and SAXException may thrown (or it can return null to recover.)
printback to summary
public String print(UUID v)

Implements abstract org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl.StringImpl.print.

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.print.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.print.

Converts the given value to its lexical representation.

Annotations
@Override