Package org.glassfish.rmic.tools.asm
Class LocalVariableTable
- java.lang.Object
-
- org.glassfish.rmic.tools.asm.LocalVariableTable
-
final class LocalVariableTable extends java.lang.Object
This class is used to assemble the local variable table. WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
len
(package private) LocalVariable[]
locals
-
Constructor Summary
Constructors Constructor Description LocalVariableTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
define(MemberDefinition field, int slot, int from, int to)
Define a new local variable.private void
trim_ranges()
Trim overlapping local ranges.(package private) void
write(Environment env, java.io.DataOutputStream out, ConstantPool tab)
Write out the data.
-
-
-
Field Detail
-
locals
LocalVariable[] locals
-
len
int len
-
-
Method Detail
-
define
void define(MemberDefinition field, int slot, int from, int to)
Define a new local variable. Merge entries where possible.
-
trim_ranges
private void trim_ranges()
Trim overlapping local ranges. Java forbids shadowing of locals in nested scopes, but non-nested scopes may still declare locals with the same name. Because local variable ranges are computed using flow analysis as part of assembly, it isn't possible to simply make sure variable ranges end where the enclosing lexical scope ends. This method makes sure that variables with the same name don't overlap, giving priority to fields with higher slot numbers that should have appeared later in the source.
-
write
void write(Environment env, java.io.DataOutputStream out, ConstantPool tab) throws java.io.IOException
Write out the data.- Throws:
java.io.IOException
-
-