Class VariableExtension
java.lang.Object
org.emftext.language.java.extensions.variables.VariableExtension
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic IdentifierReference
createMethodCall
(Variable me, String methodName, EList<Expression> arguments) Creates an expression that calls the method with the given name on this variable.static ExpressionStatement
createMethodCallStatement
(Variable me, String methodName, EList<Expression> arguments) Creates a statement that calls the method with the given name on this variable.
-
Constructor Details
-
VariableExtension
public VariableExtension()
-
-
Method Details
-
createMethodCallStatement
public static ExpressionStatement createMethodCallStatement(Variable me, String methodName, EList<Expression> arguments) Creates a statement that calls the method with the given name on this variable. If the variable's type does not offer such a method, null is returned.- Parameters:
me
- the given variable.methodName
- name of the called method.arguments
- arguments of the method call.- Returns:
- the created call statement.
-
createMethodCall
public static IdentifierReference createMethodCall(Variable me, String methodName, EList<Expression> arguments) Creates an expression that calls the method with the given name on this variable. If the variable's type does not offer such a method, null is returned.- Parameters:
me
- the given variable.methodName
- the name of the called method.arguments
- the arguments of the called method.- Returns:
- the reference.
-