Search in sources :

Example 16 with PropertyConstant

use of org.osate.aadl2.PropertyConstant in project osate2 by osate.

the class AadlProject method getSupportedTypeConversions.

public static List<List<Classifier>> getSupportedTypeConversions(EObject lookupContext) {
    PropertyConstant constant = getSupportedTypeConversions_PropertyConstant(lookupContext);
    PropertyExpression resolved = CodeGenUtil.resolveNamedValue(constant.getConstantValue());
    return ((ListValue) resolved).getOwnedListElements().stream().map(element1 -> {
        PropertyExpression resolved1 = CodeGenUtil.resolveNamedValue(element1);
        return ((ListValue) resolved1).getOwnedListElements().stream().map(element2 -> {
            PropertyExpression resolved2 = CodeGenUtil.resolveNamedValue(element2);
            return ((ClassifierValue) resolved2).getClassifier();
        }).collect(Collectors.toList());
    }).collect(Collectors.toList());
}
Also used : ClassifierValue(org.osate.aadl2.ClassifierValue) ListValue(org.osate.aadl2.ListValue) IntegerWithUnits(org.osate.pluginsupport.properties.IntegerWithUnits) IntegerLiteral(org.osate.aadl2.IntegerLiteral) EObject(org.eclipse.emf.ecore.EObject) PropertyConstant(org.osate.aadl2.PropertyConstant) Collectors(java.util.stream.Collectors) Aadl2GlobalScopeUtil(org.osate.aadl2.modelsupport.scoping.Aadl2GlobalScopeUtil) PropertyExpression(org.osate.aadl2.PropertyExpression) CodeGenUtil(org.osate.pluginsupport.properties.CodeGenUtil) List(java.util.List) Classifier(org.osate.aadl2.Classifier) Aadl2Package(org.osate.aadl2.Aadl2Package) ClassifierValue(org.osate.aadl2.ClassifierValue) ListValue(org.osate.aadl2.ListValue) PropertyExpression(org.osate.aadl2.PropertyExpression) PropertyConstant(org.osate.aadl2.PropertyConstant)

Example 17 with PropertyConstant

use of org.osate.aadl2.PropertyConstant in project osate2 by osate.

the class AadlProject method getMaxByteCount.

public static long getMaxByteCount(EObject lookupContext) {
    PropertyConstant constant = getMaxByteCount_PropertyConstant(lookupContext);
    PropertyExpression resolved = CodeGenUtil.resolveNamedValue(constant.getConstantValue());
    return ((IntegerLiteral) resolved).getValue();
}
Also used : PropertyExpression(org.osate.aadl2.PropertyExpression) PropertyConstant(org.osate.aadl2.PropertyConstant) IntegerLiteral(org.osate.aadl2.IntegerLiteral)

Example 18 with PropertyConstant

use of org.osate.aadl2.PropertyConstant in project osate2 by osate.

the class AadlProject method getMaxAadlinteger.

public static long getMaxAadlinteger(EObject lookupContext) {
    PropertyConstant constant = getMaxAadlinteger_PropertyConstant(lookupContext);
    PropertyExpression resolved = CodeGenUtil.resolveNamedValue(constant.getConstantValue());
    return ((IntegerLiteral) resolved).getValue();
}
Also used : PropertyExpression(org.osate.aadl2.PropertyExpression) PropertyConstant(org.osate.aadl2.PropertyConstant) IntegerLiteral(org.osate.aadl2.IntegerLiteral)

Example 19 with PropertyConstant

use of org.osate.aadl2.PropertyConstant in project osate2 by osate.

the class AadlProject method getMaxThreadLimit.

public static long getMaxThreadLimit(EObject lookupContext) {
    PropertyConstant constant = getMaxThreadLimit_PropertyConstant(lookupContext);
    PropertyExpression resolved = CodeGenUtil.resolveNamedValue(constant.getConstantValue());
    return ((IntegerLiteral) resolved).getValue();
}
Also used : PropertyExpression(org.osate.aadl2.PropertyExpression) PropertyConstant(org.osate.aadl2.PropertyConstant) IntegerLiteral(org.osate.aadl2.IntegerLiteral)

Example 20 with PropertyConstant

use of org.osate.aadl2.PropertyConstant in project osate2 by osate.

the class AadlProject method getMaxWordSpace.

public static long getMaxWordSpace(EObject lookupContext) {
    PropertyConstant constant = getMaxWordSpace_PropertyConstant(lookupContext);
    PropertyExpression resolved = CodeGenUtil.resolveNamedValue(constant.getConstantValue());
    return ((IntegerLiteral) resolved).getValue();
}
Also used : PropertyExpression(org.osate.aadl2.PropertyExpression) PropertyConstant(org.osate.aadl2.PropertyConstant) IntegerLiteral(org.osate.aadl2.IntegerLiteral)

Aggregations

PropertyConstant (org.osate.aadl2.PropertyConstant)40 PropertyExpression (org.osate.aadl2.PropertyExpression)27 IntegerLiteral (org.osate.aadl2.IntegerLiteral)18 Property (org.osate.aadl2.Property)14 Classifier (org.osate.aadl2.Classifier)12 ClassifierValue (org.osate.aadl2.ClassifierValue)12 ListValue (org.osate.aadl2.ListValue)12 NamedValue (org.osate.aadl2.NamedValue)10 NamedElement (org.osate.aadl2.NamedElement)9 List (java.util.List)8 EObject (org.eclipse.emf.ecore.EObject)8 IntegerWithUnits (org.osate.pluginsupport.properties.IntegerWithUnits)7 AbstractNamedValue (org.osate.aadl2.AbstractNamedValue)6 ContainedNamedElement (org.osate.aadl2.ContainedNamedElement)6 ArraySize (org.osate.aadl2.ArraySize)5 BasicPropertyAssociation (org.osate.aadl2.BasicPropertyAssociation)5 ContainmentPathElement (org.osate.aadl2.ContainmentPathElement)5 PropertyType (org.osate.aadl2.PropertyType)5 Aadl2Package (org.osate.aadl2.Aadl2Package)4 ArrayDimension (org.osate.aadl2.ArrayDimension)4