Methode permettant de verifier si une annotation est
compatible avec le Framework jpersistence-tools
@param annotation	Annotation a controler
@return	Etat d'appartenance
422891
public static boolean isDAOValidatorAnnotation(Annotation annotation) {
		
		// Si lm'annotation est nulle
		if(annotation == null) {
			
			// On retourne false
			return false;
		}
		
		// Obtention de la classe de cette annotation
		Class<?> annotationClass = annotation.annotationType();
		
		// Recherchje de l'annotation de validation
		DAOConstraint logicAnnotation = annotationClass.getAnnotation(DAOConstraint.class);
		
		// On retourne le resultat
		return logicAnnotation != null;
	}
33016
public static IAnnotationBinding getAnnotationBinding(
            IAnnotationBinding[] annotations, String annotationClassName) {
        if (annotations == null) {
            return null;
        }
        if (annotationClassName == null) {
            throw new NullPointerException();
        }

        for (IAnnotationBinding annotation : annotations) {
            String qName = annotation.getAnnotationType().getBinaryName();
            assert qName != null;
            // TODO if multiple annotations for annotationClassName exists
            if (qName.equals(annotationClassName)) {
                return annotation;
            }
        }
        return null;
    }
1344608
public static Class<? extends IDAOGeneratorManager<? extends Annotation>> getGenerationLogicClass(Annotation annotation) {
		
		// Si l'annotation est nulle
		if(annotation == null) {
			
			// On retourne null
			return null;
		}
		
		// Recherche dans la MAP
		Class<? extends IDAOGeneratorManager<? extends Annotation>> mappedLogicClass = mGeneratorMapping.get(annotation.annotationType().getName());
		
		// Si la Classe est non nulle
		if(mappedLogicClass != null) return mappedLogicClass;
		
		// Obtention de l'annotation DAO
		DAOGeneratorManager logicAnnotation = annotation.annotationType().getAnnotation(DAOGeneratorManager.class);
		
		// On retourne cette annotation
		return logicAnnotation.managerClass();
	}
1055079
public <T extends Annotation> Optional<T> getAnnotation( String annotation ) {
        return CreatorUtils.getAnnotation( annotation, accessors );
    }
841347
public static Optional<Annotation> getQualifier(AnnotatedElement annotatedElement) {
        AnnotatedElement cleanedAnnotatedElement;
        if (annotatedElement instanceof Class<?>) {
            cleanedAnnotatedElement = ProxyUtils.cleanProxy((Class<?>) annotatedElement);
        } else {
            cleanedAnnotatedElement = annotatedElement;
        }
        return Annotations.on(cleanedAnnotatedElement)
                .findAll()
                .filter(AnnotationPredicates.annotationAnnotatedWith(Qualifier.class, false))
                .findFirst();
    }
435869
public static <A extends Annotation> A getAnnotation(final Method method, final Class<A> annotationType) {
        A ann = method.getAnnotation(annotationType);
        if (ann == null) {
            for (final Annotation metaAnn : method.getAnnotations()) {
                ann = metaAnn.annotationType().getAnnotation(annotationType);
                if (ann != null) {
                    break;
                }
            }
        }
        return ann;
    }
813191
public Annotation asAnnotation() {
      if (this instanceof Annotation) {
         return Cast.as(this);
      } else if (document() != null) {
         return document()
                   .annotationBuilder()
                   .type(AnnotationType.ROOT)
                   .bounds(this)
                   .attributes(this)
                   .createDetached();
      }
      return Fragments.detachedAnnotation(AnnotationType.ROOT, start(), end());
   }
1217420
function(annotation) {
			if (!annotation) { return; }
			var index = this._getAnnotationIndex(annotation);
			if (index < 0) { return; }
			annotation._annotationModel = null;
			var e = {
				type: "Changed", //$NON-NLS-0$
				removed: this._annotations.splice(index, 1),
				added: [],
				changed: []
			};
			this.onChanged(e);
		}
312654
private List<Annotation> buildDeclaredAnnotationList(final Annotation annotation) {
        final List<Annotation> list = Arrays.stream(annotation.annotationType().getDeclaredAnnotations())
                .collect(Collectors.toList());
        list.add(annotation);
        return list;
    }
759088
public static void deleteAnnotationIfNeccessary(JavacNode annotation, Class<? extends Annotation> annotationType) {
		deleteAnnotationIfNeccessary0(annotation, annotationType.getName());
	}
