@Override public ElementValuePair[] computeElementValuePairs() { return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair}; }
public ElementValuePair[] computeElementValuePairs() { return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair}; }
public ElementValuePair[] computeElementValuePairs() { return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair}; }
public ElementValuePair[] computeElementValuePairs() { return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair}; }
public ElementValuePair[] computeElementValuePairs() { return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair}; }
public ElementValuePair[] computeElementValuePairs() { return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair}; }
public ElementValuePair[] computeElementValuePairs() { return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair}; }
public ElementValuePair[] computeElementValuePairs() { return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair}; }
public ElementValuePair[] computeElementValuePairs() { return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair}; }
public ElementValuePair[] computeElementValuePairs() { return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair}; }
public ElementValuePair[] computeElementValuePairs() { return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair}; }
public int resolveLevel(ASTNode possibleMatchingNode) { if (this.pattern.findReferences) { if (possibleMatchingNode instanceof MessageSend) { return resolveLevel((MessageSend) possibleMatchingNode); } 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; } public int resolveLevel(Binding binding) {
public int resolveLevel(ASTNode possibleMatchingNode) { if (this.pattern.findReferences) { if (possibleMatchingNode instanceof MessageSend) { return resolveLevel((MessageSend) possibleMatchingNode); } 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; } public int resolveLevel(Binding binding) {
public int resolveLevel(ASTNode possibleMatchingNode) { if (this.pattern.findReferences) { if (possibleMatchingNode instanceof MessageSend) { return resolveLevel((MessageSend) possibleMatchingNode); } 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; } public int resolveLevel(Binding binding) {
@Override public int resolveLevel(ASTNode possibleMatchingNode) { if (this.pattern.findReferences) { if (possibleMatchingNode instanceof MessageSend) { return resolveLevel((MessageSend) possibleMatchingNode); } 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; } @Override
public int resolveLevel(ASTNode possibleMatchingNode) { if (this.pattern.findReferences) { if (possibleMatchingNode instanceof MessageSend) { return resolveLevel((MessageSend) possibleMatchingNode); } 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; } public int resolveLevel(Binding binding) {
public int resolveLevel(ASTNode possibleMatchingNode) { if (this.pattern.findReferences) { if (possibleMatchingNode instanceof MessageSend) { return resolveLevel((MessageSend) possibleMatchingNode); } 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; } public int resolveLevel(Binding binding) {
} else { if (reference instanceof SingleMemberAnnotation) { reference = ((SingleMemberAnnotation)reference).memberValuePairs()[0]; this.match.setImplicit(true);
} else { if (reference instanceof SingleMemberAnnotation) { reference = ((SingleMemberAnnotation)reference).memberValuePairs()[0]; this.match.setImplicit(true);
@Nullable private EcjPsiAnnotation toAnnotation( @NonNull EcjPsiSourceElement parent, @NonNull Annotation ecjAnnotation) { EcjPsiAnnotation psiAnnotation = new EcjPsiAnnotation(mManager, ecjAnnotation); parent.adoptChild(psiAnnotation); EcjPsiJavaCodeReferenceElement nameElement = toTypeReference( psiAnnotation, ecjAnnotation.type); psiAnnotation.setNameElement(nameElement); //noinspection StatementWithEmptyBody if (ecjAnnotation instanceof MarkerAnnotation) { // Nothing to do } else if (ecjAnnotation instanceof NormalAnnotation) { NormalAnnotation na = (NormalAnnotation) ecjAnnotation; psiAnnotation.setParameterList(toAnnotationParameterList(psiAnnotation, na.memberValuePairs)); } else if (ecjAnnotation instanceof SingleMemberAnnotation) { SingleMemberAnnotation na = (SingleMemberAnnotation) ecjAnnotation; psiAnnotation.setParameterList(toAnnotationParameterList(psiAnnotation, na.memberValuePairs())); } return psiAnnotation; }