ASF Bugzilla – Attachment 13335 Details for
Bug 32077
[PATCH] LocalVariableTable.getLocalVariable isn't good enough
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to add getLocalVariable(int index, int pc) to LocalVariableTable
lvt.patch (text/plain), 1.19 KB, created by
Dave Brosius
on 2004-11-05 05:49:47 UTC
(
hide
)
Description:
Patch to add getLocalVariable(int index, int pc) to LocalVariableTable
Filename:
MIME Type:
Creator:
Dave Brosius
Created:
2004-11-05 05:49:47 UTC
Size:
1.19 KB
patch
obsolete
>Index: src/java/org/apache/bcel/classfile/LocalVariableTable.java >=================================================================== >RCS file: /home/cvspublic/jakarta-bcel/src/java/org/apache/bcel/classfile/LocalVariableTable.java,v >retrieving revision 1.3 >diff -u -r1.3 LocalVariableTable.java >--- src/java/org/apache/bcel/classfile/LocalVariableTable.java 23 May 2003 07:55:12 -0000 1.3 >+++ src/java/org/apache/bcel/classfile/LocalVariableTable.java 5 Nov 2004 05:46:59 -0000 >@@ -155,6 +155,20 @@ > return null; > } > >+ /** @return matching variable using index when variable is used at supplied pc >+ */ >+ public final LocalVariable getLocalVariable(int index, int pc) { >+ for(int i=0; i < local_variable_table_length; i++) >+ if(local_variable_table[i].getIndex() == index) { >+ int start_pc = local_variable_table[i].getStartPC(); >+ int end_pc = start_pc + local_variable_table[i].getLength(); >+ if ((pc >= start_pc) && (pc < end_pc)) >+ return local_variable_table[i]; >+ } >+ >+ return null; >+ } >+ > public final void setLocalVariableTable(LocalVariable[] local_variable_table) > { > this.local_variable_table = local_variable_table;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32077
: 13335