Package org.glassfish.rmic.tools.asm
Class LocalVariableTable
java.lang.Object
org.glassfish.rmic.tools.asm.LocalVariableTable
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
define
(MemberDefinition field, int slot, int from, int to) Define a new local variable.private void
Trim overlapping local ranges.(package private) void
write
(Environment env, DataOutputStream out, ConstantPool tab) Write out the data.
-
Field Details
-
locals
LocalVariable[] locals -
len
int len
-
-
Constructor Details
-
LocalVariableTable
LocalVariableTable()
-
-
Method Details
-
define
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
Write out the data.- Throws:
IOException
-