List of usage examples for org.eclipse.jdt.core.dom StringLiteral getLocationInParent
public final StructuralPropertyDescriptor getLocationInParent()
null
if this is a root node. 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 . ja v a2s .c o m // 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; }