    001    package cpw.mods.fml.relauncher;
    002
    003    import java.lang.annotation.ElementType;
    004    import java.lang.annotation.Retention;
    005    import java.lang.annotation.RetentionPolicy;
    006    import java.lang.annotation.Target;
    007    import java.util.Map;
    008
    009    /**
    010     * The base plugin that provides class name meta information to FML to
    011     * enhance the classloading lifecycle for mods in FML
    012     *
    013     * @author cpw
    014     *
    015     */
    016    public interface IFMLLoadingPlugin
    017    {
    018        /**
    019         * Return a list of classes that implement the ILibrarySet interface
    020         *
    021         * @return a list of classes that implement the ILibrarySet interface
    022         */
    023        String[] getLibraryRequestClass();
    024        /**
    025         * Return a list of classes that implements the IClassTransformer interface
    026         * @return a list of classes that implements the IClassTransformer interface
    027         */
    028        String[] getASMTransformerClass();
    029
    030        /**
    031         * Return a class name that implements "ModContainer" for injection into the mod list
    032         * The "getName" function should return a name that other mods can, if need be,
    033         * depend on.
    034         * Trivially, this modcontainer will be loaded before all regular mod containers,
    035         * which means it will be forced to be "immutable" - not susceptible to normal
    036         * sorting behaviour.
    037         * All other mod behaviours are available however- this container can receive and handle
    038         * normal loading events
    039         */
    040        String getModContainerClass();
    041
    042        /**
    043         * Return the class name of an implementor of "IFMLCallHook", that will be run, in the
    044         * main thread, to perform any additional setup this coremod may require. It will be
    045         * run <strong>prior</strong> to Minecraft starting, so it CANNOT operate on minecraft
    046         * itself. The game will deliberately crash if this code is detected to trigger a
    047         * minecraft class loading (TODO: implement crash ;) )
    048         */
    049        String getSetupClass();
    050
    051        /**
    052         * Inject coremod data into this coremod
    053         * This data includes:
    054         * "mcLocation" : the location of the minecraft directory,
    055         * "coremodList" : the list of coremods
    056         * "coremodLocation" : the file this coremod loaded from,
    057         */
    058        void injectData(Map<String, Object> data);
    059
    060
    061        /**
    062         * Annotate your load plugin with a list of package prefixes that will *not* be
    063         * processed by the ASM transformation stack.
    064         *
    065         * Your plugin, and any transformers should *definitely* be in this list, because
    066         * otherwise you can face problems with the classloader trying to transform classes
    067         * with your transformer, whilst it is *loading* your transformer. Not pretty.
    068         *
    069         * @author cpw
    070         *
    071         */
    072        @Retention(RetentionPolicy.RUNTIME)
    073        @Target(ElementType.TYPE)
    074        public @interface TransformerExclusions
    075        {
    076            public String[] value() default "";
    077        }
    078    }