|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.cli.TypeHandler
public class TypeHandler
This is a temporary implementation. TypeHandler will handle the pluggableness of OptionTypes and it will direct all of these types of conversion functionalities to ConvertUtils component in Commons alreayd. BeanUtils I think.
Constructor Summary | |
---|---|
TypeHandler()
|
Method Summary | |
---|---|
static Class |
createClass(String str)
Returns the class whose name is str . |
static Date |
createDate(String str)
Returns the date represented by str . |
static File |
createFile(String str)
Returns the File represented by str . |
static File[] |
createFiles(String str)
Returns the File[] represented by str . |
static Number |
createNumber(String str)
Create a number from a String. |
static Object |
createObject(String str)
Create an Object from the classname and empty constructor. |
static URL |
createURL(String str)
Returns the URL represented by str . |
static Object |
createValue(String str,
Class clazz)
Returns the Object of type clazz
with the value of str . |
static Object |
createValue(String str,
Object obj)
Returns the Object of type obj
with the value of str . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeHandler()
Method Detail |
---|
public static Object createValue(String str, Object obj)
Returns the Object
of type obj
with the value of str
.
str
- the command line valueobj
- the type of argument
obj
initialised with
the value of str
.public static Object createValue(String str, Class clazz)
Returns the Object
of type clazz
with the value of str
.
str
- the command line valueclazz
- the type of argument
clazz
initialised with
the value of str
.public static Object createObject(String str)
Create an Object from the classname and empty constructor.
str
- the argument value
public static Number createNumber(String str)
Create a number from a String.
str
- the value
str
, if str
is not a number, null is returned.public static Class createClass(String str)
Returns the class whose name is str
.
str
- the class name
public static Date createDate(String str)
Returns the date represented by str
.
str
- the date string
str
is a valid date string,
otherwise return null.public static URL createURL(String str)
Returns the URL represented by str
.
str
- the URL string
str
is well-formed, otherwise
return null.public static File createFile(String str)
Returns the File represented by str
.
str
- the File location
str
.public static File[] createFiles(String str)
Returns the File[] represented by str
.
str
- the paths to the files
str
.
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |