public interface Converter
Modifier and Type | Field and Description |
---|---|
static 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 |
---|---|
Object |
convert(Class<?> desiredType,
Object in)
Convert an object to the desired type.
|
CharSequence |
format(Object target,
int level,
Converter escape)
Convert an objet to a CharSequence object in the requested format.
|
static final String CONVERTER_CLASSES
static final int INSPECT
static final int LINE
static final int PART
Object convert(Class<?> desiredType, Object in) throws Exception
desiredType
- The type that the returned object can be assigned toin
- The object that must be convertedException
CharSequence format(Object target, int level, Converter escape) throws 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.Exception
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.