Package de.inetsoftware.classparser
Class LocalVariableTable
- java.lang.Object
-
- de.inetsoftware.classparser.LocalVariableTable
-
public class LocalVariableTable extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private int
maxLocals
private LocalVariable[]
table
-
Constructor Summary
Constructors Constructor Description LocalVariableTable(int maxLocals)
Create an instance without any debug details.LocalVariableTable(int maxLocals, ConstantPool constantPool, java.io.DataInputStream input)
Create a new instance of the code attribute "LocalVariableTable".
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaxLocals()
Get the count of variables/slots.LocalVariable[]
getTable()
Get the declared local variables
-
-
-
Field Detail
-
maxLocals
private final int maxLocals
-
table
private LocalVariable[] table
-
-
Constructor Detail
-
LocalVariableTable
LocalVariableTable(int maxLocals, ConstantPool constantPool, java.io.DataInputStream input) throws java.io.IOException
Create a new instance of the code attribute "LocalVariableTable". http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.13 http://docs.oracle.com/javase/specs/jvms/se5.0/html/ClassFile.doc.html#5956- Parameters:
maxLocals
- the count of local variables in the memoryconstantPool
- Reference to the current ConstantPoolinput
- the stream of the class- Throws:
java.io.IOException
- if any I/O error occurs.
-
LocalVariableTable
LocalVariableTable(int maxLocals)
Create an instance without any debug details.- Parameters:
maxLocals
- the count of local variables in the memory
-
-
Method Detail
-
getMaxLocals
public int getMaxLocals()
Get the count of variables/slots. This is not the count of declared LocalVariable in this table. There can be unnamed helper variables for the compiler which are not in the table. There can be reused slots for different variables.- Returns:
- the count
-
getTable
public LocalVariable[] getTable()
Get the declared local variables- Returns:
- the variables
-
-