public class MParameter extends MElement
Modifier and Type | Class and Description |
---|---|
static class |
MParameter.Direction
The message direction.
|
static class |
MParameter.EvaluationMode
The message direction.
|
Modifier and Type | Field and Description |
---|---|
protected UnparsedExpression |
bindingoptions
The binding options.
|
protected ClassInfo |
clazz
The type (if explicitly specified).
|
protected MParameter.Direction |
direction
The direction.
|
static java.util.Map<java.lang.String,MParameter.Direction> |
dirs |
protected MParameter.EvaluationMode |
evaluationmode
The direction.
|
static java.util.Map<java.lang.String,MParameter.EvaluationMode> |
evas |
protected java.util.List<EventType> |
events
The ECA events that may denote changes in the parameter value(s).
|
protected FieldInfo |
ftarget
The field target.
|
protected MethodInfo |
mgetter
The method targets.
|
protected MethodInfo |
msetter |
protected java.lang.Boolean |
multi
Flag if is multi.
|
protected boolean |
optional
The optional flag.
|
protected java.util.List<java.lang.String> |
servicemappings
The service mappings.
|
protected UnparsedExpression |
updaterate
The update rate.
|
protected UnparsedExpression |
value
The default value.
|
protected java.util.List<UnparsedExpression> |
values
The default values (multi).
|
CAPABILITY_SEPARATOR, description, name
Constructor and Description |
---|
MParameter()
Bean Constructor.
|
MParameter(FieldInfo ftarget)
Create a new parameter.
|
Modifier and Type | Method and Description |
---|---|
void |
addDefaultValues(UnparsedExpression fact)
The value to set.
|
void |
addEvent(EventType event)
Add an event.
|
void |
addServiceMapping(java.lang.String mapping)
Add a service mapping.
|
UnparsedExpression |
getBindingOptions()
Get the bindingOptions.
|
ClassInfo |
getClazz()
Get the clazz.
|
UnparsedExpression |
getDefaultValue()
Get the value.
|
java.util.List<UnparsedExpression> |
getDefaultValues()
Get the value.
|
MParameter.Direction |
getDirection()
Get the direction.
|
MParameter.EvaluationMode |
getEvaluationMode()
Get the evaluationmode.
|
java.util.List<EventType> |
getEvents()
Get the events.
|
FieldInfo |
getField()
Get the field (for field-backed beliefs).
|
MethodInfo |
getGetter()
Get the getter method (for method-backed beliefs).
|
java.util.List<java.lang.String> |
getServiceMappings()
Get the service mappings.
|
MethodInfo |
getSetter()
Get the setter method (for method-backed beliefs).
|
java.lang.Class<?> |
getType(java.lang.ClassLoader cl)
Get the class of the belief.
|
UnparsedExpression |
getUpdateRate()
Get the updaterate.
|
long |
getUpdaterateValue(IInternalAccess agent)
Get/Evaluate the updaterate value.
|
java.lang.Object |
getValue(java.lang.Object object,
java.lang.ClassLoader cl)
Get the value of the belief.
|
void |
initEvents(MParameterElement owner)
Init the event, when loaded from xml.
|
boolean |
isArray()
Test if parameter is of array type.
|
boolean |
isFieldParameter()
Test if this belief refers to a field.
|
boolean |
isMulti(java.lang.ClassLoader cl)
Get the multi.
|
boolean |
isOptional()
Get the optional flag.
|
void |
setBindingOptions(UnparsedExpression bindingoptions)
The binding options to set.
|
void |
setClazz(ClassInfo clazz)
The clazz to set.
|
void |
setDefaultValue(UnparsedExpression value)
The value to set.
|
void |
setDefaultValues(java.util.List<UnparsedExpression> values)
The value to set.
|
void |
setDirection(MParameter.Direction direction)
The direction to set.
|
void |
setEvaluationMode(MParameter.EvaluationMode evaluationmode)
The evaluationmode to set.
|
void |
setEvents(java.util.List<EventType> events)
The events to set.
|
void |
setGetter(MethodInfo mgetter)
Set the mgetter.
|
void |
setMulti(boolean multi)
The multi to set.
|
void |
setOptional(boolean optional)
Set the optional flag.
|
void |
setServiceMappings(java.util.List<java.lang.String> servicemappings)
Set the service mappings.
|
void |
setSetter(MethodInfo msetter)
Set the msetter.
|
void |
setUpdateRate(UnparsedExpression updaterate)
The updaterate to set.
|
boolean |
setValue(java.lang.Object object,
java.lang.Object value,
java.lang.ClassLoader cl)
Set the value of the parameter.
|
equals, getCapabilityName, getDescription, getElementName, getName, hashCode, internalName, setDescription, setFlatName, setName, toString
public static java.util.Map<java.lang.String,MParameter.Direction> dirs
public static java.util.Map<java.lang.String,MParameter.EvaluationMode> evas
protected FieldInfo ftarget
protected MethodInfo mgetter
protected MethodInfo msetter
protected java.lang.Boolean multi
protected MParameter.Direction direction
protected ClassInfo clazz
protected UnparsedExpression value
protected java.util.List<UnparsedExpression> values
protected boolean optional
protected UnparsedExpression bindingoptions
protected MParameter.EvaluationMode evaluationmode
protected UnparsedExpression updaterate
protected java.util.List<EventType> events
protected java.util.List<java.lang.String> servicemappings
public MParameter()
public MParameter(FieldInfo ftarget)
public void setGetter(MethodInfo mgetter)
mgetter
- The mgetter to set.public void setSetter(MethodInfo msetter)
msetter
- The msetter to set.public boolean isFieldParameter()
public java.lang.Object getValue(java.lang.Object object, java.lang.ClassLoader cl)
object
- The rparameterelement (such as goal).cl
- The classloader.public boolean setValue(java.lang.Object object, java.lang.Object value, java.lang.ClassLoader cl)
object
- The rparameterelement (such as goal).value
- The value.cl
- The classloader.public java.lang.Class<?> getType(java.lang.ClassLoader cl)
public FieldInfo getField()
public MethodInfo getGetter()
public MethodInfo getSetter()
public boolean isMulti(java.lang.ClassLoader cl)
public void setMulti(boolean multi)
multi
- The multi to setpublic boolean isArray()
public MParameter.Direction getDirection()
public void setDirection(MParameter.Direction direction)
direction
- The direction to setpublic ClassInfo getClazz()
public void setClazz(ClassInfo clazz)
clazz
- The clazz to setpublic UnparsedExpression getDefaultValue()
public void setDefaultValue(UnparsedExpression value)
value
- The value to setpublic java.util.List<UnparsedExpression> getDefaultValues()
public void setDefaultValues(java.util.List<UnparsedExpression> values)
value
- The value to setpublic void addDefaultValues(UnparsedExpression fact)
value
- The value to setpublic boolean isOptional()
public void setOptional(boolean optional)
optional
- The value to setpublic UnparsedExpression getBindingOptions()
public void setBindingOptions(UnparsedExpression bindingoptions)
bindingoptions
- The bindingOptions to setpublic MParameter.EvaluationMode getEvaluationMode()
public void setEvaluationMode(MParameter.EvaluationMode evaluationmode)
evaluationmode
- The evaluationmode to setpublic UnparsedExpression getUpdateRate()
public void setUpdateRate(UnparsedExpression updaterate)
updaterate
- The updaterate to setpublic long getUpdaterateValue(IInternalAccess agent)
agent
- The agent.public java.util.List<EventType> getEvents()
public void initEvents(MParameterElement owner)
public void setEvents(java.util.List<EventType> events)
events
- The events to setpublic void addEvent(EventType event)
event
- The event.public java.util.List<java.lang.String> getServiceMappings()
public void setServiceMappings(java.util.List<java.lang.String> servicemappings)
public void addServiceMapping(java.lang.String mapping)