use of org.osate.aadl2.contrib.aadlproject.SizeUnits in project osate2 by osate.
the class Sei method getRamcapacity.
public static Optional<RealWithUnits<SizeUnits>> getRamcapacity(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getRamcapacity_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new RealWithUnits<>(resolved, SizeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.contrib.aadlproject.SizeUnits in project osate2 by osate.
the class Sei method getRombudget.
public static Optional<RealWithUnits<SizeUnits>> getRombudget(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getRombudget_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new RealWithUnits<>(resolved, SizeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.contrib.aadlproject.SizeUnits in project osate2 by osate.
the class Sei method getRomcapacity.
public static Optional<RealWithUnits<SizeUnits>> getRomcapacity(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getRomcapacity_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new RealWithUnits<>(resolved, SizeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.contrib.aadlproject.SizeUnits in project osate2 by osate.
the class Sei method getRambudget.
public static Optional<RealWithUnits<SizeUnits>> getRambudget(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getRambudget_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new RealWithUnits<>(resolved, SizeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.contrib.aadlproject.SizeUnits in project osate2 by osate.
the class Sei method getRamactual.
public static Optional<RealWithUnits<SizeUnits>> getRamactual(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getRamactual_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new RealWithUnits<>(resolved, SizeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
Aggregations