|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectserp.bytecode.Attributes
serp.bytecode.Attribute
serp.bytecode.LocalTable
serp.bytecode.LocalVariableTable
public class LocalVariableTable
Code blocks compiled from source have local variable tables mapping locals used in opcodes to their names and descriptions.
Method Summary | |
---|---|
void |
acceptVisit(BCVisitor visit)
Accept a visit from a BCVisitor , calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one. |
LocalVariable |
addLocalVariable()
Add a local to this table. |
LocalVariable |
addLocalVariable(LocalVariable local)
Import a local from another method/class. |
LocalVariable |
addLocalVariable(String name,
BCClass type)
Add a local to this table. |
LocalVariable |
addLocalVariable(String name,
Class type)
Add a local to this table. |
LocalVariable |
addLocalVariable(String name,
String type)
Add a local to this table. |
LocalVariable |
getLocalVariable(int local)
Return the local with the given locals index, or null if none. |
LocalVariable |
getLocalVariable(String name)
Return the local with the given name, or null if none. |
LocalVariable[] |
getLocalVariables()
Return all the locals of this method. |
LocalVariable[] |
getLocalVariables(String name)
Return all locals with the given name, or empty array if none. |
protected Local |
newLocal()
Create a new element of this table. |
protected Local[] |
newLocalArray(int size)
Create a new array. |
Methods inherited from class serp.bytecode.LocalTable |
---|
addLocal, addLocal, addLocal, clear, getCode, getLocal, getLocal, getLocals, getLocals, removeLocal, removeLocal, removeLocal, replaceTarget, setLocals, updateTargets |
Methods inherited from class serp.bytecode.Attribute |
---|
getClassLoader, getName, getNameIndex, getOwner, getPool, getProject, isValid |
Methods inherited from class serp.bytecode.Attributes |
---|
addAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, removeAttribute, removeAttribute, setAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public LocalVariable[] getLocalVariables()
public LocalVariable getLocalVariable(int local)
public LocalVariable getLocalVariable(String name)
public LocalVariable[] getLocalVariables(String name)
public LocalVariable addLocalVariable(LocalVariable local)
public LocalVariable addLocalVariable()
public LocalVariable addLocalVariable(String name, String type)
public LocalVariable addLocalVariable(String name, Class type)
public LocalVariable addLocalVariable(String name, BCClass type)
public void acceptVisit(BCVisitor visit)
VisitAcceptor
BCVisitor
, calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one.
protected Local newLocal()
LocalTable
newLocal
in class LocalTable
protected Local[] newLocalArray(int size)
LocalTable
newLocalArray
in class LocalTable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |