|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sei.aadl.model.properties.ReflectiveValueWrapper
public final class ReflectiveValueWrapper
Wrapper around an AadlPropertyValue
that adds the reflective information.
Constructor Summary | |
---|---|
ReflectiveValueWrapper(AadlPropertyValue value)
|
|
ReflectiveValueWrapper(java.util.Map modes,
AadlPropertyValue value)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
AadlPropertyValue |
evaluate(PropertyHolder context,
java.util.Map modes)
Evaluate a property value in the given context and with the given mode bindings. |
boolean |
exists()
Does the value exist at all? |
java.util.List |
getDefiningAssociations()
Get the property associations/property declaration that determines this value. |
java.util.Map |
getModeBinding()
Get the map from ModeContexts to Modes that was used to generate this property value. |
PropertyValue |
getScalarValue()
Get the scalar value of the property. |
java.util.List |
getValue()
Get the value of the property. |
int |
hashCode()
|
AadlPropertyValue |
instantiate(ComponentInstance root)
Update the property value so that it makes sense in an instance model. |
boolean |
isList()
Is the value a list value? |
boolean |
isNotPresent()
Is the value not present. |
java.util.Set |
preEvaluate(PropertyHolder context)
Determine which modes this value may depend on. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReflectiveValueWrapper(java.util.Map modes, AadlPropertyValue value)
public ReflectiveValueWrapper(AadlPropertyValue value)
Method Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.util.Map getModeBinding()
ReflectiveAadlPropertyValue
getModeBinding
in interface ReflectiveAadlPropertyValue
public boolean exists()
AadlPropertyValue
exists
in interface AadlPropertyValue
true if the value exists.- See Also:
AadlPropertyValue.isNotPresent()
public boolean isNotPresent()
AadlPropertyValue
isNotPresent
in interface AadlPropertyValue
true
if the value is "not present". A non
existent property value is not "not present", and thus this
returns false
if the AadlPropertyValue.exists()
is false
.public boolean isList()
AadlPropertyValue
isList
in interface AadlPropertyValue
true
if the value is a list. Returns false
if AadlPropertyValue.exists()
or AadlPropertyValue.isNotPresent()
is true
.public java.util.List getValue()
AadlPropertyValue
getValue
in interface AadlPropertyValue
null
.
If AadlPropertyValue.isList()
is false
then this list is a
one-element list, whose first (and only) element is the property
value. Otherwise, the returned list is the property value.public PropertyValue getScalarValue()
AadlPropertyValue
getScalarValue
in interface AadlPropertyValue
null
.public java.util.Set preEvaluate(PropertyHolder context) throws InvalidModelException
AadlPropertyValue
preEvaluate
in interface AadlPropertyValue
context
- The element this value comes from.
InvalidModelException
- Thrown if the property value cannot
be pre-evaluated because the model is incomplete or malformed.public AadlPropertyValue evaluate(PropertyHolder context, java.util.Map modes) throws InvalidModelException
ReflectiveAadlPropertyValue
evaluate
in interface AadlPropertyValue
evaluate
in interface ReflectiveAadlPropertyValue
context
- The element any property references should be looked up
against.modes
- A map from ComponentImpl
to Mode
defining the mode
bindings to use for the evaluation.
InvalidModelException
- Thrown if the property value cannot
be evaluated because the model is incomplete or malformed.public AadlPropertyValue instantiate(ComponentInstance root) throws InvalidModelException
AadlPropertyValue
instantiate
in interface AadlPropertyValue
root
- The component instance to be used as the root of subcomponent
paths. (This is also the component whose declared modes may be
used in any in modes clauses.)
InvalidModelException
- Thrown if the property value cannot
be instantiated because the model is incomplete or malformed.public java.util.List getDefiningAssociations()
AadlPropertyValue
AadlPropertyValue.isNotPresent()
is true
because the value actually be defined to be a reference to another
property value and that property value might be undefined.
getDefiningAssociations
in interface AadlPropertyValue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |