Package net.sf.cglib.asm

Examples of net.sf.cglib.asm.ClassReader.accept()


    final ClassReader reader = new ClassReader(tileEntityClass.getCanonicalName());
   
    final String tagCompoundName = getJarName(MinecraftReflection.getNBTCompoundClass());
    final String expectedDesc = "(L" + tagCompoundName + ";)V";
   
    reader.accept(new EmptyClassVisitor() {
      @Override
      public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
        final String methodName = name;
       
        // Detect read/write calls to NBTTagCompound
View Full Code Here


   
    // The method we are looking for
    final String methodName = method.getName();
    final String methodDescription = Type.getMethodDescriptor(method);
   
    reader.accept(new EmptyClassVisitor() {
      @Override
      public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
        // Check method
        if (methodName.equals(name) && methodDescription.equals(desc)) {
          return new EmptyMethodVisitor() {
View Full Code Here

     
      // HACK - class is found by inspecting code
      try {
        ClassReader reader = new ClassReader(packetUpdateAttributes.getCanonicalName());
       
        reader.accept(new EmptyClassVisitor() {
          @Override
          public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
            // The read method
            if (desc.startsWith("(Ljava/io/DataInput")) {
              return new EmptyMethodVisitor() {
View Full Code Here

/*  94 */               out = new BufferedOutputStream(new FileOutputStream(file));
/*     */               try {
/*  96 */                 ClassReader cr = new ClassReader(b);
/*  97 */                 PrintWriter pw = new PrintWriter(new OutputStreamWriter(out));
/*  98 */                 TraceClassVisitor tcv = new TraceClassVisitor(null, pw);
/*  99 */                 cr.accept(tcv, false);
/* 100 */                 pw.flush();
/*     */               } finally {
/* 102 */                 out.close();
/*     */               }
/*     */             }
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.