001/*
002 * Forge Mod Loader
003 * Copyright (c) 2012-2013 cpw.
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser Public License v2.1
006 * which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
008 * 
009 * Contributors:
010 *     cpw - implementation
011 */
012
013package cpw.mods.fml.common;
014
015import org.objectweb.asm.tree.ClassNode;
016
017public interface IASMHook {
018    /**
019     * Inject the {@link Mod} class node into this instance. This allows retrieval from custom
020     * attributes or other artifacts in your mod class
021     *
022     * @param modClassNode The mod class
023     * @return optionally some code generated classes that will be injected into the classloader
024     */
025    ClassNode[] inject(ClassNode modClassNode);
026    /**
027     * Allow mods to manipulate classes loaded from this {@link Mod}'s jar file. The {@link Mod}
028     * class is always guaranteed to be called first.
029     * The node state should be changed in place.
030     *
031     * @param node The class being loaded
032     */
033    void modifyClass(String className, ClassNode node);
034}