@ALDDataConverterProvider public class ALDNumberConverter extends ALDOperator implements ALDDataConverter
ALDOperator.HidingMode, ALDOperator.HistoryConstructionMode
Modifier and Type | Field and Description |
---|---|
private static LinkedList<Class> |
numberClasses |
(package private) Object |
sourceObject |
(package private) Class<?> |
targetClass |
(package private) Object |
targetObject |
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider
providesMethodName
Constructor and Description |
---|
ALDNumberConverter()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
convert(Object sourceObject,
Type[] sourceTypes,
Class<?> targetClass,
Type[] targetTypes)
Convert the
sourceObject into an object of class
targetClass . |
protected void |
operate()
This method does the actual work and needs to be implemented by every
subclass.
|
Collection<ALDDataConverterManager.ALDSourceTargetClassPair> |
providedClasses()
Announce all classes pairs which the converter can handle.
|
boolean |
supportConversion(Class<?> sourceClass,
Type[] sourceTypes,
Class<?> targetClass,
Type[] targetTypes)
Does the converter support this kind of conversion.
|
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getDocumentation, getHidingMode, getInactiveParameterNames, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterDescriptorUnconditioned, getParameterNames, getParameterUnconditioned, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, hasInOutParameters, hasParameter, isAnnotatedParameter, isConfigured, print, print, print, printInterface, printInterface, readHistory, readResolve, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, removeParameter, runOp, runOp, runOp, setConstructionMode, setConstructionMode, setConstructionMode, setHidingMode, setName, setParameter, setParameterUnconditioned, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
@Parameter(label="Source Object", required=true, direction=IN, supplemental=false, description="Source object to convert.") Object sourceObject
@Parameter(label="Target Class", required=true, direction=IN, supplemental=false, description="Class of target object.") Class<?> targetClass
@Parameter(label="Target Object", direction=OUT, supplemental=false, description="Target object.") Object targetObject
private static LinkedList<Class> numberClasses
public ALDNumberConverter() throws ALDOperatorException
ALDOperatorException
public Collection<ALDDataConverterManager.ALDSourceTargetClassPair> providedClasses()
ALDDataConverter
Note: for parameterized types there is only indicates that the converter can in principle handle conversion for these classes but depending und the type parameters still may refuse to convert
providedClasses
in interface ALDDataConverter
public boolean supportConversion(Class<?> sourceClass, Type[] sourceTypes, Class<?> targetClass, Type[] targetTypes)
ALDDataConverter
supportConversion
in interface ALDDataConverter
public Object convert(Object sourceObject, Type[] sourceTypes, Class<?> targetClass, Type[] targetTypes) throws ALDDataConverterException
ALDDataConverter
sourceObject
into an object of class
targetClass
.convert
in interface ALDDataConverter
ALDDataConverterException
protected void operate() throws ALDOperatorException
ALDOperator
operate
in class ALDOperator
ALDOperatorException
Copyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.