Package bytecodeparser.analysis.stack.StackAnalyzer

Examples of bytecodeparser.analysis.stack.StackAnalyzer.Frames


                CtField signature = CtField.make("public static String[] $" + behavior.getName() + computeMethodHash(signatureTypes) + " = " + signatureNames.toString(), ctClass);
                ctClass.addField(signature);
                // end

                Frames frames = parser.analyze();
                CodeAttribute codeAttribute = behavior.getMethodInfo().getCodeAttribute();
                FrameIterator iterator = frames.iterator();
                while(iterator.hasNext()) {
                    Frame frame = iterator.next();
                    if(!frame.isAccessible) {
                        Logger.debug("WARNING : frame " + frame.index + " is NOT accessible");
                        continue;
View Full Code Here


  public void simpleSubjectsSimple() throws BadBytecode {
    System.out.println("simpleSubjectsSimple");
    CtClass clazz = getCtClass("test.subjects.SimpleSubjects");
    CtMethod method = getMethod(clazz, "simple");
    StackAnalyzer analyzer = new StackAnalyzer(method);
    Frames frames = analyzer.analyze();
    for(Frame frame : frames) {
      if(frame.decodedOp instanceof DecodedMethodInvocationOp) {
        DecodedMethodInvocationOp dmio = (DecodedMethodInvocationOp) frame.decodedOp;
        if(dmio.getName().equals("classic")) {
          String[] names = DecodedMethodInvocationOp.resolveParametersNames(frame, false);
View Full Code Here

  public void simpleSubjectsSimpleWithParams() throws BadBytecode {
    System.out.println("simpleSubjectsSimpleWithParams");
    CtClass clazz = getCtClass("test.subjects.SimpleSubjects");
    CtMethod method = getMethod(clazz, "simpleWithParams");
    StackAnalyzer analyzer = new StackAnalyzer(method);
    Frames frames = analyzer.analyze();
    for(Frame frame : frames) {
      if(frame.decodedOp instanceof DecodedMethodInvocationOp) {
        DecodedMethodInvocationOp dmio = (DecodedMethodInvocationOp) frame.decodedOp;
        if(dmio.getName().equals("classic")) {
          String[] names = DecodedMethodInvocationOp.resolveParametersNames(frame, false);
View Full Code Here

  public void simpleSubjectsSimpleWithConditionals() throws BadBytecode {
    System.out.println("simpleSubjectsSimpleWithConditionals");
    CtClass clazz = getCtClass("test.subjects.SimpleSubjects");
    CtMethod method = getMethod(clazz, "simpleWithConditionals");
    StackAnalyzer analyzer = new StackAnalyzer(method);
    Frames frames = analyzer.analyze();
    for(Frame frame : frames) {
      if(frame.decodedOp instanceof DecodedMethodInvocationOp) {
        DecodedMethodInvocationOp dmio = (DecodedMethodInvocationOp) frame.decodedOp;
        if(dmio.getName().equals("classic")) {
          String[] names = DecodedMethodInvocationOp.resolveParametersNames(frame, false);
View Full Code Here

  public void simpleSubjectsVarargs() throws BadBytecode {
    System.out.println("simpleSubjectsVarargs");
    CtClass clazz = getCtClass("test.subjects.SimpleSubjects");
    CtMethod method = getMethod(clazz, "varargs");
    StackAnalyzer analyzer = new StackAnalyzer(method);
    Frames frames = analyzer.analyze();
    for(Frame frame : frames) {
      if(frame.decodedOp instanceof DecodedMethodInvocationOp) {
        DecodedMethodInvocationOp dmio = (DecodedMethodInvocationOp) frame.decodedOp;
        if(dmio.getName().equals("varargs")) {
          String[] names = DecodedMethodInvocationOp.resolveParametersNames(frame, true);
View Full Code Here

  public void simpleSubjectsExceptions() throws BadBytecode {
    System.out.println("simpleSubjectsExceptions");
    CtClass clazz = getCtClass("test.subjects.SimpleSubjects");
    CtMethod method = getMethod(clazz, "exceptions");
    StackAnalyzer analyzer = new StackAnalyzer(method);
    Frames frames = analyzer.analyze();
    for(Frame frame : frames) {
      if(frame.decodedOp instanceof DecodedMethodInvocationOp) {
        DecodedMethodInvocationOp dmio = (DecodedMethodInvocationOp) frame.decodedOp;
        if(dmio.getName().equals("classic")) {
          String[] names = DecodedMethodInvocationOp.resolveParametersNames(frame, false);
View Full Code Here

  public void simpleSubjectsTableSwitchBlock() throws BadBytecode {
    System.out.println("simpleSubjectsTableSwitchBlock");
    CtClass clazz = getCtClass("test.subjects.SimpleSubjects");
    CtMethod method = getMethod(clazz, "tableswitchBlock");
    StackAnalyzer analyzer = new StackAnalyzer(method);
    Frames frames = analyzer.analyze();
    for(Frame frame : frames) {
      if(frame.decodedOp instanceof DecodedMethodInvocationOp) {
        DecodedMethodInvocationOp dmio = (DecodedMethodInvocationOp) frame.decodedOp;
        if(dmio.getName().equals("classic")) {
          String[] names = DecodedMethodInvocationOp.resolveParametersNames(frame, false);
View Full Code Here

  public void simpleSubjectsLookupSwitchBlock() throws BadBytecode {
    System.out.println("simpleSubjectsLookupSwitchBlock");
    CtClass clazz = getCtClass("test.subjects.SimpleSubjects");
    CtMethod method = getMethod(clazz, "lookupswitchBlock");
    StackAnalyzer analyzer = new StackAnalyzer(method);
    Frames frames = analyzer.analyze();
    for(Frame frame : frames) {
      if(frame.decodedOp instanceof DecodedMethodInvocationOp) {
        DecodedMethodInvocationOp dmio = (DecodedMethodInvocationOp) frame.decodedOp;
        if(dmio.getName().equals("classic")) {
          String[] names = DecodedMethodInvocationOp.resolveParametersNames(frame, false);
View Full Code Here

  public void wideTest() throws BadBytecode {
    System.out.println("WideTestSubject.wideTestSubject");
    CtClass clazz = getCtClass("test.subjects.WideTestSubject");
    CtMethod method = getMethod(clazz, "wideTestSubject");
    StackAnalyzer analyzer = new StackAnalyzer(method);
    Frames frames = analyzer.analyze();
    for(Frame frame : frames) {
      if(frame.decodedOp instanceof DecodedMethodInvocationOp) {
        DecodedMethodInvocationOp dmio = (DecodedMethodInvocationOp) frame.decodedOp;
        String[] names = DecodedMethodInvocationOp.resolveParametersNames(frame, true);
        if(dmio.getName().equals("mixed2")) {
View Full Code Here

TOP

Related Classes of bytecodeparser.analysis.stack.StackAnalyzer.Frames

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.