public class LocalVariable extends Instruction
Created by covers1624 on 23/2/21.
| Modifier and Type | Class and Description |
|---|---|
static class |
LocalVariable.VariableKind |
opcode| Constructor and Description |
|---|
LocalVariable(LocalVariable.VariableKind kind,
AType type,
java.lang.String name) |
LocalVariable(LocalVariable.VariableKind kind,
AType type,
@Nullable java.lang.String genericSignature,
int index,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
<R,C> R |
accept(InsnVisitor<R,C> visitor,
C ctx)
Pass this
Instruction through the supplied InsnVisitor. |
void |
addReference(LocalReference insn) |
AnnotationSupplier |
getAnnotationSupplier() |
EnumBitSet<InstructionFlag> |
getDirectFlags()
Any direct flags for this
Instruction. |
@Nullable java.lang.String |
getGenericSignature() |
int |
getIndex() |
LocalVariable.VariableKind |
getKind() |
int |
getLoadCount()
The number of instructions currently referencing this variable which read from it.
|
java.lang.String |
getName() |
int |
getReferenceCount()
Gets the total number of references this variable has.
|
java.util.List<LocalReference> |
getReferences() |
AType |
getResultType()
Gets the stack type of the value produced by this
Instruction. |
int |
getStoreCount()
The number of instructions currently referencing this variable which write to it.
|
int |
getSubId() |
AType |
getType() |
java.lang.String |
getUniqueName() |
boolean |
isDead()
If this variable can be considered dead.
|
boolean |
isSynthetic() |
void |
removeReference(LocalReference insn) |
void |
setAnnotationSupplier(AnnotationSupplier annotationSupplier) |
void |
setGenericSignature(@Nullable java.lang.String genericSignature) |
void |
setName(java.lang.String name) |
void |
setSubId(int subId) |
void |
setSynthetic(boolean synthetic) |
void |
setType(AType type) |
accept, addRef, ancestorsOfType, computeFlags, copy, descendantsMatching, descendantsOfType, descendantsToList, descendantsToListWhere, descendantsWhere, firstAncestorOfType, getBytecodeOffset, getChildren, getDescendants, getFirstChild, getFirstChildOrNull, getFlags, getLastChild, getLastChildOrNull, getNextSibling, getNextSiblingOrNull, getParent, getParentOrNull, getPrevSibling, getPrevSiblingOrNull, getSourceLine, getTag, hasDirectFlag, hasFlag, insertAfter, insertBefore, invalidateFlags, isConnected, isDescendantOf, onChildModified, onConnected, onDisconnected, releaseRef, remove, replaceWith, setBytecodeOffset, setOffsets, setSourceLine, setTag, toString, toString, withOffsetspublic LocalVariable(LocalVariable.VariableKind kind, AType type, java.lang.String name)
public LocalVariable(LocalVariable.VariableKind kind, AType type, @Nullable @Nullable java.lang.String genericSignature, int index, java.lang.String name)
public void addReference(LocalReference insn)
public void removeReference(LocalReference insn)
public EnumBitSet<InstructionFlag> getDirectFlags()
InstructionInstruction.
The return value should be cached statically inside the Instruction impl.
getDirectFlags in class InstructionEnumBitSet representing the flags.Instruction.getFlags()public <R,C> R accept(InsnVisitor<R,C> visitor, C ctx)
InstructionInstruction through the supplied InsnVisitor.accept in class Instructionvisitor - The InsnVisitor.ctx - The context.InsnVisitor.public AType getResultType()
InstructionInstruction.getResultType in class InstructionAType.public LocalVariable.VariableKind getKind()
@Nullable public @Nullable java.lang.String getGenericSignature()
public AType getType()
public int getIndex()
public java.lang.String getName()
public int getSubId()
public java.util.List<LocalReference> getReferences()
public boolean isSynthetic()
public AnnotationSupplier getAnnotationSupplier()
public void setGenericSignature(@Nullable
@Nullable java.lang.String genericSignature)
public void setType(AType type)
public void setName(java.lang.String name)
public void setSubId(int subId)
public void setSynthetic(boolean synthetic)
public void setAnnotationSupplier(AnnotationSupplier annotationSupplier)
public int getLoadCount()
public int getStoreCount()
public int getReferenceCount()
public boolean isDead()
A variable is considered dead if: 1, It is not a parameter. 2, The variable has no stores.
public java.lang.String getUniqueName()