use of org.osate.aadl2.contrib.aadlproject.SizeUnits in project osate2 by osate.
the class MemoryProperties method getHeapSize.
public static Optional<IntegerWithUnits<SizeUnits>> getHeapSize(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getHeapSize_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new IntegerWithUnits<>(resolved, SizeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.contrib.aadlproject.SizeUnits in project osate2 by osate.
the class MemoryProperties method getSourceHeapSize.
public static Optional<IntegerWithUnits<SizeUnits>> getSourceHeapSize(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getSourceHeapSize_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new IntegerWithUnits<>(resolved, SizeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.contrib.aadlproject.SizeUnits in project osate2 by osate.
the class MemoryProperties method getDataSize.
public static Optional<IntegerWithUnits<SizeUnits>> getDataSize(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getDataSize_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new IntegerWithUnits<>(resolved, SizeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.contrib.aadlproject.SizeUnits in project osate2 by osate.
the class MemoryProperties method getMemorySize.
public static Optional<IntegerWithUnits<SizeUnits>> getMemorySize(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getMemorySize_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new IntegerWithUnits<>(resolved, SizeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.contrib.aadlproject.SizeUnits in project osate2 by osate.
the class MemoryProperties method getSourceStackSize.
public static Optional<IntegerWithUnits<SizeUnits>> getSourceStackSize(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getSourceStackSize_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new IntegerWithUnits<>(resolved, SizeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
Aggregations