Class AggregatorUtil


  • public class AggregatorUtil
    extends java.lang.Object
    Since:
    2.0
    • Constructor Detail

      • AggregatorUtil

        public AggregatorUtil()
    • Method Detail

      • getReturnTypes

        public static java.util.List<org.eclipse.xtext.common.types.JvmType> getReturnTypes​(org.eclipse.xtext.common.types.JvmDeclaredType aggregatorType)
      • getParameterTypes

        public static java.util.List<org.eclipse.xtext.common.types.JvmType> getParameterTypes​(org.eclipse.xtext.common.types.JvmDeclaredType aggregatorType)
      • mustHaveAggregatorVariables

        public static boolean mustHaveAggregatorVariables​(AggregatedValue value)
        An aggregator expression may only have aggregated value as parameters if the corresponding AggregatorType annotation does not define a single Void parameter. However, in that case, it _must_ have an aggregate parameter.
      • getAggregateVariableIndex

        public static int getAggregateVariableIndex​(AggregatedValue value)
      • getAggregatorVariable

        public static VariableReference getAggregatorVariable​(AggregatedValue value)
        Returns the aggregate variable the aggregator should work with. Given in a well-formed AggregatedValue only a single aggregate variable should be present, this should be unique.
      • getAllAggregatorVariables

        public static java.util.List<VariableReference> getAllAggregatorVariables​(AggregatedValue value)
        Returns all aggregate variables of the AggregatedValue. If the AggregatedValue has more aggregate variables, it represents an error in the specification.