|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sei.aadl.model.properties.AbstractAadlPropertyValue
edu.cmu.sei.aadl.model.properties.ScalarPropertyValue
public final class ScalarPropertyValue
Representation of a existent, present property value.
Field Summary | |
---|---|
static AadlPropertyValue |
FALSE
|
static AadlPropertyValue |
TRUE
|
Constructor Summary | |
---|---|
ScalarPropertyValue(PropertyValue val,
java.util.List definingAssocs)
Create a new property value. |
Method Summary | |
---|---|
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? |
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 edu.cmu.sei.aadl.model.properties.AbstractAadlPropertyValue |
---|
equals, getDefiningAssociations |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.cmu.sei.aadl.model.properties.AadlPropertyValue |
---|
getDefiningAssociations |
Field Detail |
---|
public static final AadlPropertyValue TRUE
public static final AadlPropertyValue FALSE
Constructor Detail |
---|
public ScalarPropertyValue(PropertyValue val, java.util.List definingAssocs)
val
- The value. Cannot be null
.
java.lang.NullPointerException
- Thrown if val
is null
.Method Detail |
---|
public int hashCode()
hashCode
in class AbstractAadlPropertyValue
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
AadlPropertyValue
evaluate
in interface AadlPropertyValue
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |