public abstract class PropertyMapper extends Object
TagTextContentToProperty to map the text content of a tag
to a pojo's propertyAttributeValueToProperty to map the text content of a tag
to a pojo's property| Modifier and Type | Field and Description |
|---|---|
protected Class<?> |
containerType
the type of the pojo container of the property
|
protected PropertyDescriptor |
descriptor
the pojo's property descriptor
|
protected String |
name
name of tag.
|
protected boolean |
onlyOne
a flag to check to use only once the mapper.
|
protected String |
propertyName
the pojo's property to set
|
static com.google.common.base.Function<String,String> |
TAG_NAME_TRANSFORMER |
protected DataConverter |
type
the converter from xml to pojo's property type
|
| Modifier | Constructor and Description |
|---|---|
protected |
PropertyMapper(String tagName,
String propertyName,
Class<?> containerType,
DataConverter type,
boolean onlyOne,
PropertyDescriptor descriptor) |
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
getContainerType() |
protected abstract Object |
getDataFromXml(org.codehaus.plexus.util.xml.pull.XmlPullParser parser) |
PropertyDescriptor |
getDescriptor() |
protected static PropertyDescriptor |
getDescriptor(Class<?> containerType,
String propertyName) |
static String |
getMapperForAttribute(Class<?> type,
String attributeName) |
static String |
getMapperForTag(Class<?> type) |
String |
getName() |
String |
getPropertyName() |
String |
getTagName() |
DataConverter |
getType() |
protected String |
getXmlName() |
boolean |
isOnlyOne() |
protected void |
registerMapper(Map<String,PropertyMapper> allMappers,
Class<?> containerType,
String tagName,
String attributeName) |
void |
setProperty(Object src,
org.codehaus.plexus.util.xml.pull.XmlPullParser parser,
Set<String> parsed,
boolean strict) |
String |
toString() |
protected final String name
protected final String propertyName
protected final DataConverter type
protected final Class<?> containerType
protected final PropertyDescriptor descriptor
protected final boolean onlyOne
protected PropertyMapper(String tagName, String propertyName, Class<?> containerType, DataConverter type, boolean onlyOne, PropertyDescriptor descriptor)
protected String getXmlName()
protected abstract Object getDataFromXml(org.codehaus.plexus.util.xml.pull.XmlPullParser parser) throws Exception
Exceptionpublic void setProperty(Object src, org.codehaus.plexus.util.xml.pull.XmlPullParser parser, Set<String> parsed, boolean strict) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException
org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionIOExceptionpublic PropertyDescriptor getDescriptor()
public boolean isOnlyOne()
public String getPropertyName()
public String getTagName()
public DataConverter getType()
public Class<?> getContainerType()
public String getName()
public static String getMapperForAttribute(Class<?> type, String attributeName)
protected static PropertyDescriptor getDescriptor(Class<?> containerType, String propertyName) throws IntrospectionException
IntrospectionExceptionCopyright © 2009–2015 CodeLutin. All rights reserved.