Package jadex.bdiv3.model
Class MBelief
- java.lang.Object
- 
- jadex.bdiv3.model.MElement
- 
- jadex.bdiv3.model.MBelief
 
 
- 
 public class MBelief extends MElement Belief model.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.Class<?>AUTOCLOSABLEThe autoclosable class, if present.protected java.util.Set<java.lang.String>beliefeventsThe events this belief depends on.protected ClassInfoclazzThe type (if explicitly specified).protected MParameter.EvaluationModeevaluationmodeThe direction.protected java.util.List<EventType>eventsThe aggregated/inited events.protected booleanexportedThe exported / argument flag.protected UnparsedExpressionfactThe default fact.protected java.util.List<UnparsedExpression>factsThe default facts (multi).protected FieldInfoftargetThe field target.protected java.lang.StringimplThe collection implementation class.protected MethodInfomgetterThe method targets.protected MethodInfomsetterprotected java.lang.BooleanmultiFlag if is multi.protected java.util.Collection<EventType>raweventsThe raw events.protected java.lang.StringrefThe reference.protected booleanresultThe result flag.protected UnparsedExpressionupdaterateThe update rate.- 
Fields inherited from class jadex.bdiv3.model.MElementCAPABILITY_SEPARATOR, description, name
 
- 
 - 
Constructor SummaryConstructors Constructor Description MBelief()Bean Constructor.MBelief(FieldInfo target, java.lang.String impl, boolean dynamic, long updaterate, java.lang.String[] beliefevents, java.util.Collection<EventType> rawevents)Create a new belief.MBelief(FieldInfo target, java.lang.String impl, boolean dynamic, long updaterate, java.util.Set<java.lang.String> beliefevents, java.util.Collection<EventType> rawevents)Create a new belief.MBelief(FieldInfo target, java.lang.String impl, boolean dynamic, UnparsedExpression updaterate, java.util.Set<java.lang.String> beliefevents, java.util.Collection<EventType> rawevents)Create a new belief.MBelief(MethodInfo target, java.lang.String impl, boolean dynamic, long updaterate, java.lang.String[] beliefevents, java.util.Collection<EventType> rawevents)Create a new belief.MBelief(MethodInfo target, java.lang.String impl, boolean dynamic, long updaterate, java.util.Set<java.lang.String> beliefevents, java.util.Collection<EventType> rawevents)Create a new belief.MBelief(MethodInfo target, java.lang.String impl, boolean dynamic, UnparsedExpression updaterate, java.util.Set<java.lang.String> beliefevents, java.util.Collection<EventType> rawevents)Create a new belief.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadaptEvaluationMode()Adapt the evaluation mode according to thevoidaddDefaultFacts(UnparsedExpression fact)The value to set.voidaddEvent(EventType event)Add an event.voidcleanup(IInternalAccess component)Cleanup the value on agent shutdown, i.e., call close() on closeable fact objects.java.util.Set<java.lang.String>getBeliefEvents()Get the events.ClassInfogetClazz()Get the clazz.UnparsedExpressiongetDefaultFact()Get the value.java.util.List<UnparsedExpression>getDefaultFacts()Get the value.MParameter.EvaluationModegetEvaluationMode()Get the evaluationmode.java.util.List<EventType>getEvents()Get the events.FieldInfogetField()Get the field (for field-backed beliefs).MethodInfogetGetter()Get the getter method (for method-backed beliefs).java.lang.StringgetImplClassName()Get the impl.java.util.Collection<EventType>getRawEvents()Get the rawevents.java.lang.StringgetRef()Get the reference.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(IInternalAccess agent)Get the value of the belief.java.lang.ObjectgetValue(java.lang.Object object, java.lang.ClassLoader cl)Get the value of the belief.voidinitEvents(IBDIModel model, java.lang.ClassLoader cl)Init the event, when loaded from xml.booleanisArrayBelief()Test if belief is of array type.booleanisDynamic()Get the dynamic.booleanisExported()Get the exported flag.booleanisFieldBelief()Test if this belief refers to a field.booleanisMulti(java.lang.ClassLoader cl)Get the multi.booleanisResult()Get the result flag.voidsetBeliefEvents(java.util.Set<java.lang.String> events)Set the events.voidsetClazz(ClassInfo clazz)The clazz to set.voidsetDefaultFact(UnparsedExpression fact)The value to set.voidsetDefaultFacts(java.util.List<UnparsedExpression> facts)Set the value.voidsetEvaluationMode(MParameter.EvaluationMode evaluationmode)The evaluationmode to set.voidsetEvents(java.util.List<EventType> events)The events to set.voidsetExported(boolean exported)Set the exported flag.voidsetGetter(MethodInfo mgetter)Set the mgetter.voidsetImplClassName(java.lang.String impl)Set the impl.voidsetMulti(boolean multi)The multi to set.voidsetRawEvents(java.util.Set<EventType> rawevents)Set the rawevents.voidsetRef(java.lang.String reference)Set the reference.voidsetResult(boolean result)Set the result flag.voidsetSetter(MethodInfo msetter)Set the msetter.voidsetUpdateRate(UnparsedExpression updaterate)The updaterate to set.booleansetValue(IInternalAccess agent, java.lang.Object value)Set the value of the belief.booleansetValue(java.lang.Object object, java.lang.Object value, java.lang.ClassLoader cl)Set the value of the belief.- 
Methods inherited from class jadex.bdiv3.model.MElementequals, getCapabilityName, getDescription, getElementName, getName, hashCode, internalName, setDescription, setFlatName, setName, toString
 
