Class Utils
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.buildlangModel.Utils
-
public class Utils extends java.lang.ObjectSome VTL utility methods.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Modifier Constructor Description privateUtils()Prevents external creation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExpressionVersionRestrictioncreateSingleRestriction(Script parent, java.lang.String operation, Version version)Creates a single restriction.static ExpressionfindLastExpression(IRuleBlock block)Returns the last expression of the given rule block.static ExpressionStatementfindLastExpressionStatement(IRuleBlock block)Returns the last expression of the given rule block.
-
-
-
Method Detail
-
createSingleRestriction
public static ExpressionVersionRestriction createSingleRestriction(Script parent, java.lang.String operation, Version version) throws RestrictionEvaluationException
Creates a single restriction.- Parameters:
parent- the parent object (usually the script)operation- the operation name to be executedversion- the version to be compared- Returns:
- the restriction object
- Throws:
RestrictionEvaluationException- in case of expression problems
-
findLastExpressionStatement
public static ExpressionStatement findLastExpressionStatement(IRuleBlock block)
Returns the last expression of the given rule block.- Parameters:
block- the block to search- Returns:
- the last expression
-
findLastExpression
public static Expression findLastExpression(IRuleBlock block)
Returns the last expression of the given rule block.- Parameters:
block- the block to search- Returns:
- the last expression
-
-