public interface IlpTypeConverter
IlpContext
Modifier and Type | Method and Description |
---|---|
Object |
convertTo(Class type,
Object value)
General conversion method to convert a non-null value.
|
Object |
createJavaInstance(Class type,
String value)
Creates a Java instance from a class type.
|
String |
createStringValue(Class type,
Object value)
Creates a
String value from a general Java
Object . |
IlpSAXSerializable |
getAttributeValueHandler(Class attributeValueClass)
Returns the way an attribute should be read from or written in XML.
|
Object createJavaInstance(Class type, String value)
IlEnum
, dates, colors and fonts are specifically supported.
Icons are also specifically supported to add a full path to the icon name.
Otherwise, all Java basic types and any Java class which has
a string constructor are supported.type
- The class of the instance to be created.value
- The value to be assigned to the new instance.String createStringValue(Class type, Object value)
String
value from a general Java
Object
.
This method produces string values that can be used in
an XML file. Specifically, dates, colors and fonts produce strings that are
correctly formatted for use in data storage XML files. Any types that are
not specifically handled will return the result from calling
toString()
on the value.
type
- Target class to create the string for. The type may be
null
for general conversion. You can specify a different
value if the target type does not correspond to the current value class.value
- The instance to be converted to a string value.Object convertTo(Class type, Object value)
type
- Target class to convert.value
- The instance to be converted.IlpSAXSerializable getAttributeValueHandler(Class attributeValueClass)
attributeValueClass
- The class of the attribute to be read from or written in XML.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.