Package bytecodeparser.analysis.stack

Examples of bytecodeparser.analysis.stack.StackAnalyzer.analyze()


                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) {
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 simpleMultinewarray() throws BadBytecode {
    System.out.println("multinewarray");
    CtClass clazz = getCtClass("test.subjects.SimpleSubjects");
    CtMethod method = getMethod(clazz, "multinewarray");
    StackAnalyzer analyzer = new StackAnalyzer(method);
    analyzer.analyze();
  }
 
  @org.junit.Test
  public void wideTest() throws BadBytecode {
    System.out.println("WideTestSubject.wideTestSubject");
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

  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

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.