class MustBeDocumentedDataCollector {

	public List<DocAnnotationData> collect() {

		Class<? extends Annotation> annotation = MustBeDocumented.class;
		
		Set<Class<?>> types = reflections.getTypesAnnotatedWith(annotation);
		Set<Method> methods = reflections.getMethodsAnnotatedWith(annotation);
		Set<Field> fields = reflections.getFieldsAnnotatedWith(annotation);

		List<DocAnnotationData> list = new ArrayList<>();
		/* handle class annotations */
		for (Class<?> type : types) {
			MustBeDocumented info = type.getDeclaredAnnotation(MustBeDocumented.class);
			if (info==null) {
				continue;
			}
			DocAnnotationData data = DocGeneratorUtil.buildDataForMustBeDocumented(info,type);
			data.linkedClass=type;
			list.add(data);
		}

		/* handle method annotations */
		for (Method method : methods) {
			MustBeDocumented info = method.getDeclaredAnnotation(MustBeDocumented.class);
			if (info==null) {
				continue;
			}
			DocAnnotationData data = DocGeneratorUtil.buildDataForMustBeDocumented(info,method);
			data.linkedMethod=method;
			
			list.add(data);
		}

		/* handle field annotations */
		for (Field field : fields) {
			MustBeDocumented info = field.getDeclaredAnnotation(MustBeDocumented.class);
			if (info==null) {
				continue;
			}
			DocAnnotationData data = DocGeneratorUtil.buildDataForMustBeDocumented(info,field);
			data.linkedField=field;
			list.add(data);
		}

		return list;

	}

	public  MustBeDocumentedDataCollector(Reflections reflections);

}