/* * Created on 2004-9-24 * * TODO To change the template for this generated file go to * Window - PReferences - Java - Code Style - Code Templates */ package cn.cpX.Parco.AddMethod; import java.lang.reflect.*; import javassist.*; /** * @author cpX.Parco * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class AddMethod { /** * */ public AddMethod() { super(); // TODO Auto-generated constrUCtor stub } private static void addMethod(CtClass clas) { try { String strOldMethod = "outputHello"; String strNewMethod = strOldMethod + "2";