use of org.osate.aadl2.instance.InstanceReferenceValue in project osate2 by osate.
the class DeploymentProperties method getActualMemoryBinding.
public static Optional<List<InstanceObject>> getActualMemoryBinding(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getActualMemoryBinding_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return ((InstanceReferenceValue) resolved1).getReferencedInstanceObject();
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.instance.InstanceReferenceValue in project osate2 by osate.
the class DeploymentProperties method getActualSubprogramCall.
public static Optional<InstanceObject> getActualSubprogramCall(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getActualSubprogramCall_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((InstanceReferenceValue) resolved).getReferencedInstanceObject());
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.instance.InstanceReferenceValue in project osate2 by osate.
the class DeploymentProperties method getActualProcessorBinding.
public static Optional<List<InstanceObject>> getActualProcessorBinding(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getActualProcessorBinding_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return ((InstanceReferenceValue) resolved1).getReferencedInstanceObject();
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.instance.InstanceReferenceValue in project osate2 by osate.
the class DeploymentProperties method getAllowedSubprogramCall.
public static Optional<List<InstanceObject>> getAllowedSubprogramCall(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getAllowedSubprogramCall_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return ((InstanceReferenceValue) resolved1).getReferencedInstanceObject();
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.instance.InstanceReferenceValue in project osate2 by osate.
the class ThreadProperties method getDispatchTrigger.
public static Optional<List<InstanceObject>> getDispatchTrigger(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getDispatchTrigger_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1, lookupContext, mode);
return ((InstanceReferenceValue) resolved1).getReferencedInstanceObject();
}).collect(Collectors.toList()));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
Aggregations