Package org.aspectj.apache.bcel.generic

Examples of org.aspectj.apache.bcel.generic.ArrayType


          LazyClassGen.staticTjpType, Type.OBJECT, Type.OBJECT, Type.OBJECT, Type.OBJECT }, Constants.INVOKESTATIC));
      break;
    default:
      il.append(makeArgsObjectArray());
      il.append(fact.createInvoke("org.aspectj.runtime.reflect.Factory", "makeJP", LazyClassGen.tjpType, new Type[] {
          LazyClassGen.staticTjpType, Type.OBJECT, Type.OBJECT, new ArrayType(Type.OBJECT, 1) }, Constants.INVOKESTATIC));
      break;
    }

    return il;
  }
View Full Code Here


      // A new array instruction obviously tells us it is an array type !
      if (searchPtr.getInstruction().opcode == Constants.ANEWARRAY) {
        // ANEWARRAY ana = (ANEWARRAY)searchPoint.getInstruction();
        // Type t = ana.getType(getEnclosingClass().getConstantPool());
        // Just use a standard java.lang.object array - that will work fine
        return BcelWorld.fromBcel(new ArrayType(Type.OBJECT, 1));
      }
      // A multi new array instruction obviously tells us it is an array type !
      if (searchPtr.getInstruction() instanceof MULTIANEWARRAY) {
        MULTIANEWARRAY ana = (MULTIANEWARRAY) searchPtr.getInstruction();
        // Type t = ana.getType(getEnclosingClass().getConstantPool());
        // t = new ArrayType(t,ana.getDimensions());
        // Just use a standard java.lang.object array - that will work fine
        return BcelWorld.fromBcel(new ArrayType(Type.OBJECT, ana.getDimensions()));
      }
      throw new BCException("Can't determine real target of clone() when processing instruction "
          + searchPtr.getInstruction() + ".  Perhaps avoid selecting clone with your pointcut?");
    }
    return tx;
View Full Code Here

  }

  public void weaveCflowEntry(final BcelAdvice munger, final Member cflowField) {
    final boolean isPer = munger.getKind() == AdviceKind.PerCflowBelowEntry || munger.getKind() == AdviceKind.PerCflowEntry;

    final Type objectArrayType = new ArrayType(Type.OBJECT, 1);
    final InstructionFactory fact = getFactory();

    final BcelVar testResult = genTempVar(ResolvedType.BOOLEAN);

    InstructionList entryInstructions = new InstructionList();
View Full Code Here

   */

  private LazyMethodGen makeClosureClassAndReturnConstructor(String closureClassName, LazyMethodGen callbackMethod,
      IntMap proceedMap) {
    String superClassName = "org.aspectj.runtime.internal.AroundClosure";
    Type objectArrayType = new ArrayType(Type.OBJECT, 1);

    LazyClassGen closureClass = new LazyClassGen(closureClassName, superClassName, getEnclosingClass().getFileName(),
        Modifier.PUBLIC, new String[] {}, getWorld());
    InstructionFactory fact = new InstructionFactory(closureClass.getConstantPool());

View Full Code Here

          LazyClassGen.staticTjpType, Type.OBJECT, Type.OBJECT, Type.OBJECT, Type.OBJECT }, Constants.INVOKESTATIC));
      break;
    default:
      il.append(makeArgsObjectArray());
      il.append(fact.createInvoke("org.aspectj.runtime.reflect.Factory", "makeJP", LazyClassGen.tjpType, new Type[] {
          LazyClassGen.staticTjpType, Type.OBJECT, Type.OBJECT, new ArrayType(Type.OBJECT, 1) }, Constants.INVOKESTATIC));
      break;
    }

    return il;
  }
View Full Code Here

      // A new array instruction obviously tells us it is an array type !
      if (searchPtr.getInstruction().opcode == Constants.ANEWARRAY) {
        // ANEWARRAY ana = (ANEWARRAY)searchPoint.getInstruction();
        // Type t = ana.getType(getEnclosingClass().getConstantPool());
        // Just use a standard java.lang.object array - that will work fine
        return BcelWorld.fromBcel(new ArrayType(Type.OBJECT, 1));
      }
      // A multi new array instruction obviously tells us it is an array type !
      if (searchPtr.getInstruction() instanceof MULTIANEWARRAY) {
        MULTIANEWARRAY ana = (MULTIANEWARRAY) searchPtr.getInstruction();
        // Type t = ana.getType(getEnclosingClass().getConstantPool());
        // t = new ArrayType(t,ana.getDimensions());
        // Just use a standard java.lang.object array - that will work fine
        return BcelWorld.fromBcel(new ArrayType(Type.OBJECT, ana.getDimensions()));
      }
      throw new BCException("Can't determine real target of clone() when processing instruction "
          + searchPtr.getInstruction() + ".  Perhaps avoid selecting clone with your pointcut?");
    }
    return tx;
View Full Code Here

  }

  public void weaveCflowEntry(final BcelAdvice munger, final Member cflowField) {
    final boolean isPer = munger.getKind() == AdviceKind.PerCflowBelowEntry || munger.getKind() == AdviceKind.PerCflowEntry;

    final Type objectArrayType = new ArrayType(Type.OBJECT, 1);
    final InstructionFactory fact = getFactory();

    final BcelVar testResult = genTempVar(UnresolvedType.BOOLEAN);

    InstructionList entryInstructions = new InstructionList();
View Full Code Here

   */

  private LazyMethodGen makeClosureClassAndReturnConstructor(String closureClassName, LazyMethodGen callbackMethod,
      IntMap proceedMap) {
    String superClassName = "org.aspectj.runtime.internal.AroundClosure";
    Type objectArrayType = new ArrayType(Type.OBJECT, 1);

    LazyClassGen closureClass = new LazyClassGen(closureClassName, superClassName, getEnclosingClass().getFileName(),
        Modifier.PUBLIC, new String[] {}, getWorld());
    InstructionFactory fact = new InstructionFactory(closureClass.getConstantPool());

View Full Code Here

    } else if(type.toString().equals("java.lang.Object")) {
      return "Type.OBJECT";
    } else if(type.toString().equals("java.lang.StringBuffer")) {
      return "Type.STRINGBUFFER";
    } else if(type instanceof ArrayType) {
      ArrayType at = (ArrayType)type;

      return "new ArrayType(" + printType(at.getBasicType()) +
  ", " + at.getDimensions() + ")";
    } else {
      return "new ObjectType(\"" + Utility.signatureToString(signature, false) +
  "\")";
    }
  }
View Full Code Here

      default:
        il.append(makeArgsObjectArray());
        il.append(fact.createInvoke("org.aspectj.runtime.reflect.Factory",
                  "makeJP", LazyClassGen.tjpType,
                  new Type[] { LazyClassGen.staticTjpType,
                      Type.OBJECT, Type.OBJECT, new ArrayType(Type.OBJECT, 1)},
                  Constants.INVOKESTATIC));
        break;
    }
   
    return il;
View Full Code Here

TOP

Related Classes of org.aspectj.apache.bcel.generic.ArrayType

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.