Package jadex.xml
Class AttributeConverter
- java.lang.Object
-
- jadex.xml.AttributeConverter
-
- All Implemented Interfaces:
IObjectStringConverter
,IStringObjectConverter
,IAttributeConverter
public class AttributeConverter extends java.lang.Object implements IAttributeConverter
Converter for attributes. Consist of a string-object and a object-string converter. The first for reading the second for writing.
-
-
Field Summary
Fields Modifier and Type Field Description protected IObjectStringConverter
osconv
The object string converter.protected IStringObjectConverter
soconv
The string object converter.
-
Constructor Summary
Constructors Constructor Description AttributeConverter(IStringObjectConverter soconv, IObjectStringConverter osconv)
Create a new attribute converter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
convertObject(java.lang.Object val, java.lang.Object context)
Convert a value to a string type.java.lang.Object
convertString(java.lang.String val, java.lang.Object context)
Convert a string value to another type.
-
-
-
Field Detail
-
soconv
protected IStringObjectConverter soconv
The string object converter.
-
osconv
protected IObjectStringConverter osconv
The object string converter.
-
-
Constructor Detail
-
AttributeConverter
public AttributeConverter(IStringObjectConverter soconv, IObjectStringConverter osconv)
Create a new attribute converter.
-
-
Method Detail
-
convertString
public java.lang.Object convertString(java.lang.String val, java.lang.Object context) throws java.lang.Exception
Convert a string value to another type.- Specified by:
convertString
in interfaceIStringObjectConverter
- Parameters:
val
- The value to convert.- Throws:
java.lang.Exception
-
convertObject
public java.lang.String convertObject(java.lang.Object val, java.lang.Object context)
Convert a value to a string type.- Specified by:
convertObject
in interfaceIObjectStringConverter
- Parameters:
val
- The value to convert.
-
-