Uses of Class
org.apache.bcel.generic.InstructionHandle
-
Packages that use InstructionHandle Package Description org.apache.bcel.generic This package contains the "generic" part of the Byte Code Engineering Library, i.e., classes to dynamically modify class objects and byte code instructions.org.apache.bcel.util This package contains utility classes for the Byte Code Engineering Library, namely:org.apache.bcel.verifier.structurals Provides a PassVerifier class mostly used internally by JustIce, yielding a control flow graph for public use as a nice side effect. -
-
Uses of InstructionHandle in org.apache.bcel.generic
Subclasses of InstructionHandle in org.apache.bcel.generic Modifier and Type Class Description classBranchHandleBranchHandle is returned by specialized InstructionList.append() whenever a BranchInstruction is appended.Fields in org.apache.bcel.generic declared as InstructionHandle Modifier and Type Field Description private InstructionHandleInstructionList. endprivate InstructionHandleLocalVariableGen. endprivate InstructionHandleCodeExceptionGen. end_pcprivate InstructionHandleCodeExceptionGen. handler_pcprivate InstructionHandleLineNumberGen. ihprivate InstructionHandleInstructionHandle. nextprivate InstructionHandleInstructionHandle. prevprivate InstructionHandleReturnaddressType. returnTargetprivate InstructionHandleInstructionList. startprivate InstructionHandleLocalVariableGen. startprivate InstructionHandleCodeExceptionGen. start_pcprotected InstructionHandleBranchInstruction. targetDeprecated.(since 6.0) will be made private; do not access directly, use getter/setter(package private) InstructionHandleMethodGen.BranchTarget. targetprotected InstructionHandle[]Select. targetsDeprecated.(since 6.0) will be made private; do not access directly, use getter/setterprivate InstructionHandle[]SWITCH. targetsprivate InstructionHandle[]TargetLostException. targetsFields in org.apache.bcel.generic with type parameters of type InstructionHandle Modifier and Type Field Description private java.util.Hashtable<InstructionHandle,MethodGen.BranchTarget>MethodGen.BranchStack. visitedTargetsMethods in org.apache.bcel.generic that return InstructionHandle Modifier and Type Method Description InstructionHandleInstructionList. append(CompoundInstruction c)Append a compound instruction.InstructionHandleInstructionList. append(Instruction i)Append an instruction to the end of this list.InstructionHandleInstructionList. append(InstructionHandle ih, CompoundInstruction c)Append a compound instruction.InstructionHandleInstructionList. append(InstructionHandle ih, Instruction i)Append an instruction after instruction (handle) ih contained in this list.InstructionHandleInstructionList. append(InstructionHandle ih, InstructionList il)Append another list after instruction (handle) ih contained in this list.InstructionHandleInstructionList. append(InstructionList il)Append another list to this one.InstructionHandleInstructionList. append(Instruction i, CompoundInstruction c)Append a compound instruction, after instruction i.InstructionHandleInstructionList. append(Instruction i, Instruction j)Append a single instruction j after another instruction i, which must be in this list of course!InstructionHandleInstructionList. append(Instruction i, InstructionList il)Append another list after instruction i contained in this list.InstructionHandleInstructionList. findHandle(int pos)Get instruction handle for instruction at byte code position pos.static InstructionHandleInstructionList. findHandle(InstructionHandle[] ihs, int[] pos, int count, int target)Find the target instruction (handle) that corresponds to the given target position (byte code offset).private InstructionHandleInstructionList. findInstruction1(Instruction i)Search for given Instruction reference, start at beginning of list.private InstructionHandleInstructionList. findInstruction2(Instruction i)Search for given Instruction reference, start at end of listInstructionHandleInstructionList. getEnd()InstructionHandleLocalVariableGen. getEnd()InstructionHandleCodeExceptionGen. getEndPC()InstructionHandleCodeExceptionGen. getHandlerPC()InstructionHandleLineNumberGen. getInstruction()(package private) static InstructionHandleInstructionHandle. getInstructionHandle(Instruction i)Factory method.InstructionHandle[]InstructionList. getInstructionHandles()InstructionHandleInstructionHandle. getNext()InstructionHandleInstructionHandle. getPrev()InstructionHandleInstructionList. getStart()InstructionHandleLocalVariableGen. getStart()InstructionHandleCodeExceptionGen. getStartPC()InstructionHandleBranchHandle. getTarget()InstructionHandleBranchInstruction. getTarget()InstructionHandleReturnaddressType. getTarget()(package private) InstructionHandleSelect. getTarget(int index)InstructionHandle[]Select. getTargets()InstructionHandle[]TargetLostException. getTargets()InstructionHandleInstructionList. insert(CompoundInstruction c)Insert a compound instruction.InstructionHandleInstructionList. insert(Instruction i)Insert an instruction at start of this list.InstructionHandleInstructionList. insert(InstructionHandle ih, CompoundInstruction c)Insert a compound instruction.InstructionHandleInstructionList. insert(InstructionHandle ih, Instruction i)Insert an instruction before instruction (handle) ih contained in this list.InstructionHandleInstructionList. insert(InstructionHandle ih, InstructionList il)Insert another list before Instruction handle ih contained in this list.InstructionHandleInstructionList. insert(InstructionList il)Insert another list.InstructionHandleInstructionList. insert(Instruction i, CompoundInstruction c)Insert a compound instruction before instruction i.InstructionHandleInstructionList. insert(Instruction i, Instruction j)Insert a single instruction j before another instruction i, which must be in this list of course!InstructionHandleInstructionList. insert(Instruction i, InstructionList il)Insert another list before Instruction i contained in this list.InstructionHandleJsrInstruction. physicalSuccessor()Returns an InstructionHandle to the physical successor of this JsrInstruction.(package private) InstructionHandleInstructionHandle. setNext(InstructionHandle next)(package private) InstructionHandleInstructionHandle. setPrev(InstructionHandle prev)Methods in org.apache.bcel.generic that return types with arguments of type InstructionHandle Modifier and Type Method Description java.util.Iterator<InstructionHandle>InstructionList. iterator()Methods in org.apache.bcel.generic with parameters of type InstructionHandle Modifier and Type Method Description CodeExceptionGenMethodGen. addExceptionHandler(InstructionHandle start_pc, InstructionHandle end_pc, InstructionHandle handler_pc, ObjectType catch_type)Add an exception handler, i.e., specify region where a handler is active and an instruction where the actual handling is done.LineNumberGenMethodGen. addLineNumber(InstructionHandle ih, int src_line)Give an instruction a line number corresponding to the source code line.LocalVariableGenMethodGen. addLocalVariable(java.lang.String name, Type type, int slot, InstructionHandle start, InstructionHandle end)Adds a local variable to this method.LocalVariableGenMethodGen. addLocalVariable(java.lang.String name, Type type, int slot, InstructionHandle start, InstructionHandle end, int orig_index)Adds a local variable to this method.LocalVariableGenMethodGen. addLocalVariable(java.lang.String name, Type type, InstructionHandle start, InstructionHandle end)Adds a local variable to this method and assigns an index automatically.private voidInstructionList. append(InstructionHandle ih)Append an instruction to the end of this list.BranchHandleInstructionList. append(InstructionHandle ih, BranchInstruction i)Append an instruction after instruction (handle) ih contained in this list.InstructionHandleInstructionList. append(InstructionHandle ih, CompoundInstruction c)Append a compound instruction.InstructionHandleInstructionList. append(InstructionHandle ih, Instruction i)Append an instruction after instruction (handle) ih contained in this list.InstructionHandleInstructionList. append(InstructionHandle ih, InstructionList il)Append another list after instruction (handle) ih contained in this list.booleanInstructionList. contains(InstructionHandle i)booleanBranchInstruction. containsTarget(InstructionHandle ih)booleanCodeExceptionGen. containsTarget(InstructionHandle ih)booleanInstructionTargeter. containsTarget(InstructionHandle ih)Checks whether this targeter targets the specified instruction handle.booleanLineNumberGen. containsTarget(InstructionHandle ih)booleanLocalVariableGen. containsTarget(InstructionHandle ih)booleanSelect. containsTarget(InstructionHandle ih)static BranchInstructionInstructionFactory. createBranchInstruction(short opcode, InstructionHandle target)Create branch instruction by given opcode, except LOOKUPSWITCH and TABLESWITCH.voidInstructionList. delete(InstructionHandle ih)Remove instruction from this list.voidInstructionList. delete(InstructionHandle from, InstructionHandle to)Remove instructions from instruction `from' to instruction `to' contained in this list.private voidSWITCH. fillup(int max_gap, InstructionHandle target)static InstructionHandleInstructionList. findHandle(InstructionHandle[] ihs, int[] pos, int count, int target)Find the target instruction (handle) that corresponds to the given target position (byte code offset).protected intBranchInstruction. getTargetOffset(InstructionHandle _target)private voidInstructionList. insert(InstructionHandle ih)Insert an instruction at start of this list.BranchHandleInstructionList. insert(InstructionHandle ih, BranchInstruction i)Insert an instruction before instruction (handle) ih contained in this list.InstructionHandleInstructionList. insert(InstructionHandle ih, CompoundInstruction c)Insert a compound instruction.InstructionHandleInstructionList. insert(InstructionHandle ih, Instruction i)Insert an instruction before instruction (handle) ih contained in this list.InstructionHandleInstructionList. insert(InstructionHandle ih, InstructionList il)Insert another list before Instruction handle ih contained in this list.voidInstructionList. move(InstructionHandle ih, InstructionHandle target)Move a single instruction (handle) to a new location.voidInstructionList. move(InstructionHandle start, InstructionHandle end, InstructionHandle target)Take all instructions (handles) from "start" to "end" and append them after the new location "target".(package private) static voidBranchInstruction. notifyTarget(InstructionHandle old_ih, InstructionHandle new_ih, InstructionTargeter t)Used by BranchInstruction, LocalVariableGen, CodeExceptionGen, LineNumberGenvoidMethodGen.BranchStack. push(InstructionHandle target, int stackDepth)voidInstructionList. redirectBranches(InstructionHandle old_target, InstructionHandle new_target)Redirect all references from old_target to new_target, i.e., update targets of branch instructions.voidInstructionList. redirectExceptionHandlers(CodeExceptionGen[] exceptions, InstructionHandle old_target, InstructionHandle new_target)Redirect all references of exception handlers from old_target to new_target.voidInstructionList. redirectLocalVariables(LocalVariableGen[] lg, InstructionHandle old_target, InstructionHandle new_target)Redirect all references of local variables from old_target to new_target.private voidInstructionList. remove(InstructionHandle prev, InstructionHandle next)Remove from instruction `prev' to instruction `next' both contained in this list.voidLocalVariableGen. setEnd(InstructionHandle end)voidCodeExceptionGen. setEndPC(InstructionHandle end_pc)voidCodeExceptionGen. setHandlerPC(InstructionHandle handler_pc)voidLineNumberGen. setInstruction(InstructionHandle ih)(package private) InstructionHandleInstructionHandle. setNext(InstructionHandle next)(package private) InstructionHandleInstructionHandle. setPrev(InstructionHandle prev)voidLocalVariableGen. setStart(InstructionHandle start)voidCodeExceptionGen. setStartPC(InstructionHandle start_pc)voidBranchHandle. setTarget(InstructionHandle ih)Pass new target to instruction.voidBranchInstruction. setTarget(InstructionHandle target)Set branch targetvoidSelect. setTarget(int i, InstructionHandle target)Set branch target for `i'th case(package private) voidSelect. setTargets(InstructionHandle[] array)voidBranchHandle. updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)Update target of instruction.voidBranchInstruction. updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)voidCodeExceptionGen. updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)voidInstructionTargeter. updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)Replaces the target of this targeter from this old handle to the new handle.voidLineNumberGen. updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)voidLocalVariableGen. updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)voidSelect. updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)private MethodGen.BranchTargetMethodGen.BranchStack. visit(InstructionHandle target, int stackDepth)private booleanMethodGen.BranchStack. visited(InstructionHandle target)Constructors in org.apache.bcel.generic with parameters of type InstructionHandle Constructor Description BranchInstruction(short opcode, InstructionHandle target)Common super constructorBranchTarget(InstructionHandle target, int stackDepth)CodeExceptionGen(InstructionHandle start_pc, InstructionHandle end_pc, InstructionHandle handler_pc, ObjectType catch_type)Add an exception handler, i.e., specify region where a handler is active and an instruction where the actual handling is done.GOTO(InstructionHandle target)GOTO_W(InstructionHandle target)GotoInstruction(short opcode, InstructionHandle target)IF_ACMPEQ(InstructionHandle target)IF_ACMPNE(InstructionHandle target)IF_ICMPEQ(InstructionHandle target)IF_ICMPGE(InstructionHandle target)IF_ICMPGT(InstructionHandle target)IF_ICMPLE(InstructionHandle target)IF_ICMPLT(InstructionHandle target)IF_ICMPNE(InstructionHandle target)IFEQ(InstructionHandle target)IFGE(InstructionHandle target)IFGT(InstructionHandle target)IfInstruction(short opcode, InstructionHandle target)IFLE(InstructionHandle target)IFLT(InstructionHandle target)IFNE(InstructionHandle target)IFNONNULL(InstructionHandle target)IFNULL(InstructionHandle target)JSR(InstructionHandle target)JSR_W(InstructionHandle target)JsrInstruction(short opcode, InstructionHandle target)LineNumberGen(InstructionHandle ih, int src_line)Create a line number.LocalVariableGen(int index, java.lang.String name, Type type, InstructionHandle start, InstructionHandle end)Generate a local variable that with index `index'.LocalVariableGen(int index, java.lang.String name, Type type, InstructionHandle start, InstructionHandle end, int orig_index)Generates a local variable that with index `index'.LOOKUPSWITCH(int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget)ReturnaddressType(InstructionHandle returnTarget)Creates a ReturnaddressType object with a target.Select(short opcode, int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget)(Match, target) pairs for switch.SWITCH(int[] match, InstructionHandle[] targets, InstructionHandle target)SWITCH(int[] match, InstructionHandle[] targets, InstructionHandle target, int max_gap)Template for switch() constructs.TABLESWITCH(int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget)TargetLostException(InstructionHandle[] t, java.lang.String mesg) -
Uses of InstructionHandle in org.apache.bcel.util
Fields in org.apache.bcel.util declared as InstructionHandle Modifier and Type Field Description private InstructionHandle[]InstructionFinder. handlesFields in org.apache.bcel.util with type parameters of type InstructionHandle Modifier and Type Field Description private java.util.Map<Instruction,InstructionHandle>BCELFactory. branch_mapMethods in org.apache.bcel.util that return InstructionHandle Modifier and Type Method Description private InstructionHandle[]InstructionFinder. getMatch(int matched_from, int match_length)Methods in org.apache.bcel.util with parameters of type InstructionHandle Modifier and Type Method Description booleanInstructionFinder.CodeConstraint. checkCode(InstructionHandle[] match)java.util.Iterator<InstructionHandle[]>InstructionFinder. search(java.lang.String pattern, InstructionHandle from)Start search beginning from `from'.java.util.Iterator<InstructionHandle[]>InstructionFinder. search(java.lang.String pattern, InstructionHandle from, InstructionFinder.CodeConstraint constraint)Search for the given pattern in the instruction list. -
Uses of InstructionHandle in org.apache.bcel.verifier.structurals
Fields in org.apache.bcel.verifier.structurals declared as InstructionHandle Modifier and Type Field Description private InstructionHandleExceptionHandler. handlerpcThe InstructionHandle where the handling begins.private InstructionHandleControlFlowGraph.InstructionContextImpl. instructionThe InstructionHandle this InstructionContext is wrapped around.private InstructionHandleSubroutines.SubroutineImpl. theRETThe RET instruction that leaves this subroutine.Fields in org.apache.bcel.verifier.structurals with type parameters of type InstructionHandle Modifier and Type Field Description private java.util.Map<InstructionHandle,java.util.Set<ExceptionHandler>>ExceptionHandlers. exceptionhandlersThe ExceptionHandler instances.private java.util.Map<InstructionHandle,InstructionContext>ControlFlowGraph. instructionContextsAll InstructionContext instances of this ControlFlowGraph.private java.util.Set<InstructionHandle>Subroutines.SubroutineImpl. instructionsThe instructions that belong to this subroutine.private java.util.Map<InstructionHandle,Subroutine>Subroutines. subroutinesThe map containing the subroutines found.private java.util.Set<InstructionHandle>Subroutines.SubroutineImpl. theJSRsThe JSR or JSR_W instructions that define this subroutine by targeting it.Methods in org.apache.bcel.verifier.structurals that return InstructionHandle Modifier and Type Method Description private InstructionHandle[]ControlFlowGraph.InstructionContextImpl. _getSuccessors()A utility method that calculates the successors of a given InstructionHandle That means, a RET does have successors as defined here.InstructionHandle[]Subroutine. getEnteringJsrInstructions()Returns all the JsrInstructions that have the first instruction of this subroutine as their target.InstructionHandle[]Subroutines.SubroutineImpl. getEnteringJsrInstructions()InstructionHandleExceptionHandler. getHandlerStart()Returns the InstructionHandle where the handler starts off.InstructionHandleControlFlowGraph.InstructionContextImpl. getInstruction()InstructionHandleInstructionContext. getInstruction()Returns the InstructionHandle this InstructionContext is wrapped around.InstructionHandle[]Subroutine. getInstructions()Returns all instructions that together form this subroutine.InstructionHandle[]Subroutines.SubroutineImpl. getInstructions()InstructionHandleSubroutine. getLeavingRET()Returns the one and only RET that leaves the subroutine.InstructionHandleSubroutines.SubroutineImpl. getLeavingRET()private static InstructionHandle[]Subroutines. getSuccessors(InstructionHandle instruction)A utility method that calculates the successors of a given InstructionHandle in the same subroutine.Methods in org.apache.bcel.verifier.structurals with parameters of type InstructionHandle Modifier and Type Method Description voidSubroutines.SubroutineImpl. addEnteringJsrInstruction(InstructionHandle jsrInst)Adds a new JSR or JSR_W that has this subroutine as its target.(package private) voidSubroutines.SubroutineImpl. addInstruction(InstructionHandle ih)booleanSubroutine. contains(InstructionHandle inst)Returns if the given InstructionHandle refers to an instruction that is part of this subroutine.booleanSubroutines.SubroutineImpl. contains(InstructionHandle inst)InstructionContextControlFlowGraph. contextOf(InstructionHandle inst)Returns the InstructionContext of a given instruction.InstructionContext[]ControlFlowGraph. contextsOf(InstructionHandle[] insts)Returns the InstructionContext[] of a given InstructionHandle[], in a naturally ordered manner.ExceptionHandler[]ExceptionHandlers. getExceptionHandlers(InstructionHandle ih)Returns all the ExceptionHandler instances representing exception handlers that protect the instruction ih.SubroutineSubroutines. getSubroutine(InstructionHandle leader)Returns the Subroutine object associated with the given leader (that is, the first instruction of the subroutine).private static InstructionHandle[]Subroutines. getSuccessors(InstructionHandle instruction)A utility method that calculates the successors of a given InstructionHandle in the same subroutine.booleanControlFlowGraph. isDead(InstructionHandle i)Returns true, if and only if the said instruction is not reachable; that means, if it is not part of this ControlFlowGraph.SubroutineSubroutines. subroutineOf(InstructionHandle any)Returns the subroutine object associated with the given instruction.Constructors in org.apache.bcel.verifier.structurals with parameters of type InstructionHandle Constructor Description ExceptionHandler(ObjectType catch_type, InstructionHandle handler_pc)Leave instance creation to JustIce.InstructionContextImpl(InstructionHandle inst)Creates an InstructionHandleImpl object from an InstructionHandle.
-