|
||||||||||
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.UndefinedPropertyValue
public final class UndefinedPropertyValue
Representation of an "undefined" property value. Only one instance of this
class is needed, and thus this implementation uses the prototype pattern.
The single instance can be obtained from the static PROTOTYPE
field.
Field Summary | |
---|---|
static UndefinedPropertyValue |
PROTOTYPE
The singleton reference. |
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 UndefinedPropertyValue PROTOTYPE
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)
AadlPropertyValue
preEvaluate
in interface AadlPropertyValue
context
- The element this value comes from.
public AadlPropertyValue evaluate(PropertyHolder context, java.util.Map modes)
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.
public AadlPropertyValue instantiate(ComponentInstance root)
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.)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |