public class ALDParameterDescriptor extends Object implements Cloneable
The descriptions contains a name, the java class (mylass, and an
explanatory string. The label may be used, e.g. in a GUI, to
identify the parameter instead of using it name. The
required flag may not be interpreted for all parameters.
The field guiOrder may be use to order of appearance of
parameters in user interfaces, where smaller order indicates early
appearance. Likewise handlingMode may be used to influence GUIs.
Note: default values are valid only for the (very old) implementation without annotations an will disapear in th enear future.
The field is used for internal means.
Implementational note: a reference to the Parameter-annotation is NOT included to allow for wrapping of non-Alida operators as Alida operators.
ALDOperator| Modifier and Type | Field and Description |
|---|---|
protected int |
dataIOOrder |
protected Object |
defaultValue |
protected String |
explanation |
protected Field |
field |
protected Parameter.ExpertMode |
handlingMode |
protected String |
label |
protected Class<?> |
myclass |
protected String |
name |
protected boolean |
required |
| Constructor and Description |
|---|
ALDParameterDescriptor(String name,
Class<?> cl,
String explanation,
String label,
boolean required,
Object defaultValue,
Field field,
int guiOrder,
Parameter.ExpertMode mode)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ALDParameterDescriptor |
clone()
Clones an instance.
|
int |
getDataIOOrder()
Returns data I/O order of parameter.
|
Object |
getDefaultValue()
Returns default value of parameter.
|
String |
getExplanation()
Returns explanation for parameter.
|
Field |
getField()
Returns a reference to the field of the parameter.
|
Parameter.ExpertMode |
getHandlingMode()
Returns mode of parameter handling.
|
String |
getLabel()
Returns label for parameter.
|
Class<?> |
getMyclass()
Returns class of parameter.
|
String |
getName()
Returns name of parameter.
|
boolean |
isRequired()
Returns is parameter is required.
|
void |
print()
Print this descriptor to standard out.
|
void |
print(PrintStream outfile)
Print this descriptor to outfile.
|
void |
setDefaultValue(Object def)
Specify default value of parameter.
|
protected final String name
protected final Class<?> myclass
protected final String explanation
protected final String label
protected Object defaultValue
protected final Field field
protected final boolean required
protected final int dataIOOrder
protected final Parameter.ExpertMode handlingMode
public ALDParameterDescriptor(String name, Class<?> cl, String explanation, String label, boolean required, Object defaultValue, Field field, int guiOrder, Parameter.ExpertMode mode)
name - Name of parameter.cl - Java class.explanation - Explanatory string.label - Label for parameter.required - Is this argument required for the operator?defaultValue - Default value.field - The field for this member.public String getName()
public Class<?> getMyclass()
public String getExplanation()
public String getLabel()
public int getDataIOOrder()
public Parameter.ExpertMode getHandlingMode()
public boolean isRequired()
public Object getDefaultValue()
public void setDefaultValue(Object def)
public Field getField()
public ALDParameterDescriptor clone()
public void print()
public void print(PrintStream outfile)
Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.