Package org.aspectj.apache.bcel.generic

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


        // 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


      Type ot = i.getType(cpg);
      UnresolvedType ut = fromBcel(ot);
      ut = UnresolvedType.makeArray(ut, 1);
      retval = MemberImpl.method(ut, Modifier.PUBLIC, ResolvedType.VOID, "<init>", new ResolvedType[] { ResolvedType.INT });
    } else if (i instanceof MULTIANEWARRAY) {
      MULTIANEWARRAY arrayInstruction = (MULTIANEWARRAY) i;
      UnresolvedType ut = null;
      short dimensions = arrayInstruction.getDimensions();
      ObjectType ot = arrayInstruction.getLoadClassType(cpg);
      if (ot != null) {
        ut = fromBcel(ot);
        ut = UnresolvedType.makeArray(ut, dimensions);
      } else {
        Type t = arrayInstruction.getType(cpg);
        ut = fromBcel(t);
      }
      ResolvedType[] parms = new ResolvedType[dimensions];
      for (int ii = 0; ii < dimensions; ii++) {
        parms[ii] = ResolvedType.INT;
View Full Code Here

      Type ot = i.getType(cpg);
      UnresolvedType ut = fromBcel(ot);
      ut = UnresolvedType.makeArray(ut, 1);
      retval = MemberImpl.method(ut, Modifier.PUBLIC, UnresolvedType.VOID, "<init>", new ResolvedType[] { INT });
    } else if (i instanceof MULTIANEWARRAY) {
      MULTIANEWARRAY arrayInstruction = (MULTIANEWARRAY) i;
      UnresolvedType ut = null;
      short dimensions = arrayInstruction.getDimensions();
      ObjectType ot = arrayInstruction.getLoadClassType(cpg);
      if (ot != null) {
        ut = fromBcel(ot);
        ut = UnresolvedType.makeArray(ut, dimensions);
      } else {
        Type t = arrayInstruction.getType(cpg);
        ut = fromBcel(t);
      }
      ResolvedType[] parms = new ResolvedType[dimensions];
      for (int ii = 0; ii < dimensions; ii++) {
        parms[ii] = INT;
View Full Code Here

        // 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

      Type ot = i.getType(cpg);
      UnresolvedType ut = fromBcel(ot);
      ut = UnresolvedType.makeArray(ut, 1);
      retval = MemberImpl.method(ut, Modifier.PUBLIC, ResolvedType.VOID, "<init>", new ResolvedType[] { ResolvedType.INT });
    } else if (i instanceof MULTIANEWARRAY) {
      MULTIANEWARRAY arrayInstruction = (MULTIANEWARRAY) i;
      UnresolvedType ut = null;
      short dimensions = arrayInstruction.getDimensions();
      ObjectType ot = arrayInstruction.getLoadClassType(cpg);
      if (ot != null) {
        ut = fromBcel(ot);
        ut = UnresolvedType.makeArray(ut, dimensions);
      } else {
        Type t = arrayInstruction.getType(cpg);
        ut = fromBcel(t);
      }
      ResolvedType[] parms = new ResolvedType[dimensions];
      for (int ii = 0; ii < dimensions; ii++) {
        parms[ii] = ResolvedType.INT;
View Full Code Here

              // 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().getConstantPoolGen());
              // 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());
      }
      return tx;
View Full Code Here

TOP

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

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.