|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.util.AbstractStringConverter
public abstract class 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 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 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
convertToObject(String)
convertToObject in interface ObjectStringConverterIllegalArgumentException - if this method is not capable of doing the transformation because of illegal
argumentso - 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
convertToString(Object)
convertToString in interface ObjectStringConverterIllegalArgumentException - if this method is not capable of doing the transformation because of illegal
argumentso - 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-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||