@Override public IAnnotationBinding[] getAnnotations() { return originalBinding.getAnnotations(); }
public static boolean isMockMethod(final IMethodBinding meth) { return meth != null && ASTUtil.isAnnotationPresent(meth.getAnnotations(), MOCK); }
private static void checkAnnotationsRemoval(IMethodBinding methodBinding) { fConversionRemovesAnnotations = false; IAnnotationBinding[] declarationAnnotations = methodBinding.getAnnotations(); for (IAnnotationBinding declarationAnnotation : declarationAnnotations) { ITypeBinding annotationType = declarationAnnotation.getAnnotationType(); if (annotationType != null) { String qualifiedName = annotationType.getQualifiedName(); if (!"java.lang.Override".equals(qualifiedName) && !"java.lang.Deprecated".equals(qualifiedName)) { //$NON-NLS-1$ //$NON-NLS-2$ fConversionRemovesAnnotations = true; return; } } } }
private static void checkAnnotationsRemoval(IMethodBinding methodBinding) { fConversionRemovesAnnotations= false; IAnnotationBinding[] declarationAnnotations= methodBinding.getAnnotations(); for (IAnnotationBinding declarationAnnotation : declarationAnnotations) { ITypeBinding annotationType= declarationAnnotation.getAnnotationType(); if (annotationType != null) { String qualifiedName= annotationType.getQualifiedName(); if (!"java.lang.Override".equals(qualifiedName) && !"java.lang.Deprecated".equals(qualifiedName)) { //$NON-NLS-1$ //$NON-NLS-2$ fConversionRemovesAnnotations= true; return; } } } }
private static void checkAnnotationsRemoval(IMethodBinding methodBinding) { fConversionRemovesAnnotations= false; IAnnotationBinding[] declarationAnnotations= methodBinding.getAnnotations(); for (IAnnotationBinding declarationAnnotation : declarationAnnotations) { ITypeBinding annotationType= declarationAnnotation.getAnnotationType(); if (annotationType != null) { String qualifiedName= annotationType.getQualifiedName(); if (!"java.lang.Override".equals(qualifiedName) && !"java.lang.Deprecated".equals(qualifiedName)) { //$NON-NLS-1$ //$NON-NLS-2$ fConversionRemovesAnnotations= true; return; } } } }
private boolean annotatesDeclaredMethods(ITypeBinding type) { IMethodBinding[] declaredMethods= type.getDeclaredMethods(); for (int i= 0; i < declaredMethods.length; i++) { IMethodBinding curr= declaredMethods[i]; if (annotates(curr.getAnnotations())) { return true; } } return false; }
private boolean hasSignificantAnnotations(final IMethodBinding methodBinding) { for (final IAnnotationBinding annotation : methodBinding.getAnnotations()) { final ITypeBinding annotationType = annotation.getAnnotationType(); if (!hasType(annotationType, "java.lang.Override", "java.lang.SuppressWarnings")) { return true; } } return false; } }
public static boolean isReentrantMockMethod(final IMethodBinding meth) { IAnnotationBinding ann = ASTUtil.findAnnotation(meth.getAnnotations(), MOCK); if (ann != null) { for (IMemberValuePairBinding pair : ann.getDeclaredMemberValuePairs()) { if ("reentrant".equals(pair.getName())) { return Boolean.valueOf(pair.getValue().toString()); } } } return false; }
public boolean annotatesAtLeastOneMethod(ITypeBinding type) { while (type != null) { IMethodBinding[] declaredMethods = type.getDeclaredMethods(); for (IMethodBinding curr : declaredMethods) { if (annotates(curr.getAnnotations())) { return true; } } type = type.getSuperclass(); } return false; } }
public boolean annotatesAtLeastOneMethod(ITypeBinding type, String qualifiedName) { while (type != null) { IMethodBinding[] declaredMethods= type.getDeclaredMethods(); for (int i= 0; i < declaredMethods.length; i++) { IMethodBinding curr= declaredMethods[i]; if (annotates(curr.getAnnotations(), qualifiedName)) { return true; } } type= type.getSuperclass(); } return false; }
public boolean annotatesAtLeastOneMethod(ITypeBinding type) { while (type != null) { IMethodBinding[] declaredMethods= type.getDeclaredMethods(); for (int i= 0; i < declaredMethods.length; i++) { IMethodBinding curr= declaredMethods[i]; if (annotates(curr.getAnnotations())) { return true; } } type= type.getSuperclass(); } return false; } }
public boolean annotatesAtLeastOneMethod(ITypeBinding type) { while (type != null) { IMethodBinding[] declaredMethods= type.getDeclaredMethods(); for (int i= 0; i < declaredMethods.length; i++) { IMethodBinding curr= declaredMethods[i]; if (annotates(curr.getAnnotations())) { return true; } } type= type.getSuperclass(); } return false; } }
IAnnotationBinding[] annotations= method.getAnnotations();
IAnnotationBinding[] annotations= method.getAnnotations();