List of usage examples for org.eclipse.jdt.internal.compiler.ast SingleMemberAnnotation memberValuePairs
@Override
public MemberValuePair[] memberValuePairs()
From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MethodLocator.java
License:Open Source License
public int resolveLevel(ASTNode possibleMatchingNode) { if (this.pattern.findReferences) { if (possibleMatchingNode instanceof MessageSend) { return resolveLevel((MessageSend) possibleMatchingNode); }//from w w w . j av a2 s. c o m if (possibleMatchingNode instanceof SingleMemberAnnotation) { SingleMemberAnnotation annotation = (SingleMemberAnnotation) possibleMatchingNode; return resolveLevel(annotation.memberValuePairs()[0].binding); } if (possibleMatchingNode instanceof MemberValuePair) { MemberValuePair memberValuePair = (MemberValuePair) possibleMatchingNode; return resolveLevel(memberValuePair.binding); } } if (this.pattern.findDeclarations) { if (possibleMatchingNode instanceof MethodDeclaration) { return resolveLevel(((MethodDeclaration) possibleMatchingNode).binding); } } return IMPOSSIBLE_MATCH; }
From source file:org.eclipse.che.jdt.internal.core.search.matching.MethodLocator.java
License:Open Source License
public int resolveLevel(ASTNode possibleMatchingNode) { if (this.pattern.findReferences) { if (possibleMatchingNode instanceof MessageSend) { return resolveLevel((MessageSend) possibleMatchingNode); }//w w w. j a va2 s . c o m if (possibleMatchingNode instanceof SingleMemberAnnotation) { SingleMemberAnnotation annotation = (SingleMemberAnnotation) possibleMatchingNode; return resolveLevel(annotation.memberValuePairs()[0].binding); } if (possibleMatchingNode instanceof MemberValuePair) { MemberValuePair memberValuePair = (MemberValuePair) possibleMatchingNode; return resolveLevel(memberValuePair.binding); } if (possibleMatchingNode instanceof ReferenceExpression) { return resolveLevel((ReferenceExpression) possibleMatchingNode); } } if (this.pattern.findDeclarations) { if (possibleMatchingNode instanceof MethodDeclaration) { return resolveLevel(((MethodDeclaration) possibleMatchingNode).binding); } if (possibleMatchingNode instanceof LambdaExpression) { return resolveLevel(((LambdaExpression) possibleMatchingNode).descriptor); } } return IMPOSSIBLE_MATCH; }