public class TypeDescription extends Object
Modifier and Type | Field and Description |
---|---|
protected BeanAccess |
beanAccess |
protected Set<String> |
excludes |
protected String[] |
includes |
Constructor and Description |
---|
TypeDescription(Class<? extends Object> clazz) |
TypeDescription(Class<? extends Object> clazz,
Class<?> impl) |
TypeDescription(Class<? extends Object> clazz,
String tag) |
TypeDescription(Class<? extends Object> clazz,
Tag tag) |
TypeDescription(Class<? extends Object> clazz,
Tag tag,
Class<?> impl) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyParameters(String pName,
Class<?>... classes)
Adds new substitute for property
pName parameterized by
classes to this TypeDescription . |
Object |
finalizeConstruction(Object obj)
Is invoked after entity is filled with values from deserialized YAML
|
Class<? extends Object> |
getListPropertyType(String property)
Deprecated.
|
Class<? extends Object> |
getMapKeyType(String property)
Deprecated.
|
Class<? extends Object> |
getMapValueType(String property)
Deprecated.
|
Set<Property> |
getProperties() |
Property |
getProperty(String name) |
Tag |
getTag()
Get tag which shall be used to load or dump the type (class).
|
Class<? extends Object> |
getType()
Get represented type (class)
|
Object |
newInstance(Node node)
This method should be overridden for TypeDescription implementations that are supposed to implement
instantiation logic that is different from default one as implemented in YAML constructors.
|
Object |
newInstance(String propertyName,
Node node) |
void |
putListPropertyType(String property,
Class<? extends Object> type)
Deprecated.
|
void |
putMapPropertyType(String property,
Class<? extends Object> key,
Class<? extends Object> value)
Deprecated.
|
void |
setExcludes(String... propNames) |
void |
setIncludes(String... propNames) |
boolean |
setProperty(Object targetBean,
String propertyName,
Object value) |
void |
setPropertyUtils(PropertyUtils propertyUtils) |
void |
setTag(String tag)
Deprecated.
it will be removed because it is not used
|
void |
setTag(Tag tag)
Deprecated.
it will be removed because it is not used
|
boolean |
setupPropertyType(String key,
Node valueNode) |
void |
substituteProperty(PropertySubstitute substitute) |
void |
substituteProperty(String pName,
Class<?> pType,
String getter,
String setter,
Class<?>... argParams)
Adds property substitute for
pName |
String |
toString() |
protected String[] includes
protected BeanAccess beanAccess
public Tag getTag()
@Deprecated public void setTag(Tag tag)
tag
- - local or global tag@Deprecated public void setTag(String tag)
tag
- - local or global tagpublic Class<? extends Object> getType()
@Deprecated public void putListPropertyType(String property, Class<? extends Object> type)
List
.property
- name of the JavaBean propertytype
- class of List values@Deprecated public Class<? extends Object> getListPropertyType(String property)
property
- property name@Deprecated public void putMapPropertyType(String property, Class<? extends Object> key, Class<? extends Object> value)
Map
.property
- property name of this JavaBeankey
- class of keys in Mapvalue
- class of values in Map@Deprecated public Class<? extends Object> getMapKeyType(String property)
property
- property name of this JavaBean@Deprecated public Class<? extends Object> getMapValueType(String property)
property
- property name of this JavaBeanpublic void addPropertyParameters(String pName, Class<?>... classes)
pName
parameterized by
classes
to this TypeDescription
. If
pName
has been added before - updates parameters with
classes
.pName
- - parameter nameclasses
- - parameterized bypublic void substituteProperty(String pName, Class<?> pType, String getter, String setter, Class<?>... argParams)
pName
pName
- property namepType
- property typegetter
- method name for gettersetter
- method name for setterargParams
- actual types for parameterized type (List<?>, Map<?>)public void substituteProperty(PropertySubstitute substitute)
public void setPropertyUtils(PropertyUtils propertyUtils)
public void setIncludes(String... propNames)
public void setExcludes(String... propNames)
public boolean setProperty(Object targetBean, String propertyName, Object value) throws Exception
Exception
public Object newInstance(Node node)
node
- - node to construct the instance fromCopyright © 2008–2020. All rights reserved.