adams.flow.core
Class MOAPropertyValueConverter

java.lang.Object
  extended by adams.flow.core.AbstractPropertyValueConverter
      extended by adams.flow.core.MOAPropertyValueConverter
All Implemented Interfaces:
Serializable

public class MOAPropertyValueConverter
extends AbstractPropertyValueConverter

Handler for MOA classes.

Version:
$Revision: 5979 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  MOACommandLineHandler m_CommandLineHandler
          the commandline handler to use.
 
Constructor Summary
MOAPropertyValueConverter()
           
 
Method Summary
 Object convert(Class cls, String value)
          Converts the variable value into the appropriate object, if possible.
 boolean handles(Class cls)
          Checks whether this converter handles the particular class.
protected  void initialize()
          Initializes member variables.
 
Methods inherited from class adams.flow.core.AbstractPropertyValueConverter
getConverters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_CommandLineHandler

protected MOACommandLineHandler m_CommandLineHandler
the commandline handler to use.

Constructor Detail

MOAPropertyValueConverter

public MOAPropertyValueConverter()
Method Detail

initialize

protected void initialize()
Initializes member variables.

Overrides:
initialize in class AbstractPropertyValueConverter

handles

public boolean handles(Class cls)
Checks whether this converter handles the particular class.

Specified by:
handles in class AbstractPropertyValueConverter
Parameters:
cls - the class to check
Returns:
true if it supports it

convert

public Object convert(Class cls,
                      String value)
               throws Exception
Converts the variable value into the appropriate object, if possible.

Specified by:
convert in class AbstractPropertyValueConverter
Parameters:
cls - the type of the property
value - the string to convert
Returns:
the converted value or null if it cannot be converted
Throws:
Exception - if conversion fails with an error


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.