List of usage examples for org.eclipse.jdt.core.dom MethodInvocation getStructuralProperty
public final Object getStructuralProperty(StructuralPropertyDescriptor property)
From source file:org.eclipse.babel.tapiji.tools.java.util.ASTutils.java
License:Open Source License
public static boolean isMatchingMethodParamDesc(MethodInvocation methodInvocation, StringLiteral literal, MethodParameterDescriptor desc) { int keyParameter = desc.getPosition(); boolean result = isMatchingMethodDescriptor(methodInvocation, desc); if (!result) { return false; }//from w w w . j av a2s .c om // Check position within method call StructuralPropertyDescriptor spd = literal.getLocationInParent(); if (spd.isChildListProperty()) { @SuppressWarnings("unchecked") List<ASTNode> arguments = (List<ASTNode>) methodInvocation.getStructuralProperty(spd); result = (arguments.size() > keyParameter && arguments.get(keyParameter) == literal); } return result; }