Package org.zeroturnaround.bundled.javassist

Examples of org.zeroturnaround.bundled.javassist.CtMethod.insertBefore()


  public void process(ClassPool classpool, ClassLoader classloader, CtClass ctClass) throws Exception {
    if (IDEPATCH_CLASS.equals(ctClass.getName())) {
      Collection<String> classes = ctClass.getRefClasses();
      if (!classes.contains(IDESUPPORT_CLASS)) {
        CtMethod m = ctClass.getMethod(IDEPATCH_METHODNAME, IDEPATCH_SIGNATURE);
        m.insertBefore(IDEPATCH_CODE);
      }
    }
    if (WORKERTHREAD_CLASS.equals(ctClass.getName())) {
      CtMethod m = ctClass.getMethod(WORKERPATCH_METHODNAME, WORKERPATCH_SIGNATURE);
      m.insertBefore(WORKERPATCH_CODE);
View Full Code Here


        m.insertBefore(IDEPATCH_CODE);
      }
    }
    if (WORKERTHREAD_CLASS.equals(ctClass.getName())) {
      CtMethod m = ctClass.getMethod(WORKERPATCH_METHODNAME, WORKERPATCH_SIGNATURE);
      m.insertBefore(WORKERPATCH_CODE);
    }
  }

}
View Full Code Here

          CtClass uiComponentCtClass = classPool.get("javax.faces.component.UIComponent");

          try {
            CtMethod encodeBeginMethod = ctClass.getDeclaredMethod("encodeBegin",
                new CtClass[] { facesContextCtClass, uiComponentCtClass });
            encodeBeginMethod.insertBefore(
              "com.liferay.faces.jrebel.RendererReloader.reloadTemplates($0,$1);");
          }
          catch (NotFoundException e) {
            CtMethod encodeMarkupBeginMethod = ctClass.getDeclaredMethod("encodeMarkupBegin",
                new CtClass[] { facesContextCtClass, uiComponentCtClass });
View Full Code Here

              "com.liferay.faces.jrebel.RendererReloader.reloadTemplates($0,$1);");
          }
          catch (NotFoundException e) {
            CtMethod encodeMarkupBeginMethod = ctClass.getDeclaredMethod("encodeMarkupBegin",
                new CtClass[] { facesContextCtClass, uiComponentCtClass });
            encodeMarkupBeginMethod.insertBefore(
              "com.liferay.faces.jrebel.RendererReloader.reloadTemplates($0,$1);");
          }
        }
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.