asg.cliche
Interface InputConverter


public interface InputConverter

This interface is used by the Shell to support new argument types. It converts string to an object of given class.


Method Summary
 java.lang.Object convertInput(java.lang.String original, java.lang.Class toClass)
          String-to-someClass conversion method May throw any exception if string is considered invalid for given class; must do nothing but return null if doesn't recognize the toClass.
 

Method Detail

convertInput

java.lang.Object convertInput(java.lang.String original,
                              java.lang.Class toClass)
                              throws java.lang.Exception
String-to-someClass conversion method May throw any exception if string is considered invalid for given class; must do nothing but return null if doesn't recognize the toClass.

Parameters:
original - String to be converted
toClass - Class to be converted to
Returns:
Object of the class toClass or null, if don't know how to convert to given class
Throws:
java.lang.Exception
See Also:
Shell