Skip to content

Generate Getters for Property Constants #2632

@AaronGreenhouse

Description

@AaronGreenhouse

The property code generator should generate getter methods for property constants.

An example of the need for these is in Aadl2Validator, in the methods classifiersFoundInSupported* methods, where the value of the relevant property constant is retrieved and the values checked to make sure the references items exist.

I'm trying to get rid of the use of GetProperties methods, and right now there is no suitable replacement for the existing code, which all have a from like

		PropertyConstant matchesPropertyConstant = GetProperties.lookupPropertyConstant(connection,
				AadlProject.SUPPORTED_CLASSIFIER_COMPLEMENT_MATCHES);
		if (matchesPropertyConstant == null) {
			return false;
		}
		PropertyExpression constantValue = matchesPropertyConstant.getConstantValue();
		if (!(constantValue instanceof ListValue)) {
			return false;
		}

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions