Package jadex.bdiv3.model
Class MParameter
- java.lang.Object
- 
- jadex.bdiv3.model.MElement
- 
- jadex.bdiv3.model.MParameter
 
 
- 
- Direct Known Subclasses:
- MPlanParameter
 
 public class MParameter extends MElement Parameter model.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classMParameter.DirectionThe message direction.static classMParameter.EvaluationModeThe message direction.
 - 
Field SummaryFields Modifier and Type Field Description protected UnparsedExpressionbindingoptionsThe binding options.protected ClassInfoclazzThe type (if explicitly specified).protected MParameter.DirectiondirectionThe direction.static java.util.Map<java.lang.String,MParameter.Direction>dirsprotected MParameter.EvaluationModeevaluationmodeThe direction.static java.util.Map<java.lang.String,MParameter.EvaluationMode>evasprotected java.util.List<jadex.rules.eca.EventType>eventsThe ECA events that may denote changes in the parameter value(s).protected FieldInfoftargetThe field target.protected MethodInfomgetterThe method targets.protected MethodInfomsetterprotected java.lang.BooleanmultiFlag if is multi.protected booleanoptionalThe optional flag.protected java.util.List<java.lang.String>servicemappingsThe service mappings.protected UnparsedExpressionupdaterateThe update rate.protected UnparsedExpressionvalueThe default value.protected java.util.List<UnparsedExpression>valuesThe default values (multi).- 
Fields inherited from class jadex.bdiv3.model.MElementCAPABILITY_SEPARATOR, description, name
 
- 
 - 
Constructor SummaryConstructors Constructor Description MParameter()Bean Constructor.MParameter(FieldInfo ftarget)Create a new parameter.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDefaultValues(UnparsedExpression fact)The value to set.voidaddEvent(jadex.rules.eca.EventType event)Add an event.voidaddServiceMapping(java.lang.String mapping)Add a service mapping.UnparsedExpressiongetBindingOptions()Get the bindingOptions.ClassInfogetClazz()Get the clazz.UnparsedExpressiongetDefaultValue()Get the value.java.util.List<UnparsedExpression>getDefaultValues()Get the value.MParameter.DirectiongetDirection()Get the direction.MParameter.EvaluationModegetEvaluationMode()Get the evaluationmode.java.util.List<jadex.rules.eca.EventType>getEvents()Get the events.FieldInfogetField()Get the field (for field-backed beliefs).MethodInfogetGetter()Get the getter method (for method-backed beliefs).java.util.List<java.lang.String>getServiceMappings()Get the service mappings.MethodInfogetSetter()Get the setter method (for method-backed beliefs).java.lang.Class<?>getType(java.lang.ClassLoader cl)Get the class of the belief.UnparsedExpressiongetUpdateRate()Get the updaterate.longgetUpdaterateValue(IInternalAccess agent)Get/Evaluate the updaterate value.java.lang.ObjectgetValue(java.lang.Object object, java.lang.ClassLoader cl)Get the value of the belief.voidinitEvents(MParameterElement owner)Init the event, when loaded from xml.booleanisArray()Test if parameter is of array type.booleanisFieldParameter()Test if this belief refers to a field.booleanisMulti(java.lang.ClassLoader cl)Get the multi.booleanisOptional()Get the optional flag.voidsetBindingOptions(UnparsedExpression bindingoptions)The binding options to set.voidsetClazz(ClassInfo clazz)The clazz to set.voidsetDefaultValue(UnparsedExpression value)The value to set.voidsetDefaultValues(java.util.List<UnparsedExpression> values)The value to set.voidsetDirection(MParameter.Direction direction)The direction to set.voidsetEvaluationMode(MParameter.EvaluationMode evaluationmode)The evaluationmode to set.voidsetEvents(java.util.List<jadex.rules.eca.EventType> events)The events to set.voidsetGetter(MethodInfo mgetter)Set the mgetter.voidsetMulti(boolean multi)The multi to set.voidsetOptional(boolean optional)Set the optional flag.voidsetServiceMappings(java.util.List<java.lang.String> servicemappings)Set the service mappings.voidsetSetter(MethodInfo msetter)Set the msetter.voidsetUpdateRate(UnparsedExpression updaterate)The updaterate to set.booleansetValue(java.lang.Object object, java.lang.Object value, java.lang.ClassLoader cl)Set the value of the parameter.- 
Methods inherited from class jadex.bdiv3.model.MElementequals, getCapabilityName, getDescription, getElementName, getName, hashCode, internalName, setDescription, setFlatName, setName, toString
 
- 
 
- 
- 
- 
Field Detail- 
dirspublic static java.util.Map<java.lang.String,MParameter.Direction> dirs 
 - 
evaspublic static java.util.Map<java.lang.String,MParameter.EvaluationMode> evas 
 - 
ftargetprotected FieldInfo ftarget The field target.
 - 
mgetterprotected MethodInfo mgetter The method targets.
 - 
msetterprotected MethodInfo msetter 
 - 
multiprotected java.lang.Boolean multi Flag if is multi.
 - 
directionprotected MParameter.Direction direction The direction.
 - 
clazzprotected ClassInfo clazz The type (if explicitly specified).
 - 
valueprotected UnparsedExpression value The default value.
 - 
valuesprotected java.util.List<UnparsedExpression> values The default values (multi).
 - 
optionalprotected boolean optional The optional flag.
 - 
bindingoptionsprotected UnparsedExpression bindingoptions The binding options.
 - 
evaluationmodeprotected MParameter.EvaluationMode evaluationmode The direction.
 - 
