com.taco.text
Class StringToClassConverter
java.lang.Object
com.taco.text.AbstractStringToObjectConverter
com.taco.text.StringToClassConverter
- All Implemented Interfaces:
- IStringToObjectConverter, IObjectMapper, java.io.Serializable
public class StringToClassConverter
- extends AbstractStringToObjectConverter
- implements java.io.Serializable
An implementation of IStringToObjectConverter
that converts a
string, interpreted as a fully qualified class name, into a class object.
- See Also:
- Serialized Form
Constructor Summary |
protected |
StringToClassConverter()
The sole constructor is protected because this is a singleton. |
Method Summary |
static void |
main(java.lang.String[] args)
A simple test program that gets the class object for the first
command-line argument. |
java.lang.Object |
toObject(java.lang.String s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
public static final StringToClassConverter instance
- The singleton instance of this class.
StringToClassConverter
protected StringToClassConverter()
- The sole constructor is protected because this is a singleton.
toObject
public java.lang.Object toObject(java.lang.String s)
throws java.text.ParseException
- Specified by:
toObject
in interface IStringToObjectConverter
- Throws:
java.text.ParseException
main
public static void main(java.lang.String[] args)
- A simple test program that gets the class object for the first
command-line argument.