Class AggregatorUtil
- java.lang.Object
-
- org.eclipse.viatra.query.patternlanguage.emf.util.AggregatorUtil
-
public class AggregatorUtil extends java.lang.Object
- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description AggregatorUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getAggregateVariableIndex(AggregatedValue value)
static VariableReference
getAggregatorVariable(AggregatedValue value)
Returns the aggregate variable the aggregator should work with.static java.util.List<VariableReference>
getAllAggregatorVariables(AggregatedValue value)
Returns all aggregate variables of the AggregatedValue.static java.util.List<org.eclipse.xtext.common.types.JvmType>
getParameterTypes(org.eclipse.xtext.common.types.JvmDeclaredType aggregatorType)
static java.util.List<org.eclipse.xtext.common.types.JvmType>
getReturnTypes(org.eclipse.xtext.common.types.JvmDeclaredType aggregatorType)
static boolean
mustHaveAggregatorVariables(AggregatedValue value)
An aggregator expression may only have aggregated value as parameters if the correspondingAggregatorType
annotation does not define a single Void parameter.
-
-
-
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 correspondingAggregatorType
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.
-
-