updaterateprotected UnparsedExpression updaterate The update rate.
 - 
eventsprotected java.util.List<jadex.rules.eca.EventType> events The ECA events that may denote changes in the parameter value(s).
 - 
servicemappingsprotected java.util.List<java.lang.String> servicemappings The service mappings.
 
- 
 - 
Constructor Detail- 
MParameterpublic MParameter() Bean Constructor.
 - 
MParameterpublic MParameter(FieldInfo ftarget) Create a new parameter.
 
- 
 - 
Method Detail- 
setGetterpublic void setGetter(MethodInfo mgetter) Set the mgetter.- Parameters:
- mgetter- The mgetter to set.
 
 - 
setSetterpublic void setSetter(MethodInfo msetter) Set the msetter.- Parameters:
- msetter- The msetter to set.
 
 - 
isFieldParameterpublic boolean isFieldParameter() Test if this belief refers to a field.- Returns:
- True if is a field belief.
 
 - 
getValuepublic java.lang.Object getValue(java.lang.Object object, java.lang.ClassLoader cl)Get the value of the belief.- Parameters:
- object- The rparameterelement (such as goal).
- cl- The classloader.
 
 - 
setValuepublic boolean setValue(java.lang.Object object, java.lang.Object value, java.lang.ClassLoader cl)Set the value of the parameter.- Parameters:
- object- The rparameterelement (such as goal).
- value- The value.
- cl- The classloader.
 
 - 
getTypepublic java.lang.Class<?> getType(java.lang.ClassLoader cl) Get the class of the belief.
 - 
getFieldpublic FieldInfo getField() Get the field (for field-backed beliefs).
 - 
getGetterpublic MethodInfo getGetter() Get the getter method (for method-backed beliefs).
 - 
getSetterpublic MethodInfo getSetter() Get the setter method (for method-backed beliefs).
 - 
isMultipublic boolean isMulti(java.lang.ClassLoader cl) Get the multi.- Returns:
- The multi.
 
 - 
setMultipublic void setMulti(boolean multi) The multi to set.- Parameters:
- multi- The multi to set
 
 - 
isArraypublic boolean isArray() Test if parameter is of array type.
 - 
getDirectionpublic MParameter.Direction getDirection() Get the direction.- Returns:
- The direction
 
 - 
setDirectionpublic void setDirection(MParameter.Direction direction) The direction to set.- Parameters:
- direction- The direction to set
 
 - 
getClazzpublic ClassInfo getClazz() Get the clazz.- Returns:
- The clazz
 
 - 
setClazzpublic void setClazz(ClassInfo clazz) The clazz to set.- Parameters:
- clazz- The clazz to set
 
 - 
getDefaultValuepublic UnparsedExpression getDefaultValue() Get the value.- Returns:
- The value
 
 - 
setDefaultValuepublic void setDefaultValue(UnparsedExpression value) The value to set.- Parameters:
- value- The value to set
 
 - 
getDefaultValuespublic java.util.List<UnparsedExpression> getDefaultValues() Get the value.- Returns:
- The value
 
 - 
setDefaultValuespublic void setDefaultValues(java.util.List<UnparsedExpression> values) The value to set.- Parameters:
- value- The value to set
 
 - 
addDefaultValuespublic void addDefaultValues(UnparsedExpression fact) The value to set.- Parameters:
- value- The value to set
 
 - 
isOptionalpublic boolean isOptional() Get the optional flag.- Returns:
- The otpional flag
 
 - 
setOptionalpublic void setOptional(boolean optional) Set the optional flag.- Parameters:
- optional- The value to set
 
 - 
getBindingOptionspublic UnparsedExpression getBindingOptions() Get the bindingOptions.- Returns:
- The bindingOptions
 
 - 
setBindingOptionspublic void setBindingOptions(UnparsedExpression bindingoptions) The binding options to set.- Parameters:
- bindingoptions- The bindingOptions to set
 
 - 
getEvaluationModepublic MParameter.EvaluationMode getEvaluationMode() Get the evaluationmode.- Returns:
- The evaluationmode
 
 - 
setEvaluationModepublic void setEvaluationMode(MParameter.EvaluationMode evaluationmode) The evaluationmode to set.- Parameters:
- evaluationmode- The evaluationmode to set
 
 - 
getUpdateRatepublic UnparsedExpression getUpdateRate() Get the updaterate.- Returns:
- The updaterate
 
 - 
setUpdateRatepublic void setUpdateRate(UnparsedExpression updaterate) The updaterate to set.- Parameters:
- updaterate- The updaterate to set
 
 - 
getUpdaterateValuepublic long getUpdaterateValue(IInternalAccess agent) Get/Evaluate the updaterate value.- Parameters:
- agent- The agent.
- Returns:
- The update rate.
 
 - 
getEventspublic java.util.List<jadex.rules.eca.EventType> getEvents() Get the events.- Returns:
- The events.
 
 - 
initEventspublic void initEvents(MParameterElement owner) Init the event, when loaded from xml.
 - 
setEventspublic void setEvents(java.util.List<jadex.rules.eca.EventType> events) The events to set.- Parameters:
- events- The events to set
 
 - 
addEventpublic void addEvent(jadex.rules.eca.EventType event) Add an event.- Parameters:
- event- The event.
 
 - 
getServiceMappingspublic java.util.List<java.lang.String> getServiceMappings() Get the service mappings.
 - 
setServiceMappingspublic void setServiceMappings(java.util.List<java.lang.String> servicemappings) Set the service mappings.
 - 
addServiceMappingpublic void addServiceMapping(java.lang.String mapping) Add a service mapping.
 
- 
 
-