org.formaria.aria.helper
Class ArgumentConverter

java.lang.Object
  extended by org.formaria.aria.helper.ArgumentConverter
Direct Known Subclasses:
ClassArgumentConverter

public abstract class ArgumentConverter
extends java.lang.Object

An interfaces for helpers that convert a string representation of type to a target type.

Copyright (c) Formaria Ltd.,
License: see license.txt


Constructor Summary
ArgumentConverter()
           
 
Method Summary
abstract  java.lang.Object convert(java.lang.String value)
          Convert a string value to a destination argument type
 boolean forType(java.lang.Class type)
          Is the conversion allowed for a particular context
abstract  java.lang.Class getTarget()
          Get the target class follwoing conversion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArgumentConverter

public ArgumentConverter()
Method Detail

getTarget

public abstract java.lang.Class getTarget()
Get the target class follwoing conversion


convert

public abstract java.lang.Object convert(java.lang.String value)
Convert a string value to a destination argument type

Parameters:
value -
Returns:

forType

public boolean forType(java.lang.Class type)
Is the conversion allowed for a particular context

Parameters:
type - the object type (class) where the argument will be used
Returns: