package info.u_team.u_team_core.util.annotation;

import java.util.List;
import java.util.stream.Collectors;

import org.objectweb.asm.Type;

import net.minecraftforge.fml.ModList;
import net.minecraftforge.forgespi.language.ModFileScanData.AnnotationData;

public class AnnotationUtil {
	
	public static List<AnnotationData> getAnnotations(String modid, Type type) {
		return ModList.get() //
				.getModFileById(modid) //
				.getFile() //
				.getScanResult() //
				.getAnnotations() //
				.stream() //
				.filter(data -> type.equals(data.annotationType())) //
				.collect(Collectors.toList());
	}
	
}

@@ -255,39 +255,347 @@
 a;%0A%0A
-public class AnnotationUtil %7B%0A%09
+/**%0A * Annotation utility methods%0A * %0A * @author HyCraftHD%0A */%0Apublic class AnnotationUtil %7B%0A%09%0A%09/**%0A%09 * Returns a list of found %7B@link AnnotationData%7D for the give annotation %7B@link Type%7D and modid.%0A%09 * %0A%09 * @param modid The mod files to search for annotations%0A%09 * @param type Annotation type%0A%09 * @return List of found annotation data%0A%09 */
 %0A%09pu

Document annotation util