1365101
public static Annotation cloneAnnotation(ConstPool constPool, java.lang.annotation.Annotation annotation) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
		Class<?> clazz = annotation.annotationType();

		Annotation annot = new Annotation(clazz.getName(), constPool);
		for(Method method : clazz.getDeclaredMethods()) {
			MemberValue memberVal = null;
			
			if (method.getReturnType().isArray()) {
				List<MemberValue> memberVals = new LinkedList<MemberValue>();
				for(Object val : (Object[])method.invoke(annotation)) {
					memberVals.add(createMemberValue(constPool, val));
				}
				memberVal = new ArrayMemberValue(constPool);
				((ArrayMemberValue)memberVal).setValue(memberVals.toArray(new MemberValue[]{}));
			} else {
				memberVal = createMemberValue(constPool, method.invoke(annotation));
			}
			annot.addMemberValue(method.getName(), memberVal);
		}
		return annot;
	}
1357659
public AnnotatedTypeBuilder<X> addToMethod(Method method, Annotation annotation) {
       if (methods.get(method) == null) {
           methods.put(method, new AnnotationBuilder());
       }
       methods.get(method).add(annotation);
       return this;
   }
148912
@Nullable
	public String getValueFrom(Annotation annotation) {

		Assert.notNull(annotation, "Annotation must not be null!");
		return (String) (attributeName == null ? AnnotationUtils.getValue(annotation) : AnnotationUtils.getValue(
				annotation, attributeName));
	}
235781
@Override
	public void initialize(AuthorizedValues annotation) {
		
		// Si l'annotation est nulle : on sort
		if(annotation == null) return;
		
		// Obtention de la liste
		String[] annotationValues = annotation.values();
		
		// Si la liste de l'annotation est vide : on sort
		if(annotationValues == null || annotationValues.length == 0) return;
		
		// On affecte la liste de valeurs
		values = annotationValues;
		
		// On affecte l'état de prise en compte de la casse
		caseSensitive = annotation.caseSensitive();
	}
48937
public Set<Field> getFieldsAnnotatedWith(final Annotation annotation) {
        return filter(getFieldsAnnotatedWith(annotation.annotationType()), withAnnotation(annotation));
    }
636902
@SuppressWarnings("unchecked")
	public List<MethodParameter> getParametersWith(Class<? extends Annotation> annotation) {

		Assert.notNull(annotation, "Annotation must not be null!");

		return parametersWithAnnotationCache.computeIfAbsent(annotation, key -> {

			return getParameters().stream()//
					.filter(it -> it.hasParameterAnnotation((Class<? extends Annotation>) key))//
					.collect(Collectors.toList());
		});
	}
312832
public AnnotationVisitor getAnnotationVisitor() {
        return new AnnotationVisitor(FindBugsASM.ASM_VERSION) {
            @Override
            public void visit(String name, Object value) {
                name = canonicalString(name);
                valueMap.put(name, value);
            }

            /*
             * (non-Javadoc)
             *
             * @see
             * org.objectweb.asm.AnnotationVisitor#visitAnnotation(java.lang
             * .String, java.lang.String)
             */
            @Override
            public AnnotationVisitor visitAnnotation(String name, String desc) {
                name = canonicalString(name);
                AnnotationValue newValue = new AnnotationValue(desc);
                valueMap.put(name, newValue);
                typeMap.put(name, desc);
                return newValue.getAnnotationVisitor();
            }

            /*
             * (non-Javadoc)
             *
             * @see
             * org.objectweb.asm.AnnotationVisitor#visitArray(java.lang.String)
             */
            @Override
            public AnnotationVisitor visitArray(String name) {
                name = canonicalString(name);
                return new AnnotationArrayVisitor(name);
            }

            /*
             * (non-Javadoc)
             *
             * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
             */
            @Override
            public void visitEnd() {

            }

            /*
             * (non-Javadoc)
             *
             * @see
             * org.objectweb.asm.AnnotationVisitor#visitEnum(java.lang.String,
             * java.lang.String, java.lang.String)
             */
            @Override
            public void visitEnum(String name, String desc, String value) {
                name = canonicalString(name);
                valueMap.put(name, new EnumValue(desc, value));
                typeMap.put(name, desc);

            }
        };
    }