Package org.apache.axis.description
Class TypeDesc
java.lang.Object
org.apache.axis.description.TypeDesc
- All Implemented Interfaces:
Serializable
A TypeDesc represents a Javainvalid input: '<'->XML data binding. It is essentially
a collection of FieldDescs describing how to map each field in a Java
class to XML.
- Author:
- Glen Daniels (gdaniels@apache.org)
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFieldDesc
(FieldDesc field) Add a new FieldDesc, keeping the convenience fields in sync.getAttributeNameForField
(String fieldName) Get the QName associated with this field, but only if it's marked as an attribute.getElementNameForField
(String fieldName) Get the QName associated with this field, but only if it's marked as an element.getFieldByName
(String name) Get a FieldDesc by field name.getFieldNameForAttribute
(QName qname) Get the field name associated with this QName, but only if it's marked as an attribute.getFieldNameForElement
(QName qname, boolean ignoreNS) Get the field name associated with this QName, but only if it's marked as an element.Obtain the current array of FieldDescsgetFields
(boolean searchParents) Get/Cache the property descriptor mapGet/Cache the property descriptorsstatic TypeDesc
getTypeDescForClass
(Class cls) Static function for centralizing access to type metadata for a given class.boolean
Do we have any FieldDescs marked as attributes?static void
registerTypeDescForClass
(Class cls, TypeDesc td) Static function to explicitly register a type description for a given class.void
Replace the array of FieldDescs, making sure we keep our convenience caches in sync.void
setXmlType
(QName xmlType)
-
Field Details
-
noClasses
-
noObjects
-
log
protected static org.apache.commons.logging.Log log
-
-
Constructor Details
-
TypeDesc
Creates a newTypeDesc
instance. The type desc can search the metadata of its type'sparent classes.- Parameters:
javaClass
- aClass
value
-
TypeDesc
Creates a newTypeDesc
instance.- Parameters:
javaClass
- aClass
valuecanSearchParents
- whether the type desc can search the metadata of its type's parent classes.
-
-
Method Details
-
registerTypeDescForClass
Static function to explicitly register a type description for a given class.- Parameters:
cls
- the Class we're registering metadata abouttd
- the TypeDesc containing the metadata
-
getTypeDescForClass
Static function for centralizing access to type metadata for a given class. This checks for a static getTypeDesc() method on the class or _Helper class. Eventually we may extend this to provide for external metadata config (via files sitting in the classpath, etc). -
getAnyDesc
-
getFields
Obtain the current array of FieldDescs -
getFields
-
setFields
Replace the array of FieldDescs, making sure we keep our convenience caches in sync. -
addFieldDesc
Add a new FieldDesc, keeping the convenience fields in sync. -
getElementNameForField
Get the QName associated with this field, but only if it's marked as an element. -
getAttributeNameForField
Get the QName associated with this field, but only if it's marked as an attribute. -
getFieldNameForElement
Get the field name associated with this QName, but only if it's marked as an element. If the "ignoreNS" argument is true, just compare localNames. -
getFieldNameForAttribute
Get the field name associated with this QName, but only if it's marked as an attribute. -
getFieldByName
Get a FieldDesc by field name. -
hasAttributes
public boolean hasAttributes()Do we have any FieldDescs marked as attributes? -
getXmlType
-
setXmlType
-
getPropertyDescriptors
Get/Cache the property descriptors- Returns:
- PropertyDescriptor
-
getAnyContentDescriptor
-
getPropertyDescriptorMap
Get/Cache the property descriptor map- Returns:
- Map with key=propertyName, value=descriptor
-