@ALDParametrizedClass public class ALDOpParameterDescriptor extends ALDParameterDescriptor implements Cloneable
A ALDOpParameterDescriptor
has a direction (IN, OUT, INOUT) and
a boolean indicating if this parameter is supplemental.
If field
is non null
then the value of the parameter
is a member variable of genuineInstance
of the operator.
This instance has to be supplied as argument when getting/setting the value.
If field
is null
then the value of the parameter
is not a member variable of the operators but is stored in the value
object.
Additionally a boolean indicating if the corresponding parameter is permanent, i.e. its descriptor may not be removed from the operator
Modifier and Type | Field and Description |
---|---|
protected Parameter.Direction |
direction
Direction of this parameter
|
protected Boolean |
permanent
If a parameter is declared as permanent it (reps. its descriptor) may not be removed
from the operator
|
protected Boolean |
supplemental
Is this a supplemental parameter
|
private Object |
value
Holds the value of the parameter.
|
callback, dataIOOrder, explanation, field, handlingMode, info, label, modifyParamMode, myclass, name, required
Modifier | Constructor and Description |
---|---|
protected |
ALDOpParameterDescriptor() |
|
ALDOpParameterDescriptor(String _name,
Parameter.Direction _direction,
Boolean _supplemental,
Class<?> cl,
String _explanation,
String _label,
boolean _required,
Field _field,
int guiOrder,
Parameter.ExpertMode mode,
Boolean _permanent,
String _callback,
Parameter.ParameterModificationMode modifiesParameterDefinitions,
boolean _info)
Construct a descriptor
|
Modifier and Type | Method and Description |
---|---|
ALDOpParameterDescriptor |
clone()
Clone an instance
|
ALDOpParameterDescriptor |
copy(Field _field) |
Parameter.Direction |
getDirection()
Returns parameter direction.
|
Boolean |
getPermanent() |
Boolean |
getSupplemental()
Returns if parameter is supplemental.
|
Object |
getValue(Object instance) |
void |
print(PrintStream outfile)
Print this descriptor to outfile
|
void |
print(PrintStream outfile,
ALDOperator op)
Print this descriptor to outfile.
|
void |
setValue(Object _value,
Object instance)
Sets the value of the object represented by this descriptor.
|
getCallback, getDataIOOrder, getExplanation, getField, getHandlingMode, getLabel, getMyclass, getName, isInfo, isRequired, parameterModificationMode, print
private Object value
field
is null
.@ALDClassParameter(label="direction") protected final Parameter.Direction direction
@ALDClassParameter(label="supplemental") protected final Boolean supplemental
@ALDClassParameter(label="permanent") protected final Boolean permanent
protected ALDOpParameterDescriptor()
public ALDOpParameterDescriptor(String _name, Parameter.Direction _direction, Boolean _supplemental, Class<?> cl, String _explanation, String _label, boolean _required, Field _field, int guiOrder, Parameter.ExpertMode mode, Boolean _permanent, String _callback, Parameter.ParameterModificationMode modifiesParameterDefinitions, boolean _info)
_name
- Name of parameter._direction
- Direction of parameter._supplemental
- Supplemental parameter flag.cl
- Java class._explanation
- Explanatory string._label
- Label for parameter._required
- Is this argument required for the operator?_field
- The field for this member.guiOrder
- Position in GUI of this member.mode
- Mode for handling the parameter._permanent
- _callback
- modifiesParameterDefinitions
- _info
- public ALDOpParameterDescriptor copy(Field _field)
public ALDOpParameterDescriptor clone()
clone
in class ALDParameterDescriptor
public void print(PrintStream outfile)
print
in class ALDParameterDescriptor
public void print(PrintStream outfile, ALDOperator op)
If op
is non null then try to get the value of the parameter and print it also.
public Parameter.Direction getDirection()
public Boolean getSupplemental()
public Boolean getPermanent()
public void setValue(Object _value, Object instance) throws ALDOperatorException
field
of the descriptor is null
then
the value
variable of the descriptor is used,
otherwise the member variable specified by field
in the object instance
._value
- instance
- ALDOperatorException
public Object getValue(Object instance) throws ALDOperatorException
ALDOperatorException
Copyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.