|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis.description.TypeDesc
A TypeDesc represents a Java<->XML data binding. It is essentially a collection of FieldDescs describing how to map each field in a Java class to XML.
Field Summary | |
static java.lang.Class[] |
noClasses
|
static java.lang.Object[] |
noObjects
|
Constructor Summary | |
TypeDesc(java.lang.Class javaClass)
Creates a new TypeDesc instance. |
|
TypeDesc(java.lang.Class javaClass,
boolean canSearchParents)
Creates a new TypeDesc instance. |
Method Summary | |
void |
addFieldDesc(FieldDesc field)
Add a new FieldDesc, keeping the convenience fields in sync. |
BeanPropertyDescriptor |
getAnyContentDescriptor()
|
BeanPropertyDescriptor |
getAnyDesc()
|
QName |
getAttributeNameForField(java.lang.String fieldName)
Get the QName associated with this field, but only if it's marked as an attribute. |
QName |
getElementNameForField(java.lang.String fieldName)
Get the QName associated with this field, but only if it's marked as an element. |
FieldDesc |
getFieldByName(java.lang.String name)
Get a FieldDesc by field name. |
java.lang.String |
getFieldNameForAttribute(QName qname)
Get the field name associated with this QName, but only if it's marked as an attribute. |
java.lang.String |
getFieldNameForElement(QName qname,
boolean ignoreNS)
Get the field name associated with this QName, but only if it's marked as an element. |
FieldDesc[] |
getFields()
Obtain the current array of FieldDescs |
FieldDesc[] |
getFields(boolean searchParents)
|
java.util.Map |
getPropertyDescriptorMap()
Get/Cache the property descriptor map |
BeanPropertyDescriptor[] |
getPropertyDescriptors()
Get/Cache the property descriptors |
static TypeDesc |
getTypeDescForClass(java.lang.Class cls)
Static function for centralizing access to type metadata for a given class. |
QName |
getXmlType()
|
boolean |
hasAttributes()
Do we have any FieldDescs marked as attributes? |
static void |
registerTypeDescForClass(java.lang.Class cls,
TypeDesc td)
Static function to explicitly register a type description for a given class. |
void |
setFields(FieldDesc[] newFields)
Replace the array of FieldDescs, making sure we keep our convenience caches in sync. |
void |
setXmlType(QName xmlType)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.Class[] noClasses
public static final java.lang.Object[] noObjects
Constructor Detail |
public TypeDesc(java.lang.Class javaClass)
TypeDesc
instance. The type desc can search
the metadata of its type'sparent classes.
javaClass
- a Class
valuepublic TypeDesc(java.lang.Class javaClass, boolean canSearchParents)
TypeDesc
instance.
javaClass
- a Class
valuecanSearchParents
- whether the type desc can search the metadata of
its type's parent classes.Method Detail |
public static void registerTypeDescForClass(java.lang.Class cls, TypeDesc td)
cls
- the Class we're registering metadata abouttd
- the TypeDesc containing the metadatapublic static TypeDesc getTypeDescForClass(java.lang.Class cls)
public BeanPropertyDescriptor getAnyDesc()
public FieldDesc[] getFields()
public FieldDesc[] getFields(boolean searchParents)
public void setFields(FieldDesc[] newFields)
public void addFieldDesc(FieldDesc field)
public QName getElementNameForField(java.lang.String fieldName)
public QName getAttributeNameForField(java.lang.String fieldName)
public java.lang.String getFieldNameForElement(QName qname, boolean ignoreNS)
public java.lang.String getFieldNameForAttribute(QName qname)
public FieldDesc getFieldByName(java.lang.String name)
public boolean hasAttributes()
public QName getXmlType()
public void setXmlType(QName xmlType)
public BeanPropertyDescriptor[] getPropertyDescriptors()
public BeanPropertyDescriptor getAnyContentDescriptor()
public java.util.Map getPropertyDescriptorMap()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |