package com.tvd12.ezyfox.reflect;

import java.lang.annotation.Annotation;
import java.util.Set;

import com.tvd12.reflections.Reflections;

public class EzyReflectionProxy implements EzyReflection {
	
	private final Reflections reflections;
	
	public EzyReflectionProxy(String packet) {
		this.reflections = new Reflections(packet);
	}
	
	public EzyReflectionProxy(Set<String> packages) {
		this.reflections = new Reflections(packages);
	}
	
	public EzyReflectionProxy(Iterable<String> packages) {
		this.reflections = new Reflections(packages);
	}
	
	@SuppressWarnings({ "unchecked", "rawtypes" })
	@Override
	public Set<Class<?>> getExtendsClasses(Class parentClass) {
		Set<Class<?>> classes = reflections.getSubTypesOf(parentClass);
		return classes;
	}

	@Override
	public Set<Class<?>> getAnnotatedClasses(Class<? extends Annotation> annClass) {
		Set<Class<?>> classes = reflections.getTypesAnnotatedWith(annClass);
		return classes;
	}

	
	
}

@@ -545,16 +545,438 @@
 );%0A%09%7D%0A%09%0A
+%09public EzyReflectionProxy(String packet, ClassLoader classLoader) %7B%0A%09%09this.reflections = new Reflections(packet, classLoader);%0A%09%7D%0A%09%0A%09public EzyReflectionProxy(Set%3CString%3E packages, ClassLoader classLoader) %7B%0A%09%09this.reflections = new Reflections(packages, classLoader);%0A%09%7D%0A%09%0A%09public EzyReflectionProxy(Iterable%3CString%3E packages, ClassLoader classLoader) %7B%0A%09%09this.reflections = new Reflections(packages, classLoader);%0A%09%7D%0A%09%0A
 %09@Suppre

update reflection: class loader