Klasse LocalVariableTable

java.lang.Object
org.aspectj.apache.bcel.classfile.Attribute
org.aspectj.apache.bcel.classfile.LocalVariableTable
Alle implementierten Schnittstellen:
Serializable, Cloneable, Node

public class LocalVariableTable extends Attribute
This class represents collection of local variables in a method. This attribute is contained in the Code attribute.
Version:
$Id: LocalVariableTable.java,v 1.8 2009/09/15 19:40:12 aclement Exp $
Autor:
M. Dahm
Siehe auch:
  • Konstruktordetails

    • LocalVariableTable

      public LocalVariableTable(LocalVariableTable c)
      Initialize from another object. Note that both objects use the same references (shallow copy). Use copy() for a physical copy.
    • LocalVariableTable

      public LocalVariableTable(int name_index, int length, LocalVariable[] local_variable_table, ConstantPool constant_pool)
      Parameter:
      name_index - Index in constant pool to `LocalVariableTable'
      length - Content length in bytes
      local_variable_table - Table of local variables
      constant_pool - Array of constants
  • Methodendetails

    • accept

      public void accept(ClassVisitor v)
      Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.
      Angegeben von:
      accept in Schnittstelle Node
      Angegeben von:
      accept in Klasse Attribute
      Parameter:
      v - Visitor object
    • dump

      public final void dump(DataOutputStream file) throws IOException
      Dump local variable table attribute to file stream in binary format.
      Setzt außer Kraft:
      dump in Klasse Attribute
      Parameter:
      file - Output file stream
      Löst aus:
      IOException
    • getLocalVariableTable

      public final LocalVariable[] getLocalVariableTable()
      Gibt zurück:
      Array of local variables of method.
    • getLocalVariable

      public final LocalVariable getLocalVariable(int index)
      Gibt zurück:
      first matching variable using index
    • setLocalVariableTable

      public final void setLocalVariableTable(LocalVariable[] local_variable_table)
    • toString

      public final String toString()
      Setzt außer Kraft:
      toString in Klasse Attribute
      Gibt zurück:
      String representation.
    • copyFromPackedState

      public LocalVariableTable copyFromPackedState()
      Returns copy of this attribute using same packed state. Used in unit tests.
    • getTableLength

      public final int getTableLength()
      Gibt zurück:
      deep copy of this attribute