private boolean internalVisit(Annotation annotation) { if (annotation.getCompilerAnnotation() == m_binding) { m_result = annotation; } return m_result == null; } }
synchronized IAnnotationBinding resolveAnnotation(final Annotation domASTNode) { Object oldNode = this.newAstToOldAst.get(domASTNode); if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) { org.eclipse.jdt.internal.compiler.ast.Annotation internalAstNode = (org.eclipse.jdt.internal.compiler.ast.Annotation) oldNode; IAnnotationBinding domAnnotation = getAnnotationInstance(internalAstNode.getCompilerAnnotation()); if (domAnnotation == null) return null; this.bindingsToAstNodes.put(domAnnotation, domASTNode); return domAnnotation; } return null; }
synchronized IAnnotationBinding resolveAnnotation(final Annotation domASTNode) { Object oldNode = this.newAstToOldAst.get(domASTNode); if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) { org.eclipse.jdt.internal.compiler.ast.Annotation internalAstNode = (org.eclipse.jdt.internal.compiler.ast.Annotation) oldNode; IAnnotationBinding domAnnotation = getAnnotationInstance(internalAstNode.getCompilerAnnotation()); if (domAnnotation == null) return null; this.bindingsToAstNodes.put(domAnnotation, domASTNode); return domAnnotation; } return null; }
synchronized IAnnotationBinding resolveAnnotation(final Annotation domASTNode) { Object oldNode = this.newAstToOldAst.get(domASTNode); if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) { org.eclipse.jdt.internal.compiler.ast.Annotation internalAstNode = (org.eclipse.jdt.internal.compiler.ast.Annotation) oldNode; IAnnotationBinding domAnnotation = getAnnotationInstance(internalAstNode.getCompilerAnnotation()); if (domAnnotation == null) return null; this.bindingsToAstNodes.put(domAnnotation, domASTNode); return domAnnotation; } return null; }
@Override synchronized IAnnotationBinding resolveAnnotation(final Annotation domASTNode) { Object oldNode = this.newAstToOldAst.get(domASTNode); if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) { org.eclipse.jdt.internal.compiler.ast.Annotation internalAstNode = (org.eclipse.jdt.internal.compiler.ast.Annotation) oldNode; IAnnotationBinding domAnnotation = getAnnotationInstance(internalAstNode.getCompilerAnnotation()); if (domAnnotation == null) return null; this.bindingsToAstNodes.put(domAnnotation, domASTNode); return domAnnotation; } return null; }
synchronized IAnnotationBinding resolveAnnotation(final Annotation domASTNode) { Object oldNode = this.newAstToOldAst.get(domASTNode); if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) { org.eclipse.jdt.internal.compiler.ast.Annotation internalAstNode = (org.eclipse.jdt.internal.compiler.ast.Annotation) oldNode; IAnnotationBinding domAnnotation = getAnnotationInstance(internalAstNode.getCompilerAnnotation()); if (domAnnotation == null) return null; this.bindingsToAstNodes.put(domAnnotation, domASTNode); return domAnnotation; } return null; }
synchronized IAnnotationBinding resolveAnnotation(final Annotation domASTNode) { Object oldNode = this.newAstToOldAst.get(domASTNode); if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.Annotation) { org.eclipse.jdt.internal.compiler.ast.Annotation internalAstNode = (org.eclipse.jdt.internal.compiler.ast.Annotation) oldNode; IAnnotationBinding domAnnotation = getAnnotationInstance(internalAstNode.getCompilerAnnotation()); if (domAnnotation == null) return null; this.bindingsToAstNodes.put(domAnnotation, domASTNode); return domAnnotation; } return null; }
private static Annotation findAnnotation(Annotation elementAnnotation, AnnotationBinding annotationBinding) { if (annotationBinding == elementAnnotation.getCompilerAnnotation()) { return elementAnnotation; } MemberValuePair[] memberValuePairs = elementAnnotation.memberValuePairs(); for (MemberValuePair mvp : memberValuePairs) { Expression v = mvp.value; if (v instanceof Annotation) { Annotation a = findAnnotation((Annotation) v, annotationBinding); if (a != null) { return a; } } else if (v instanceof ArrayInitializer) { Expression[] expressions = ((ArrayInitializer) v).expressions; for (Expression e : expressions) { if (e instanceof Annotation) { Annotation a = findAnnotation((Annotation) e, annotationBinding); if (a != null) { return a; } } } } } return null; }
private static Annotation findAnnotation(Annotation elementAnnotation, AnnotationBinding annotationBinding) { if (annotationBinding == elementAnnotation.getCompilerAnnotation()) { return elementAnnotation; } MemberValuePair[] memberValuePairs = elementAnnotation.memberValuePairs(); for (MemberValuePair mvp : memberValuePairs) { Expression v = mvp.value; if (v instanceof Annotation) { Annotation a = findAnnotation((Annotation) v, annotationBinding); if (a != null) { return a; } } else if (v instanceof ArrayInitializer) { Expression[] expressions = ((ArrayInitializer) v).expressions; for (Expression e : expressions) { if (e instanceof Annotation) { Annotation a = findAnnotation((Annotation) e, annotationBinding); if (a != null) { return a; } } } } } return null; }
private static Annotation findAnnotation(Annotation elementAnnotation, AnnotationBinding annotationBinding) { if (annotationBinding == elementAnnotation.getCompilerAnnotation()) { return elementAnnotation; } MemberValuePair[] memberValuePairs = elementAnnotation.memberValuePairs(); for (MemberValuePair mvp : memberValuePairs) { Expression v = mvp.value; if (v instanceof Annotation) { Annotation a = findAnnotation((Annotation) v, annotationBinding); if (a != null) { return a; } } else if (v instanceof ArrayInitializer) { Expression[] expressions = ((ArrayInitializer) v).expressions; for (Expression e : expressions) { if (e instanceof Annotation) { Annotation a = findAnnotation((Annotation) e, annotationBinding); if (a != null) { return a; } } } } } return null; }
return ((Annotation) expression).getCompilerAnnotation(); if (expression instanceof ArrayInitializer) { Expression[] exprs = ((ArrayInitializer) expression).expressions;
AnnotationBinding[] annotationBindings = new AnnotationBinding[length]; for (int i = 0; i < length; i++) { AnnotationBinding compilerAnnotation = annotations[i].getCompilerAnnotation(); if (compilerAnnotation == null) { return Binding.NO_ANNOTATIONS;
return ((Annotation) expression).getCompilerAnnotation(); if (expression instanceof ArrayInitializer) { Expression[] exprs = ((ArrayInitializer) expression).expressions;
return ((Annotation) expression).getCompilerAnnotation(); if (expression instanceof ArrayInitializer) { Expression[] exprs = ((ArrayInitializer) expression).expressions;
return ((Annotation) expression).getCompilerAnnotation(); if (expression instanceof ArrayInitializer) { Expression[] exprs = ((ArrayInitializer) expression).expressions;
return ((Annotation) expression).getCompilerAnnotation(); if (expression instanceof ArrayInitializer) { Expression[] exprs = ((ArrayInitializer) expression).expressions;
AnnotationBinding[] annotationBindings = new AnnotationBinding[length]; for (int i = 0; i < length; i++) { AnnotationBinding compilerAnnotation = annotations[i].getCompilerAnnotation(); if (compilerAnnotation == null) { return Binding.NO_ANNOTATIONS;
private void resolveAnnotations( BlockScope scope, Annotation[] annotations, Binding currentBinding) { ASTNode.resolveAnnotations(scope, annotations, currentBinding); for (Annotation annotation : annotations) { AnnotationBinding binding = annotation.getCompilerAnnotation(); if (binding != null) { // binding should be resolved, but in case it's not, ignore it TypeElement anno = (TypeElement)_factory.newElement(binding.getAnnotationType()); Element element = _factory.newElement(currentBinding); _annoToElement.put(anno, element); } } } }
private void resolveAnnotations( BlockScope scope, Annotation[] annotations, Binding currentBinding) { ASTNode.resolveAnnotations(scope, annotations, currentBinding); for (Annotation annotation : annotations) { AnnotationBinding binding = annotation.getCompilerAnnotation(); if (binding != null) { // binding should be resolved, but in case it's not, ignore it TypeElement anno = (TypeElement)_factory.newElement(binding.getAnnotationType()); Element element = _factory.newElement(currentBinding); _annoToElement.put(anno, element); } } } }
private void resolveAnnotations( BlockScope scope, Annotation[] annotations, Binding currentBinding) { ASTNode.resolveAnnotations(scope, annotations, currentBinding); for (Annotation annotation : annotations) { AnnotationBinding binding = annotation.getCompilerAnnotation(); if (binding != null) { // binding should be resolved, but in case it's not, ignore it TypeElement anno = (TypeElement)_factory.newElement(binding.getAnnotationType()); Element element = _factory.newElement(currentBinding); _annoToElement.put(anno, element); } } } }