|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.yaml.snakeyaml.TypeDescription
public final class TypeDescription
Provides additional runtime information necessary to create a custom Java instance.
Constructor Summary | |
---|---|
TypeDescription(Class<? extends Object> clazz)
|
|
TypeDescription(Class<? extends Object> clazz,
String tag)
|
|
TypeDescription(Class<? extends Object> clazz,
Tag tag)
|
Method Summary | |
---|---|
Class<? extends Object> |
getListPropertyType(String property)
Get class of List values for provided JavaBean property. |
Class<? extends Object> |
getMapKeyType(String property)
Get keys type info for this JavaBean |
Class<? extends Object> |
getMapValueType(String property)
Get values type info for this JavaBean |
Tag |
getTag()
Get tag which shall be used to load or dump the type (class). |
Class<? extends Object> |
getType()
Get represented type (class) |
boolean |
isRoot()
Defines whether this type (class) is the root of the YAML document |
void |
putListPropertyType(String property,
Class<? extends Object> type)
Specify that the property is a type-safe List . |
void |
putMapPropertyType(String property,
Class<? extends Object> key,
Class<? extends Object> value)
Specify that the property is a type-safe Map . |
void |
setRoot(boolean root)
Specify whether this type (class) should be serve as the root of the YAML document |
void |
setTag(String tag)
|
void |
setTag(Tag tag)
Set tag to be used to load or dump the type (class). |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TypeDescription(Class<? extends Object> clazz, Tag tag)
public TypeDescription(Class<? extends Object> clazz, String tag)
public TypeDescription(Class<? extends Object> clazz)
Method Detail |
---|
public Tag getTag()
public void setTag(Tag tag)
tag
- local or global tagpublic void setTag(String tag)
public Class<? extends Object> getType()
public boolean isRoot()
public void setRoot(boolean root)
root
- true if this type shall be used as a root of object hierarchy.public void putListPropertyType(String property, Class<? extends Object> type)
List
.
property
- name of the JavaBean propertytype
- class of List valuespublic Class<? extends Object> getListPropertyType(String property)
property
- property name
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 Mappublic Class<? extends Object> getMapKeyType(String property)
property
- property name of this JavaBean
public Class<? extends Object> getMapValueType(String property)
property
- property name of this JavaBean
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |