Examples of LocalVariableTable


Examples of org.aspectj.apache.bcel.classfile.LocalVariableTable

            return EMPTY_STRINGS;
        }

        final int startAtStackIndex = method.isStatic() ? 0 : 1;
        final List arguments = new ArrayList();
        LocalVariableTable lt = (LocalVariableTable) method.getLocalVariableTable();
        if (lt != null) {
            for (int j = 0; j < lt.getLocalVariableTable().length; j++) {
                LocalVariable localVariable = lt.getLocalVariableTable()[j];
                if (localVariable.getStartPC() == 0) {
                    if (localVariable.getIndex() >= startAtStackIndex) {
                        arguments.add(new MethodArgument(localVariable.getName(), localVariable.getIndex()));
                    }
                }
View Full Code Here

Examples of org.aspectj.apache.bcel.classfile.LocalVariableTable

    LocalVariable[]    lv   = new LocalVariable[size];

    for(int i=0; i < size; i++)
      lv[i] = lg[i].getLocalVariable(cp);

    return new LocalVariableTable(cp.addUtf8("LocalVariableTable"),
          2 + lv.length * 10, lv, cp.getConstantPool());
  }
View Full Code Here

Examples of org.aspectj.apache.bcel.classfile.LocalVariableTable

    if(il != null)
      byte_code = il.getByteCode();

    LineNumberTable    lnt = null;
    LocalVariableTable lvt = null;
    //J5TODO: LocalVariableTypeTable support!

    /* Create LocalVariableTable and LineNumberTable attributes (for debuggers, e.g.)
     */
    if((variable_vec.size() > 0) && !strip_attributes)
View Full Code Here

Examples of org.aspectj.apache.bcel.classfile.LocalVariableTable

    ExceptionTable exnTable = method.getExceptionTable();
    checkedExceptions = (exnTable == null)
      ? UnresolvedType.NONE
      : UnresolvedType.forNames(exnTable.getExceptionNames());
     
    LocalVariableTable varTable = method.getLocalVariableTable();
    int len = getArity();
    if (varTable == null) {
      this.parameterNames = Utility.makeArgNames(len);
    } else {
      UnresolvedType[] paramTypes = getParameterTypes();
      String[] paramNames = new String[len];
      int index = isStatic() ? 0 : 1;
      for (int i = 0; i < len; i++) {
        LocalVariable lv = varTable.getLocalVariable(index);
        if (lv == null) {
          paramNames[i] = "arg" + i;
        } else {
          paramNames[i] = lv.getName();
        }
View Full Code Here

Examples of org.jreversepro.reflect.LocalVariableTable

   */
  private static void readLocalVariableTable(DataInputStream aDis,
      ConstantPool constPool, Method method) throws IOException {
    int len = aDis.readInt();

    LocalVariableTable localVarTable = new LocalVariableTable(method.isStatic());

    short localVarArrLen = aDis.readShort();
    for (int ctr = 1; ctr <= localVarArrLen; ctr++) {
      short startPc = aDis.readShort();
      short length = aDis.readShort();
      short nameIndex = aDis.readShort();
      short descIndex = aDis.readShort();
      short frameIndex = aDis.readShort();

      localVarTable.addLocalVariable(startPc, length, nameIndex, descIndex,
          constPool.getEntryValue(nameIndex), constPool
              .getEntryValue(descIndex), frameIndex);

      String jvmType = constPool.getEntryValue(descIndex);
      if (TypeInferrer.doesTypeOccupy2EntriesInVariableTable(jvmType)) {
        // Add another entry.
        localVarTable.addLocalVariable(startPc, length, nameIndex, descIndex,
            constPool.getEntryValue(nameIndex), constPool
                .getEntryValue(descIndex), (short) (frameIndex + 1));

      }

View Full Code Here

Examples of serp.bytecode.LocalVariableTable

        // Get the Code object, which contains the local variable table.
        Code code = bmeth.getCode(true);
        if (code == null)
            return null;

        LocalVariableTable table = code.getLocalVariableTable(true);

        if (table == null)
            return null;

        // OK, found it.  Now scan through the local variables and record
        // the names in the right indices.
        LocalVariable [] vars = table.getLocalVariables();

        String [] argNames = new String[numParams + 1];
        argNames[0] = null; // don't know return name

        // NOTE: we scan through all the variables here, because I have been
View Full Code Here

Examples of serp.bytecode.LocalVariableTable

        // Get the Code object, which contains the local variable table.
        Code code = bmeth.getCode(false);
        if (code == null)
            return null;

        LocalVariableTable table = code.getLocalVariableTable(false);

        if (table == null)
            return null;

        // OK, found it.  Now scan through the local variables and record
        // the names in the right indices.
        LocalVariable [] vars = table.getLocalVariables();

        String [] argNames = new String[numParams + 1];
        argNames[0] = null; // don't know return name

        // NOTE: we scan through all the variables here, because I have been
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.