|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.martiansoftware.jsap.StringParser com.martiansoftware.jsap.stringparsers.ClassStringParser
A StringParser
for parsing Class objects. The parse(arg) method calls
Class.forName(arg) and returns
the result. If any exceptions are thrown by Class.forName(), they are
encapsulated in a ParseException
and re-thrown.
Note: The Class.forName() call attempts to load the class from the same ClassLoader that loaded this StringParser.
StringParser
,
Class
Constructor Summary | |
ClassStringParser()
Deprecated. Use getParser() or, even better, JSAP.CLASS_PARSER . |
Method Summary | |
static ClassStringParser |
getParser()
Returns a ClassStringParser . |
Object |
parse(String arg)
Parses the specified argument into a Class object. |
Methods inherited from class com.martiansoftware.jsap.StringParser |
setUp, tearDown |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClassStringParser()
getParser()
or, even better, JSAP.CLASS_PARSER
.
Method Detail |
public static ClassStringParser getParser()
ClassStringParser
.
Convenient access to the only instance returned by
this method is available through
JSAP.CLASS_PARSER
.
ClassStringParser
.public Object parse(String arg) throws ParseException
parse
in class StringParser
arg
- the argument to parse
ParseException
- if Class.forName(arg)
throws an
exception.Class
,
StringParser.parse(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |