|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--y.util.AbstractStringConverter
This class is an abstract base class for classes implementing the ObjectStringConverter interface. Subclasses have to implement the two abstract methods only.
| Field Summary | |
protected Class |
forClass
the class type which can be converted by this instance |
| Constructor Summary | |
protected |
AbstractStringConverter(Class forClass)
Creates a new instance |
| Method Summary | |
protected abstract Object |
convertToObject(String o)
This method must be implemented by subclasses. o will never be the null
String |
Object |
convertToObject(String o,
Class asClass)
This method does some checks and then delegates the call to AbstractStringConverter.convertToObject(String) |
protected abstract String |
convertToString(Object o)
This method must be implemented by subclasses. o will never be the null
object. |
String |
convertToString(Object o,
Class asClass)
This method does some checks and then delegates the call to AbstractStringConverter.convertToString(Object) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Class forClass
| Constructor Detail |
protected AbstractStringConverter(Class forClass)
forClass - the class type| Method Detail |
public Object convertToObject(String o,
Class asClass)
throws IllegalArgumentException
AbstractStringConverter.convertToObject(String)
convertToObject in interface ObjectStringConverterIllegalArgumentExceptiono - the String to convertasClass - the type which should be generated by this method. the method is
free to create a more specific type, but that type must be assignment compatible
public String convertToString(Object o,
Class asClass)
throws IllegalArgumentException
AbstractStringConverter.convertToString(Object)
convertToString in interface ObjectStringConverterIllegalArgumentExceptiono - the object to convertasClass - the type which should be used to interpret the object, may be less specific than
the actual object's type
protected abstract Object convertToObject(String o)
throws IllegalArgumentException
null
String
IllegalArgumentException - if the method was unable to do the transformationo - the string representation
protected abstract String convertToString(Object o)
throws IllegalArgumentException
null
object.
IllegalArgumentException - if the method was unable to do the transformationo - the object
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||