<p>
getAnnotatedFields.
</p>

@param clazz
a {@link java.lang.Class} object.
@param annotationClass
a {@link java.lang.Class} object.
@param <T>
a T object.
@return a {@link java.util.List} object.
6787
public static <T> List<Field> getAnnotatedFields(Class<?> clazz, Class<? extends Annotation> annotationClass) {
		List<Field> annotatedFields = new LinkedList<Field>();
		Field[] allFields = getAllDeclaredFields(clazz);
		for (Field field : allFields) {
			if (null != (field.getAnnotation(annotationClass))) {
				annotatedFields.add(field);
			}
		}
		return annotatedFields;
	}
898729
public static Field getField(String fieldName, Class<?> clazz) {
    Field field = null;
    try {
      field = clazz.getDeclaredField(fieldName);
    }
    catch (SecurityException e) {
      throw LOG.unableToAccessField(field, clazz.getName());
    }
    catch (NoSuchFieldException e) {
      // for some reason getDeclaredFields doesnt search superclasses
      // (which getFields() does ... but that gives only public fields)
      Class<?> superClass = clazz.getSuperclass();
      if (superClass != null) {
        return getField(fieldName, superClass);
      }
    }
    return field;
  }
822572
public <T> T getAnnotation(Class<T> annotationClass) {
        for (Annotation annotation : m_annotations) {
            if (annotation.annotationType().equals(annotationClass)){
                return (T) annotation;
            }
        }
        return null;
    }
865404
public <T> Mapping<T> getMapping(Class<T> clazz, boolean includeParentFields) {
        return getMapping(clazz, new DefaultAnnotationSet(), includeParentFields);
    }
382213
public static Field getField(final Class<?> clazz, final String fieldName) {
        //Define return type
        //
        Field
            field = null;

        //For each class in the hierarchy starting with the current class, try to find the declared field
        //
        for (Class<?> current = clazz; current != null && field == null; current = current.getSuperclass()) {
            try {
                //Attempt to get the field, if exception is thrown continue to the next class
                //
                field =
                    current
                        .getDeclaredField(
                            fieldName
                        );
            }
            catch (final NoSuchFieldException e) {
                //ignore and continue searching
                //
            }
        }

        //Return the field we found
        //
        return
            field;
    }
816102
public ClassDocImpl getClassDoc(ClassSymbol clazz) {
        ClassDocImpl result = classMap.get(clazz);
        if (result != null) return result;
        if (isAnnotationType(clazz)) {
            result = new AnnotationTypeDocImpl(this, clazz);
        } else {
            result = new ClassDocImpl(this, clazz);
        }
        classMap.put(clazz, result);
        return result;
    }
290188
public static final <T extends Annotation> T getAnnotation(Object bean, String property, Class<T> annotationClass)
    {
        return (T) doFor(
            bean, 
            property, 
            null,
            (Object a, int i)->{Object o=Array.get(a, i);return o!=null?o.getClass().getAnnotation(annotationClass):null;},
            (List l, int i)->{return l.get(i).getClass().getAnnotation(annotationClass);},
            (Object b, Class c, String p)->{return getField(c, p).getAnnotation(annotationClass);}, 
            (Object b, Method m)->{return m.getAnnotation(annotationClass);});
    }
24626
public static List<Field> getKeyColumns(Class<?> clazz) 
	    throws NoKeyColumnAnnotationException {
		List<Field> fields = getColumns(clazz);
		List<Field> keyFields = new ArrayList<Field>();
		for(Field field : fields) {
			Column column = field.getAnnotation(Column.class);
			if(column.isKey()) {
				keyFields.add(field);
			}
		}
		if(keyFields.isEmpty()) {
			throw new NoKeyColumnAnnotationException();
		}
		return keyFields;
	}
36632
private static List<Field> _getAnnotationColumns(Class<?> clazz, 
			Class<? extends Annotation> annoClazz) {
		if(clazz == null) {
			return new ArrayList<Field>();
		}
		
		List<Class<?>> classLink = new ArrayList<Class<?>>();
		Class<?> curClass = clazz;
		while (curClass != null) {
			classLink.add(curClass);
			curClass = curClass.getSuperclass();
		}
		
		return _getFields(classLink, annoClazz);
	}
1018115
public static Field getFieldFromClass(String field, Class<? extends Object> clazz) {
        try {
            return clazz.getDeclaredField(field);
        } catch (Exception e) {
            try {
                return clazz.getField(field);
            } catch (Exception ex) {
            }
        }
        return null;
    }
1091101
static final <T> TableMap<T> of(Class<T> clazz) {
        final TableMap<T> annotations = new TableMap<T>(clazz);
        annotations.putAll(clazz);
        return annotations;
    }
760047
@Override
    public <A extends Annotation> A getAnnotation(Class<A> annotationClass) {
        return method.getAnnotation(annotationClass);
    }
840502
@SuppressWarnings("unchecked")
    public <T> List<T> getAnnotations(final Class<? extends Annotation> clazz) {
        return (List<T>) foundAnnotations.get(clazz);
    }
1210826
private void extractAnnotation() {
		for (Class<? extends IFile> clazz : LISTE_CLASS) {

			Map<ITag, AnnotationData> maps = new HashMap<ITag, AnnotationData>();
			Set<AnnotationData> set = new TreeSet<AnnotationData>();

			Field[] fields = clazz.getDeclaredFields();
			for (Field field : fields) {
				AnnotationData param = new AnnotationData();
				field.setAccessible(true);
				param.setField(field);
				Data annotation = field.getAnnotation(Data.class);
				if (annotation != null) {
					param.initFromAnnotation(annotation);
					maps.put(param.getTag(), param);
					try {
						set.add((AnnotationData) param.clone());
					} catch (CloneNotSupportedException e) {
						// do nothing
					}
				}
			}
			mapSet.put(clazz.getName(), set);
			map.put(clazz.getName(), maps);
		}
	}
528893
public static Field getField(Class clazz, String fieldName)
    {
        try
        {
            return clazz.getField(fieldName);
        }
        catch (Exception ignored)
        {}
        return null;
    }
140877
public static List<Field> findFields(Class<?> type,
			Class<? extends Annotation> annotation) {
		List<Field> list = new ArrayList<Field>();
		while (type != null) {
			for (Field field : type.getDeclaredFields()) {
				if (field.getAnnotation(annotation) != null) {
					list.add(field);
				}
			}
			type = type.getSuperclass();
		}
		return list;
	}
490141
public Annotation getFirstAnnotation(final Class<? extends Annotation> clazz) {
        final List<Annotation> found = foundAnnotations.get(clazz);
        return found == null || found.isEmpty() ? null : found.get(0);
    }