|
antlraux package v0.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antlraux.clparse.TypeDealer
Conversion between Strings and java basic types is necessary along all the parsing. This static class encapsulated all the functionallity needed for doing that.
We will say that a char is valid if it represents one of the types supported by the parser. Otherwise it will be not valid.
Valid type chars are:
Constructor Summary | |
TypeDealer()
|
Method Summary | |
static void |
checkCharType(char type)
Checks if a char is valid. |
static void |
checkStringTypes(java.lang.String paramTypes)
Checks if a string contains only valid chars. |
protected static java.lang.String |
getStringOfTypes(java.lang.String types,
boolean commas)
Returns a string containing the names of the classes associated to a specification string. |
protected static java.lang.Class |
getTypeFromChar(char type)
Given a valid class specification, it returns its class. |
protected static java.lang.Class[] |
getTypesFromString(java.lang.String types)
Given a String of specification, it returns its table of types associated. |
static java.lang.Object |
objectFromString(java.lang.String source,
char type)
Tries to parse an object of the specified type from a specified String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TypeDealer()
Method Detail |
public static void checkStringTypes(java.lang.String paramTypes) throws CommandLineParserException
paramTypes
- The string to check.
CommandLineParserException
- If the string contains one not valid char at least.public static void checkCharType(char type) throws CommandLineParserException
type
- The char to check.
CommandLineParserException
- If type is not valid.public static java.lang.Object objectFromString(java.lang.String source, char type) throws CommandLineParserException
source
- The string to parse.type
- The type of the object that we want to parse.
CommandLineParserException
- If the parsing could not be done.protected static java.lang.Class getTypeFromChar(char type) throws CommandLineParserException
CommandLineParserException
- If type is not valid.protected static java.lang.Class[] getTypesFromString(java.lang.String types) throws CommandLineParserException
types
- The type specification String.
CommandLineParserException
- If types contains one not valid char.protected static java.lang.String getStringOfTypes(java.lang.String types, boolean commas) throws CommandLineParserException
types
- The string to check.commas
- If true, the names are separated by commas and spaces. Otherwise they are
only separated by spaces.
CommandLineParserException
- If types contains one not valid char at least.
|
antlraux package v0.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |