@@ -0,0 +1,2719 @@
+/*%0A * This file is part of BukkitCommons.%0A *%0A * Copyright (C) 2014 AgentTroll%0A *%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU General Public License as published by%0A * the Free Software Foundation, either version 2 of the License, or%0A * (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU General Public License for more details.%0A *%0A * You should have received a copy of the GNU General Public License%0A * along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A *%0A * Contact: woodyc40 (at) gmail (dot) com%0A */%0A%0Apackage com.gmail.woodyc40.commons.reflection;%0A%0Aimport java.lang.reflect.InvocationTargetException;%0Aimport java.lang.reflect.Constructor;%0A%0Aimport com.gmail.woodyc40.commons.reflection.ConstrcutorManager;%0A%0Aimport sun.reflect.ConstructorAccessor;%0Aimport sun.reflect.ReflectionFactory;%0A%0A/**%0A * Actual implementation of %7B@link com.gmail.woodyc40.commons.reflection.ConstructorManager%7D used for fast reflection%0A *%0A * @author AgentTroll%0A * @version 1.0%0A */%0Apublic class ConstructorImpl implements CondtructorManager %7B // TODO cache%0A    private Constructor%3C?%3E constructor;%0A    %0A    /**%0A     * Builds a new instance of this class by shallow constructor search%0A     *%0A     * @param holder the %3Ccode%3Eclass%3C/code%3E that contains the method%0A     * @param params the parameter list of the method%0A     * TODO pull up method to ReflectionTool%0A     */%0A    public MethodImpl(Class%3C?%3E holder, Class%5B%5D params) %7B%0A        try %7B%0A            this.constructor = holder.getDeclaredConstructor(params);%0A        %7D catch (NoSuchMethodException x) %7B%0A            x.printStackTrace();%0A        %7D%0A    %7D%0A%0A    /**%0A     * Wraps the Consrructor for management by this implementation%0A     *%0A     * @param method the Method to wrap%0A     */%0A    public MethodImpl(Constructor%3C?%3E constructor) %7B%0A        this.constuctor = constructor;%0A    %7D%0A%0A    /**%0A     * %7B@inheritDoc%7D%0A     */%0A    public Object createInstance(Object%5B%5D args) %7B%0A        ReflectionFactory factory = ReflectionFactory.getReflectionFactory(); // TODO pull up%0A        ConstructorAccessor method = factory.newConstructorAccessor(this.method); // TODO Pull up to constructor!%0A        try %7B%0A            return method.newInstance(args);%0A        %7D catch (IllegalArgumentException %7C InvocationTargetException InstantiationException x) %7B%0A            x.printStackTrace();%0A        %7D%0A        %0A        return null;%0A    %7D%0A%0A    /**%0A     * %7B@inheritDoc%7D%0A     */%0A    public Constrcutor%3C?%3E raw() %7B%0A        return this.constructor;%0A    %7D%0A%7D%0A

Create ConstructorImpl.java