Package javassist.bytecode.analysis

Examples of javassist.bytecode.analysis.Frame


        return pos + increment;
    }

    private String getTopType(int pos) throws BadBytecode {
        Frame frame = getFrame(pos);
        if (frame == null)
            return null;

        CtClass clazz = frame.peek().getCtClass();
        return clazz != null ? Descriptor.toJvmName(clazz) : null;
    }
View Full Code Here


        return pos + increment;
    }

    private String getTopType(int pos) throws BadBytecode {
        Frame frame = getFrame(pos);
        if (frame == null)
            return null;

        CtClass clazz = frame.peek().getCtClass();
        return clazz != null ? Descriptor.toJvmName(clazz) : null;
    }
View Full Code Here

        return pos + increment;
    }

    private String getTopType(int pos) throws BadBytecode {
        Frame frame = getFrame(pos);
        if (frame == null)
            return null;

        CtClass clazz = frame.peek().getCtClass();
        return clazz != null ? Descriptor.toJvmName(clazz) : null;
    }
View Full Code Here

/*     */     }
/* 113 */     return pos + increment;
/*     */   }
/*     */
/*     */   private String getTopType(int pos) throws BadBytecode {
/* 117 */     Frame frame = getFrame(pos);
/* 118 */     if (frame == null) {
/* 119 */       return null;
/*     */     }
/* 121 */     CtClass clazz = frame.peek().getCtClass();
/* 122 */     return clazz != null ? Descriptor.toJvmName(clazz) : null;
/*     */   }
View Full Code Here

        MethodInfo info = method.getMethodInfo2();
        Analyzer analyzer = new Analyzer();
        Frame[] frames = analyzer.analyze(method.getDeclaringClass(), info);
        assertNotNull(frames);
        int pos = findOpcode(info, Opcode.RETURN);
        Frame frame = frames[pos];
        assertEquals("java.lang.Object", frame.getLocal(2).getCtClass().getName());
    }
View Full Code Here

        }

        Analyzer analyzer = new Analyzer();
        Frame[] frames = analyzer.analyze(method.getDeclaringClass(), info);
        assertNotNull(frames);
        Frame frame = frames[pos];
        assertEquals(expected, frame.peek().getCtClass().getName());
    }
View Full Code Here

        }

        Analyzer analyzer = new Analyzer();
        Frame[] frames = analyzer.analyze(clazz, info);
        assertNotNull(frames);
        Frame frame = frames[pos];
        assertNotNull(frame);

        Type type = frame.getStack(frame.getTopIndex() - 1);
        assertEquals(component + "[]", type.getCtClass().getName());

        pos = iter.next();
        frame = frames[pos];
        assertNotNull(frame);

        type = frame.getStack(frame.getTopIndex());
        assertEquals(component, type.getCtClass().getName());
    }
View Full Code Here

TOP

Related Classes of javassist.bytecode.analysis.Frame

Copyright © 2018 www.massapicom. 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.