|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shindig.protocol.conversion.xstream.ClassFieldMapping
public class ClassFieldMapping
This represents the mapping between a class and a field, potentially with a parent element. It is used to define the element names that are used to serialize the contents of a class. eg
<outerobject>
<listcontainer>
<listelement>
<objectcontent>
</listelement>
</listcontainer>
...
</outerobject>
or (not currently used in OS)
<person>
<emails>
<email>
<type></type>
<value></value>
</email>
...
</emails>
...
</person>
For a more compact mapping ItemFieldMapping.
| Constructor Summary | |
|---|---|
ClassFieldMapping(String elementName,
Class<?> mappedClazz)
Create a simple element class mapping, applicable to all parent elements. |
|
ClassFieldMapping(String parentName,
String elementName,
Class<?> mappedClazz)
Create a element class mapping, that only applies to one parent element name. |
|
| Method Summary | |
|---|---|
String |
getElementName()
|
Class<?> |
getMappedClass()
|
boolean |
matches(String parent,
Class<?> type)
Does this ClassFieldMapping match the supplied parent and type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassFieldMapping(String elementName,
Class<?> mappedClazz)
elementName - the name of the elementmappedClazz - the class to map to the name of the element
public ClassFieldMapping(String parentName,
String elementName,
Class<?> mappedClazz)
parentName - the name of the parent element that this mapping applies toelementName - the name of the elementmappedClazz - the class to map to the name of the element| Method Detail |
|---|
public String getElementName()
public Class<?> getMappedClass()
public boolean matches(String parent,
Class<?> type)
parent - the parent element, which may be nulltype - the type of the field being stored
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||