Package de.inetsoftware.classparser
Class LocalVariableTable
java.lang.Object
de.inetsoftware.classparser.LocalVariableTable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLocalVariableTable
(int maxLocals) Create an instance without any debug details.LocalVariableTable
(int maxLocals, ConstantPool constantPool, DataInputStream input) Create a new instance of the code attribute "LocalVariableTable". -
Method Summary
Modifier and TypeMethodDescriptionint
Get the count of variables/slots.getTable()
Get the declared local variables
-
Field Details
-
maxLocals
private final int maxLocals -
table
-
-
Constructor Details
-
LocalVariableTable
LocalVariableTable(int maxLocals, ConstantPool constantPool, DataInputStream input) throws 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:
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 Details
-
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
Get the declared local variables- Returns:
- the variables
-