Classes | |
class | InheritanceMatch |
class | InternalXMLClassDescriptor |
Public Member Functions | |
CollectionHandler | getCollectionHandler (Class clazz) |
Static Public Member Functions | |
static boolean | isCollection (Class clazz) |
static boolean | namespaceEquals (String ns1, String ns2) |
static InheritanceMatch[] | searchInheritance (String name, String namespace, XMLClassDescriptor classDesc, ClassDescriptorResolver cdResolver) |
Static Public Attributes | |
static final String | XSI_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance" |
static final String | XSI_SCHEMA_LOCATION = "schemaLocation" |
static final String | XSI_NO_NAMESPACE_SCHEMA_LOCATION = "noNamespaceSchemaLocation" |
static final String | XML_LANG_ATTR = "xml:lang" |
static final String | LANG_ATTR = "lang" |
static final String | NIL_ATTR = "nil" |
static final String | XSI_NIL_ATTR = "xsi:nil" |
static final String | XML_SPACE_ATTR = "xml:space" |
static final String | SPACE_ATTR = "space" |
static final String | TYPE_ATTR = "type" |
static final String | TRUE_VALUE = "true" |
Static Package Functions | |
static boolean | isPrimitive (Class type) |
static final boolean | hasFieldsAtLocation (String location, XMLClassDescriptor classDesc) |
static boolean | primitiveOrWrapperEquals (Class a, Class b) |
Static Package Attributes | |
static final String | INTERNAL_XML_NAME = "-error-if-this-is-used-" |
static final String | JAVA_PREFIX = "java:" |
static final String | QNAME_NAME = "QName" |
static final XMLFieldDescriptor[] | NO_FIELD_DESCRIPTORS = new XMLFieldDescriptor[0] |
A core class for common code shared throughout the Marshalling Framework
CollectionHandler org.exolab.castor.xml.MarshalFramework.getCollectionHandler | ( | Class | clazz | ) |
Returns the CollectionHandler associated with the given collection, or null if no such handler exists.
static final boolean org.exolab.castor.xml.MarshalFramework.hasFieldsAtLocation | ( | String | location, | |
XMLClassDescriptor | classDesc | |||
) | [static, package] |
Returns true if any of the fields associated with the given XMLClassDescriptor are located at, or beneath, the given location.
location | the location to compare against | |
classDesc | the XMLClassDescriptor in which to check the field locations |
References org.exolab.castor.xml.XMLClassDescriptor.getAttributeDescriptors(), org.exolab.castor.xml.XMLClassDescriptor.getContentDescriptor(), org.exolab.castor.xml.XMLClassDescriptor.getElementDescriptors(), and org.exolab.castor.xml.XMLFieldDescriptor.getLocationPath().
static boolean org.exolab.castor.xml.MarshalFramework.isCollection | ( | Class | clazz | ) | [static] |
Returns true if the given Class is a considered a collection by the marshalling framework.
static boolean org.exolab.castor.xml.MarshalFramework.isPrimitive | ( | Class | type | ) | [static, package] |
Returns true if the given class should be treated as a primitive type. This method will return true for all Java primitive types, the set of primitive object wrappers, as well as Strings.
Referenced by org.exolab.castor.xml.UnmarshalHandler.endElement(), and org.exolab.castor.xml.MarshalFramework.primitiveOrWrapperEquals().
static boolean org.exolab.castor.xml.MarshalFramework.namespaceEquals | ( | String | ns1, | |
String | ns2 | |||
) | [static] |
Compares the given namespaces (as strings) for equality. null and empty values are considered equal.
ns1 | the namespace to compare to argument ns2 | |
ns2 | the namespace to compare to argument ns1 |
static boolean org.exolab.castor.xml.MarshalFramework.primitiveOrWrapperEquals | ( | Class | a, | |
Class | b | |||
) | [static, package] |
Returns true if the given classes are both the same primitive or primitive wrapper class. For exmaple, if class "a" is an int (Integer.TYPE) and class "b" is either an int or Integer.class then true will be returned, otherwise false.
References org.exolab.castor.xml.MarshalFramework.isPrimitive().
static InheritanceMatch [] org.exolab.castor.xml.MarshalFramework.searchInheritance | ( | String | name, | |
String | namespace, | |||
XMLClassDescriptor | classDesc, | |||
ClassDescriptorResolver | cdResolver | |||
) | [static] |
Search there is a field descriptor which can accept one of the class descriptor which match the given name and namespace.
References org.exolab.castor.xml.XMLClassDescriptor.getElementDescriptors(), org.exolab.castor.mapping.FieldDescriptor.getFieldType(), org.exolab.castor.mapping.ClassDescriptor.getJavaClass(), org.exolab.castor.xml.ClassDescriptorEnumeration.getNext(), org.exolab.castor.xml.XMLFieldDescriptor.getXMLName(), org.exolab.castor.xml.ClassDescriptorEnumeration.hasNext(), org.exolab.castor.xml.MarshalFramework.INTERNAL_XML_NAME, org.exolab.castor.xml.ClassDescriptorResolver.resolve(), and org.exolab.castor.xml.ClassDescriptorResolver.resolveAllByXMLName().
final String org.exolab.castor.xml.MarshalFramework.INTERNAL_XML_NAME = "-error-if-this-is-used-" [static, package] |
Referenced by org.exolab.castor.xml.MarshalFramework.searchInheritance().
final String org.exolab.castor.xml.MarshalFramework.JAVA_PREFIX = "java:" [static, package] |
The default prefix used for specifying the xsi:type as a classname instead of a schema name. This is a Castor specific hack.
final String org.exolab.castor.xml.MarshalFramework.LANG_ATTR = "lang" [static] |
The xml:lang attribute, without the "xml:" prefix.
final String org.exolab.castor.xml.MarshalFramework.NIL_ATTR = "nil" [static] |
The xsi:nil attribute, without the "xsi:" prefix.
final XMLFieldDescriptor [] org.exolab.castor.xml.MarshalFramework.NO_FIELD_DESCRIPTORS = new XMLFieldDescriptor[0] [static, package] |
An empty array of field descriptors
final String org.exolab.castor.xml.MarshalFramework.QNAME_NAME = "QName" [static, package] |
The name of the QName type
Referenced by org.exolab.castor.xml.UnmarshalHandler.endElement().
final String org.exolab.castor.xml.MarshalFramework.SPACE_ATTR = "space" [static] |
The xml:space attribute name, without the "xml:" prefix
final String org.exolab.castor.xml.MarshalFramework.TRUE_VALUE = "true" [static] |
The value of 'true'
final String org.exolab.castor.xml.MarshalFramework.TYPE_ATTR = "type" [static] |
The xsi:type attribute name, without the "xsi:" prefix
final String org.exolab.castor.xml.MarshalFramework.XML_LANG_ATTR = "xml:lang" [static] |
The xml:lang attribute name
final String org.exolab.castor.xml.MarshalFramework.XML_SPACE_ATTR = "xml:space" [static] |
The xml:space attribute name
final String org.exolab.castor.xml.MarshalFramework.XSI_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance" [static] |
The XSI Namespace URI
Referenced by org.exolab.castor.xml.Marshaller.setNoNamespaceSchemaLocation(), and org.exolab.castor.xml.Marshaller.setSchemaLocation().
final String org.exolab.castor.xml.MarshalFramework.XSI_NIL_ATTR = "xsi:nil" [static] |
final String org.exolab.castor.xml.MarshalFramework.XSI_NO_NAMESPACE_SCHEMA_LOCATION = "noNamespaceSchemaLocation" [static] |
The name of the no namespace schema location attribute
Referenced by org.exolab.castor.xml.Marshaller.setNoNamespaceSchemaLocation().
final String org.exolab.castor.xml.MarshalFramework.XSI_SCHEMA_LOCATION = "schemaLocation" [static] |
The name of the Schema location attribute
Referenced by org.exolab.castor.xml.Marshaller.setSchemaLocation().