- 
 
- 
- 
- 
Field Detail- 
AUTOCLOSABLEpublic static final java.lang.Class<?> AUTOCLOSABLE The autoclosable class, if present.
 - 
ftargetprotected FieldInfo ftarget The field target.
 - 
mgetterprotected MethodInfo mgetter The method targets.
 - 
msetterprotected MethodInfo msetter 
 - 
implprotected java.lang.String impl The collection implementation class.
 - 
updaterateprotected UnparsedExpression updaterate The update rate.
 - 
multiprotected java.lang.Boolean multi Flag if is multi.
 - 
beliefeventsprotected java.util.Set<java.lang.String> beliefevents The events this belief depends on.
 - 
raweventsprotected java.util.Collection<EventType> rawevents The raw events.
 - 
eventsprotected java.util.List<EventType> events The aggregated/inited events.
 - 
factprotected UnparsedExpression fact The default fact.
 - 
factsprotected java.util.List<UnparsedExpression> facts The default facts (multi).
 - 
clazzprotected ClassInfo clazz The type (if explicitly specified).
 - 
exportedprotected boolean exported The exported / argument flag.
 - 
resultprotected boolean result The result flag.
 - 
refprotected java.lang.String ref The reference.
 - 
evaluationmodeprotected MParameter.EvaluationMode evaluationmode The direction.
 
- 
 - 
Constructor Detail- 
MBeliefpublic MBelief() Bean Constructor.
 - 
MBeliefpublic MBelief(FieldInfo target, java.lang.String impl, boolean dynamic, UnparsedExpression updaterate, java.util.Set<java.lang.String> beliefevents, java.util.Collection<EventType> rawevents) Create a new belief.
 - 
MBeliefpublic MBelief(FieldInfo target, java.lang.String impl, boolean dynamic, long updaterate, java.util.Set<java.lang.String> beliefevents, java.util.Collection<EventType> rawevents) Create a new belief.
 - 
MBeliefpublic MBelief(FieldInfo target, java.lang.String impl, boolean dynamic, long updaterate, java.lang.String[] beliefevents, java.util.Collection<EventType> rawevents) Create a new belief.
 - 
MBeliefpublic MBelief(MethodInfo target, java.lang.String impl, boolean dynamic, UnparsedExpression updaterate, java.util.Set<java.lang.String> beliefevents, java.util.Collection<EventType> rawevents) Create a new belief.
 - 
MBeliefpublic MBelief(MethodInfo target, java.lang.String impl, boolean dynamic, long updaterate, java.util.Set<java.lang.String> beliefevents, java.util.Collection<EventType> rawevents) Create a new belief.
 - 
MBeliefpublic MBelief(MethodInfo target, java.lang.String impl, boolean dynamic, long updaterate, java.lang.String[] beliefevents, java.util.Collection<EventType> rawevents) Create a new belief.
 
- 
 - 
Method Detail- 
adaptEvaluationModeprotected void adaptEvaluationMode() Adapt the evaluation mode according to the
 - 
getImplClassNamepublic java.lang.String getImplClassName() Get the impl.- Returns:
- The impl.
 
 - 
setImplClassNamepublic void setImplClassName(java.lang.String impl) Set the impl.- Parameters:
- impl- The impl to set.
 
 - 
isDynamicpublic boolean isDynamic() Get the dynamic.- Returns:
- The dynamic.
 
 - 
isExportedpublic boolean isExported() Get the exported flag.- Returns:
- The exported flag.
 
 - 
setExportedpublic void setExported(boolean exported) Set the exported flag.- Parameters:
- exported- The exported to set.
 
 - 
isResultpublic boolean isResult() Get the result flag.- Returns:
- The result flag.
 
 - 
setResultpublic void setResult(boolean result) Set the result flag.- Parameters:
- result- The result to set.
 
 - 
getRefpublic java.lang.String getRef() Get the reference. For belief references.- Returns:
- The reference.
 
 - 
setRefpublic void setRef(java.lang.String reference) Set the reference.- Parameters:
- reference- The reference 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.
 
 - 
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.
 
 - 
getClazzpublic ClassInfo getClazz() Get the clazz.- Returns:
- The clazz
 
 - 
setClazzpublic void setClazz(ClassInfo clazz) The clazz to set.- Parameters:
- clazz- The clazz to set
 
 - 
isFieldBeliefpublic boolean isFieldBelief() Test if this belief refers to a field.- Returns:
- True if is a field belief.
 
 - 
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
 
 - 
getValuepublic java.lang.Object getValue(IInternalAccess agent) Get the value of the belief.
 - 
getValuepublic java.lang.Object getValue(java.lang.Object object, java.lang.ClassLoader cl)Get the value of the belief.
 - 
setValuepublic boolean setValue(IInternalAccess agent, java.lang.Object value) Set the value of the belief.- Returns:
- True, if field was set.
 
 - 
setValuepublic boolean setValue(java.lang.Object object, java.lang.Object value, java.lang.ClassLoader cl)Set the value of the belief.
 - 
cleanuppublic void cleanup(IInternalAccess component) Cleanup the value on agent shutdown, i.e., call close() on closeable fact objects.
 - 
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).
 - 
isArrayBeliefpublic boolean isArrayBelief() Test if belief is of array type.
 - 
getDefaultFactpublic UnparsedExpression getDefaultFact() Get the value.- Returns:
- The value
 
 - 
setDefaultFactpublic void setDefaultFact(UnparsedExpression fact) The value to set.- Parameters:
- value- The value to set
 
 - 
getDefaultFactspublic java.util.List<UnparsedExpression> getDefaultFacts() Get the value.- Returns:
- The value
 
 - 
setDefaultFactspublic void setDefaultFacts(java.util.List<UnparsedExpression> facts) Set the value.
 - 
addDefaultFactspublic void addDefaultFacts(UnparsedExpression fact) The value to set.- Parameters:
- value- The value 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
 
 - 
getRawEventspublic java.util.Collection<EventType> getRawEvents() Get the rawevents.- Returns:
- The rawevents.
 
 - 
setRawEventspublic void setRawEvents(java.util.Set<EventType> rawevents) Set the rawevents.- Parameters:
- rawevents- The rawevents to set.
 
 - 
getBeliefEventspublic java.util.Set<java.lang.String> getBeliefEvents() Get the events.- Returns:
- The events.
 
 - 
setBeliefEventspublic void setBeliefEvents(java.util.Set<java.lang.String> events) Set the events.- Parameters:
- events- The events to set.
 
 - 
getEventspublic java.util.List<EventType> getEvents() Get the events.- Returns:
- The events.
 
 - 
initEventspublic void initEvents(IBDIModel model, java.lang.ClassLoader cl) Init the event, when loaded from xml.
 - 
setEventspublic void setEvents(java.util.List<EventType> events) The events to set.- Parameters:
- events- The events to set
 
 - 
addEventpublic void addEvent(EventType event) Add an event.- Parameters:
- event- The event.
 
 
- 
 
-