| 
 | 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  java.lang.Class | forClassthe class type which can be converted by this instance | 
| Constructor Summary | |
|---|---|
| protected  | AbstractStringConverter(java.lang.Class forClass)Creates a new instance | 
| Method Summary | |
|---|---|
| protected abstract  java.lang.Object | convertToObject(java.lang.String o)This method must be implemented by subclasses. o will never be the nullString | 
|  java.lang.Object | convertToObject(java.lang.String o,
                java.lang.Class asClass)This method does some checks and then delegates the call to convertToObject(String) | 
| protected abstract  java.lang.String | convertToString(java.lang.Object o)This method must be implemented by subclasses. o will never be the nullobject. | 
|  java.lang.String | convertToString(java.lang.Object o,
                java.lang.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 java.lang.Class forClass
| Constructor Detail | 
|---|
protected AbstractStringConverter(java.lang.Class forClass)
forClass - the class type| Method Detail | 
|---|
public java.lang.Object convertToObject(java.lang.String o,
                                        java.lang.Class asClass)
                                 throws java.lang.IllegalArgumentException
convertToObject(String)
convertToObject in interface ObjectStringConvertero - 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
java.lang.IllegalArgumentException - if this method is not capable of doing the transformation because of illegal
 arguments
public java.lang.String convertToString(java.lang.Object o,
                                        java.lang.Class asClass)
                                 throws java.lang.IllegalArgumentException
convertToString(Object)
convertToString in interface ObjectStringConvertero - the object to convertasClass - the type which should be used to interpret the object, may be less specific than
 the actual object's type
java.lang.IllegalArgumentException - if this method is not capable of doing the transformation because of illegal
 arguments
protected abstract java.lang.Object convertToObject(java.lang.String o)
                                             throws java.lang.IllegalArgumentException
null
 String
o - the string representation
java.lang.IllegalArgumentException - if the method was unable to do the transformation
protected abstract java.lang.String convertToString(java.lang.Object o)
                                             throws java.lang.IllegalArgumentException
null
 object.
o - the object
java.lang.IllegalArgumentException - if the method was unable to do the transformation| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||