Class MethodExtension
- java.lang.Object
-
- org.emftext.language.java.extensions.members.MethodExtension
-
public class MethodExtension extends Object
-
-
Constructor Summary
Constructors Constructor Description MethodExtension()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BlockgetBlock(Method me)Returns a block representing the body of a method.static EList<Statement>getStatements(Method me)Deprecated.Use getBlock().getStatements().static booleanisBetterMethodForCall(Method me, Method otherMethod, MethodCall methodCall)static booleanisMethodForCall(Method me, MethodCall methodCall, boolean needsPerfectMatch)static booleanisSomeMethodForCall(Method me, MethodCall methodCall)Returnstrueif the given method matches the given call.
-
-
-
Method Detail
-
isSomeMethodForCall
public static boolean isSomeMethodForCall(Method me, MethodCall methodCall)
Returnstrueif the given method matches the given call.- Parameters:
methodCall-- Returns:
-
isBetterMethodForCall
public static boolean isBetterMethodForCall(Method me, Method otherMethod, MethodCall methodCall)
Returnstrueif the givenMethodmeis a better match for the given method call thanMethodotherMethod.- Parameters:
otherMethod-methodCall-- Returns:
-
isMethodForCall
public static boolean isMethodForCall(Method me, MethodCall methodCall, boolean needsPerfectMatch)
-
getStatements
@Deprecated public static EList<Statement> getStatements(Method me)
Deprecated.Use getBlock().getStatements().Returns a list of all statements within the block of a method. This is a legacy method to provide a stable and backwards-compatible API.- Parameters:
me- the method for which the statements are obtained.- Returns:
- the list of all statements.
-
-