private Iterable<Field> fieldsWithAnnotation(Class<?> cls){
synchronized (mux) {
    List<Field> fields=fieldCache.get(cls);
    if (fields == null) {
      fields=new ArrayList<>();
      for (      Field field : cls.getDeclaredFields()) {
        Annotation ann=field.getAnnotation(annCls);
        if (ann != null || needsRecursion(field))         fields.add(field);
      }
      if (!fields.isEmpty())       fieldCache.put(cls,fields);
    }
    return fields;
  }
}

private Iterable < Field > fieldsWithAnnotation ( Class < ? > cls ) { synchronized ( mux ) { List < Field > fields = fieldCache . get ( cls ) ; if ( fields == null ) { fields = new ArrayList < > ( ) ; for ( Field field : cls . getDeclaredFields ( ) ) { Annotation ann = field . getAnnotation ( annCls ) ; if ( ann != null || needsRecursion ( field ) ) fields . add ( field ) ; } if ( ! fields . isEmpty ( ) ) fieldCache . put ( cls , fields ) ; } return fields ; } }
gets all entries from the specified class or its super - classes that have been annotated with annotation provided .
