org.yaml.snakeyaml
Class TypeDescription

java.lang.Object
  extended by org.yaml.snakeyaml.TypeDescription

public final class TypeDescription
extends Object

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)
 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 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

TypeDescription

public TypeDescription(Class<? extends Object> clazz,
                       Tag tag)

TypeDescription

public TypeDescription(Class<? extends Object> clazz,
                       String tag)

TypeDescription

public TypeDescription(Class<? extends Object> clazz)
Method Detail

getTag

public Tag getTag()
Get tag which shall be used to load or dump the type (class).

Returns:
tag to be used. It may be a tag for Language-Independent Types (http://www.yaml.org/type/)

setTag

public void setTag(Tag tag)
Set tag to be used to load or dump the type (class).

Parameters:
tag - local or global tag

setTag

public void setTag(String tag)

getType

public Class<? extends Object> getType()
Get represented type (class)

Returns:
type (class) to be described.

putListPropertyType

public void putListPropertyType(String property,
                                Class<? extends Object> type)
Specify that the property is a type-safe List.

Parameters:
property - name of the JavaBean property
type - class of List values

getListPropertyType

public Class<? extends Object> getListPropertyType(String property)
Get class of List values for provided JavaBean property.

Parameters:
property - property name
Returns:
class of List values

putMapPropertyType

public void putMapPropertyType(String property,
                               Class<? extends Object> key,
                               Class<? extends Object> value)
Specify that the property is a type-safe Map.

Parameters:
property - property name of this JavaBean
key - class of keys in Map
value - class of values in Map

getMapKeyType

public Class<? extends Object> getMapKeyType(String property)
Get keys type info for this JavaBean

Parameters:
property - property name of this JavaBean
Returns:
class of keys in the Map

getMapValueType

public Class<? extends Object> getMapValueType(String property)
Get values type info for this JavaBean

Parameters:
property - property name of this JavaBean
Returns:
class of values in the Map

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2011. All Rights Reserved.