1 package org.lcsim.job; 2 3 import org.jdom.Element; 4 import org.lcsim.util.xml.JDOMExpressionFactory; 5 6 /** 7 * Interface for converting from XML to typed objects for input to LCSim Drivers. 8 * 9 * @author jeremym 10 */ 11 public interface IParameterConverter { 12 13 /** 14 * This method returns true if the converter can handle the given type. 15 * 16 * @param propertyType The class of the parameter. 17 * @return True if converter handles the given type; False if no. 18 */ 19 public boolean handles(Class propertyType); 20 21 /** 22 * Convert an XML element parameter to a specific type and return as an Object. 23 * 24 * @param factory The expression factory to be used for variable evaluation. 25 * @param parameterElement The XML parameter data. 26 * @return Parameter converted to specific type. Returned as generic object. 27 */ 28 public Object convert(JDOMExpressionFactory factory, Element parameterElement); 29 }