|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ModalPropertyValue
Objects of this class encapsulate the property value for a particular
property of a particular PropertyHolder
element. They are returned by
PropertyHolder.getPropertyValue(edu.cmu.sei.aadl.model.property.PropertyDefinition)
.
The primary purpose of this method is to bundle together all the values the
property may have depending on the mode state of the property holder and its
containers.
The ComponentImpl
elements whose mode bindings can influence the
value of the property are referred to as mode contexts . They can be
obtained by using the getModeContexts()
and
getModeContextsAsArray()
methods. To get the property value for
specific mode bindings, use the getValue(Map)
method, which takes a
map from ComponentImpl
objects to
Mode
objects. In general, there may be a
different value for each mode that each mode context can be in. The method
getAllModeBindings()
returns a collection of all the possible mode
bindings as maps suitable for use with getValue
. The method
getValue(Map)
returns an AadlPropertyValue
object that
further encapsuales the value of the property.
A quick way to get all the values that the property can have depending on the
mode is to use getAllValues()
which returns a set of
ReflectiveAadlPropertyValue
objects, one for each possible mode
binding. To find the mode binding that produces a particular value use
ReflectiveAadlPropertyValue.getModeBinding()
.
Method Summary | |
---|---|
java.util.Collection |
getAllModeBindings()
Get all the mode contexts that are applicable to this value. |
java.util.Collection |
getAllValues()
Get all the values the property value could have. |
java.util.Set |
getModeContexts()
Get the components whose modes may affect this value. |
ModeContext[] |
getModeContextsAsArray()
Get the components whose modes may affect this value. |
AadlPropertyValue |
getValue()
Get the property value in the empty mode context. |
AadlPropertyValue |
getValue(java.util.Map modes)
Get the property value based on the given mode settings. |
boolean |
isModal()
Query if the property value may depend on modes. |
Method Detail |
---|
boolean isModal()
getModeContexts()
is not empty.
true
iff the propery value depends on modes.java.util.Set getModeContexts()
ModeContext
objects.ModeContext[] getModeContextsAsArray()
AadlPropertyValue getValue(java.util.Map modes) throws ModeNotSpecifiedException, InvalidModelException
modes
- The mode settings to use as a map from ModeContext
objects to Mode
objects.
The domain of the mapping is given by the
getModeContexts()
method.
ModeNotSpecifiedException
- Thrown if a mode value is not specified for one of the
required modes.
InvalidModelException
- thrown if an error in the model prevents the successful
lookup of the property value. This exception is primarily
of interest to the OSATE implementation which catches it
during certain operations to report that the model has
errors. (There are a few cases where the error can only
be detected by looking up the property value.)AadlPropertyValue getValue() throws ModeNotSpecifiedException, InvalidModelException
ModeNotSpecifiedException
- Thrown if a mode value is not speficied for one of the
required modes.
InvalidModelException
- thrown if an error in the model prevents the successful
lookup of the property value. This exception is primarily
of interest to the OSATE implementation which catches it
during certain operations to report that the model has
errors. (There are a few cases where the error can only
be detected by looking up the property value.)java.util.Collection getAllModeBindings()
getModeContexts()
.
Map
s, enumerating all the possible
combinations of modes that apply to the lookup of the value.java.util.Collection getAllValues() throws InvalidModelException
ReflectiveAadlPropertyValue
objects, one for each valid combination of modes as determined by
the mode contexts
.
InvalidModelException
- thrown if an error in the model prevents the successful
lookup of the property value. This exception is primarily
of interest to the OSATE implementation which catches it
during certain operations to report that the model has
errors. (There are a few cases where the error can only
be detected by looking up the property value.)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |