public interface Converter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONVERTER_CLASSES
This property is a string, or array of strings, and defines the classes
or interfaces that this converter recognizes.
|
static int |
INSPECT
Print the object in detail.
|
static int |
LINE
Print the object as a row in a table.
|
static int |
PART
Print the value in a small format so that it is identifiable.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
convert(java.lang.Class<?> desiredType,
java.lang.Object in)
Convert an object to the desired type.
|
java.lang.CharSequence |
format(java.lang.Object target,
int level,
Converter escape)
Convert an objet to a CharSequence object in the requested format.
|
static final java.lang.String CONVERTER_CLASSES
static final int INSPECT
static final int LINE
static final int PART
java.lang.Object convert(java.lang.Class<?> desiredType, java.lang.Object in) throws java.lang.Exception
desiredType
- The type that the returned object can be assigned toin
- The object that must be convertedjava.lang.Exception
java.lang.CharSequence format(java.lang.Object target, int level, Converter escape) throws java.lang.Exception
target
- The object to be converted to a Stringlevel
- One of INSPECT, LINE, or PART.escape
- Use this object to format sub ordinate objects.java.lang.Exception
Copyright © 2012. All Rights Reserved.