Uses of Class
javassist.bytecode.BadBytecode
Packages that use BadBytecode
Package
Description
The Javassist Core API.
Bytecode-level API.
Bytecode Analysis API.
This package contains the classes for modifying a method body.
Runtime Behavioral Reflection.
-
Uses of BadBytecode in javassist
Methods in javassist that throw BadBytecodeModifier and TypeMethodDescriptionprivate static String
CtNewWrappedMethod.addBodyMethod
(CtClassType clazz, ClassFile classfile, CtMethod src) private void
CtBehavior.addParameter2
(int where, CtClass type, String desc) private static void
CtClassType.insertAuxInitializer
(CodeAttribute codeAttr, Bytecode initializer, int stacksize) private void
CtBehavior.insertGoto
(CodeIterator iterator, int subr, int pos) -
Uses of BadBytecode in javassist.bytecode
Methods in javassist.bytecode that return BadBytecodeMethods in javassist.bytecode that throw BadBytecodeModifier and TypeMethodDescription(package private) void
CodeIterator.Switcher.adjustOffsets
(int size, int nops) private int
StackMapTable.Walker.appendFrame
(int pos, int type) void
StackMapTable.Walker.appendFrame
(int pos, int offsetDelta, int[] tags, int[] data) Invoked if the visited frame is aappend_frame
.(package private) static byte[]
CodeIterator.changeLdcToLdcW
(byte[] code, ExceptionTable etable, CodeAttribute ca, CodeAttribute.LdcEntry ldcs) private void
CodeAnalyzer.checkTarget
(int opIndex, int target, int codeLength, int[] stack, int stackDepth) void
StackMapTable.Walker.chopFrame
(int pos, int offsetDelta, int k) Invoked if the visited frame is achop_frame
.int
CodeAnalyzer.computeMaxStack()
int
CodeAttribute.computeMaxStack()
Computes the maximum stack size and setsmax_stack
to the computed size.private static CodeAttribute.LdcEntry
CodeAttribute.copyCode
(byte[] code, int beginPos, int endPos, ConstPool srcCp, byte[] newcode, ConstPool destCp, Map<String, String> classnameMap) private byte[]
CodeAttribute.copyCode
(ConstPool destCp, Map<String, String> classnames, ExceptionTable etable, CodeAttribute destCa) Copies code.(package private) static byte[]
CodeAttribute.LdcEntry.doit
(byte[] code, CodeAttribute.LdcEntry ldc, ExceptionTable etable, CodeAttribute ca) void
StackMapTable.Shifter.doit()
byte[]
StackMapTable.SimpleCopy.doit()
private int
StackMapTable.Walker.fullFrame
(int pos) void
StackMapTable.Walker.fullFrame
(int pos, int offsetDelta, int[] localTags, int[] localData, int[] stackTags, int[] stackData) Invoked if the visited frame isfull_frame
.(package private) int
int
CodeIterator.insert
(byte[] code) Inserts the given bytecode sequence before the next instruction that would be returned bynext()
(not before the instruction returned by the last call tonext()
).void
CodeIterator.insert
(int pos, byte[] code) Inserts the given bytecode sequence before the instruction at the given indexpos
.private int
CodeIterator.insert0
(int pos, byte[] code, boolean exclusive) int
CodeIterator.insertAt
(int pos, byte[] code) Inserts the given bytecode sequence before the instruction at the given indexpos
.int
CodeIterator.insertEx
(byte[] code) Inserts the given bytecode sequence exclusively before the next instruction that would be returned bynext()
(not before the instruction returned by tha last call tonext()
).void
CodeIterator.insertEx
(int pos, byte[] code) Inserts the given bytecode sequence exclusively before the instruction at the given indexpos
.int
CodeIterator.insertExAt
(int pos, byte[] code) Inserts the given bytecode sequence exclusively before the instruction at the given indexpos
.int
CodeIterator.insertExGap
(int length) Inserts an exclusive gap before the next instruction that would be returned bynext()
(not before the instruction returned by the last call tonext()
).int
CodeIterator.insertExGap
(int pos, int length) Inserts an exclusive gap in front of the instruction at the given indexpos
.int
CodeIterator.insertGap
(int length) Inserts a gap before the next instruction that would be returned bynext()
(not before the instruction returned by the last call tonext()
).int
CodeIterator.insertGap
(int pos, int length) Inserts a gap in front of the instruction at the given indexpos
.private static void
CodeIterator.insertGap2
(byte[] code, int where, int gapLength, int endPos, byte[] newcode, boolean exclusive) private static byte[]
CodeIterator.insertGap2w
(byte[] code, int where, int gapLength, boolean exclusive, List<CodeIterator.Branch> jumps, CodeIterator.Pointers ptrs) CodeIterator.insertGapAt
(int pos, int length, boolean exclusive) Inserts an inclusive or exclusive gap in front of the instruction at the given indexpos
.(package private) static byte[]
CodeIterator.insertGapCore0
(byte[] code, int where, int gapLength, boolean exclusive, ExceptionTable etable, CodeAttribute ca) insertGapCore0() inserts a gap (some NOPs).private byte[]
CodeIterator.insertGapCore0w
(byte[] code, int where, int gapLength, boolean exclusive, ExceptionTable etable, CodeAttribute ca, CodeIterator.Gap newWhere) private static byte[]
CodeIterator.insertGapCore1
(byte[] code, int where, int gapLength, boolean exclusive, ExceptionTable etable, CodeAttribute ca) void
StackMap.insertLocal
(int index, int tag, int classInfo) Updates this stack map table when a new local variable is inserted for a new parameter.void
StackMapTable.insertLocal
(int index, int tag, int classInfo) Updates this stack map table when a new local variable is inserted for a new parameter.void
CodeAttribute.insertLocalVar
(int where, int size) Changes the index numbers of the local variables to append a new parameter.private static byte[]
CodeIterator.makeExapndedCode
(byte[] code, List<CodeIterator.Branch> jumps, int where, int gapLength) private static List
<CodeIterator.Branch> CodeIterator.makeJumpList
(byte[] code, int endPos, CodeIterator.Pointers ptrs) int
CodeIterator.next()
Returns the index of the next instruction (not the operand following the current opcode).(package private) static int
CodeIterator.nextOpcode
(byte[] code, int index) Calculates the index of the next opcode.void
StackMapTable.Walker.parse()
Visits each entry of the stack map frames.private static SignatureAttribute.ObjectType
SignatureAttribute.parseArray
(String sig, SignatureAttribute.Cursor c) private static SignatureAttribute.ClassType
SignatureAttribute.parseClassType
(String sig, SignatureAttribute.Cursor c) private static SignatureAttribute.ClassType
SignatureAttribute.parseClassType2
(String sig, SignatureAttribute.Cursor c, SignatureAttribute.ClassType parent) private static SignatureAttribute.MethodSignature
SignatureAttribute.parseMethodSig
(String sig) private static SignatureAttribute.ObjectType
SignatureAttribute.parseObjectType
(String sig, SignatureAttribute.Cursor c, boolean dontThrow) private static SignatureAttribute.ClassSignature
private static SignatureAttribute.Type
SignatureAttribute.parseType
(String sig, SignatureAttribute.Cursor c) private static SignatureAttribute.TypeArgument[]
SignatureAttribute.parseTypeArgs
(String sig, SignatureAttribute.Cursor c) private static SignatureAttribute.TypeParameter[]
SignatureAttribute.parseTypeParams
(String sig, SignatureAttribute.Cursor cur) private boolean
CodeAnalyzer.processBranch
(int opcode, CodeIterator ci, int index, int codeLength, int[] stack, int stackDepth, int[] jsrDepth) void
MethodInfo.rebuildStackMap
(ClassPool pool) Rebuilds a stack map table.void
MethodInfo.rebuildStackMapForME
(ClassPool pool) Rebuilds a stack map table for J2ME (CLDC).void
MethodInfo.rebuildStackMapIf6
(ClassPool pool, ClassFile cf) Rebuilds a stack map table if the class file is for Java 6 or later.void
StackMapTable.Walker.sameFrame
(int pos, int offsetDelta) Invoked if the visited frame is asame_frame
or asame_frame_extended
.private int
StackMapTable.Walker.sameLocals
(int pos, int type) void
StackMapTable.Walker.sameLocals
(int pos, int offsetDelta, int stackTag, int stackData) Invoked if the visited frame is asame_locals_1_stack_item_frame
or asame_locals_1_stack_item_frame_extended
.void
MethodInfo.setSuperclass
(String superclass) Changes a super constructor called by this constructor.(package private) void
CodeIterator.Pointers.shiftForSwitch
(int where, int gapLength) (package private) void
StackMap.shiftForSwitch
(int where, int gapSize) (package private) void
StackMapTable.shiftForSwitch
(int where, int gapSize) private static void
CodeAttribute.shiftIndex
(CodeIterator ci, int lessThan, int delta) private static void
CodeAttribute.shiftIndex0
(CodeIterator ci, int index, int opcode, int lessThan, int delta, int opcode_i_0, int opcode_i) private static void
CodeAttribute.shiftIndex8
(CodeIterator ci, int index, int opcode, int lessThan, int delta) (package private) void
CodeIterator.Pointers.shiftPc
(int where, int gapLength, boolean exclusive) (package private) void
StackMap.shiftPc
(int where, int gapSize, boolean exclusive) (package private) void
StackMapTable.shiftPc
(int where, int gapSize, boolean exclusive) int
CodeIterator.skipConstructor()
Moves to the instruction for eithersuper()
orthis()
.int
CodeIterator.skipSuperConstructor()
Moves to the instruction forsuper()
.private int
CodeIterator.skipSuperConstructor0
(int skipThis) int
CodeIterator.skipThisConstructor()
Moves to the instruction forthis()
.(package private) int
StackMapTable.Walker.stackMapFrames
(int pos, int nth) Invoked when the next entry of the stack map frames is visited.SignatureAttribute.toClassSignature
(String sig) Parses the given signature string as a class signature.SignatureAttribute.toFieldSignature
(String sig) Parses the given signature string as a field type signature.SignatureAttribute.toMethodSignature
(String sig) Parses the given signature string as a method type signature.static SignatureAttribute.Type
SignatureAttribute.toTypeSignature
(String sig) Parses the given signature string as a type signature.private void
CodeAnalyzer.visitBytecode
(CodeIterator ci, int[] stack, int index) private int
CodeAnalyzer.visitInst
(int op, CodeIterator ci, int index, int stack) Visits an instruction.(package private) abstract int
CodeIterator.Branch.write
(int srcPos, byte[] code, int destPos, byte[] newcode) (package private) int
CodeIterator.Switcher.write
(int src, byte[] code, int dest, byte[] newcode) Constructors in javassist.bytecode that throw BadBytecodeModifierConstructorDescriptionprivate
CodeAttribute
(ConstPool cp, CodeAttribute src, Map<String, String> classnames) Constructs a copy ofCode_attribute
.MethodInfo
(ConstPool cp, String methodname, MethodInfo src, Map<String, String> classnameMap) Constructs a copy ofmethod_info
structure. -
Uses of BadBytecode in javassist.bytecode.analysis
Methods in javassist.bytecode.analysis that throw BadBytecodeModifier and TypeMethodDescriptionFrame[]
Analyzer.analyze
(CtClass clazz, MethodInfo method) Performs data-flow analysis on a method and returns an array, indexed by instruction position, containing the starting frame state of all reachable instructions.Frame[]
Performs data-flow analysis on a method and returns an array, indexed by instruction position, containing the starting frame state of all reachable instructions.private void
Analyzer.analyzeNextEntry
(MethodInfo method, CodeIterator iter, IntQueue queue, Executor executor) private void
Executor.evalArrayLoad
(Type expectedComponent, Frame frame) private void
Executor.evalArrayStore
(Type expectedComponent, Frame frame) private void
Executor.evalBinaryMath
(Type expected, Frame frame) private void
Executor.evalGetField
(int opcode, int index, Frame frame) private void
Executor.evalInvokeDynamic
(int opcode, int index, Frame frame) private void
Executor.evalInvokeIntfMethod
(int opcode, int index, Frame frame) private void
Executor.evalInvokeMethod
(int opcode, int index, Frame frame) private void
private void
Executor.evalLoad
(Type expected, int index, Frame frame, Subroutine subroutine) private void
Executor.evalNewArray
(int pos, CodeIterator iter, Frame frame) private void
Executor.evalNewObjectArray
(int pos, CodeIterator iter, Frame frame) private void
Executor.evalPutField
(int opcode, int index, Frame frame) private void
private void
Executor.evalStore
(Type expected, int index, Frame frame, Subroutine subroutine) private void
Executor.evalWide
(int pos, CodeIterator iter, Frame frame, Subroutine subroutine) void
Executor.execute
(MethodInfo method, int pos, CodeIterator iter, Frame frame, Subroutine subroutine) Execute the instruction, modeling the effects on the specified frame and subroutine.ControlFlow.frameAt
(int pos) Returns the types of the local variables and stack frame entries available at the given position.private int
Analyzer.getNext
(CodeIterator iter, int of, int restore) private Type
private int
Analyzer.lookAhead
(CodeIterator iter, int pos) private void
Analyzer.mergeJsr
(IntQueue queue, Frame frame, Subroutine sub, int pos, int next) private void
Analyzer.mergeLookupSwitch
(IntQueue queue, int pos, CodeIterator iter, Frame frame) private void
Analyzer.mergeRet
(IntQueue queue, CodeIterator iter, int pos, Frame frame, Subroutine subroutine) private void
Analyzer.mergeTableSwitch
(IntQueue queue, int pos, CodeIterator iter, Frame frame) private Type[]
Executor.paramTypesFromDesc
(String desc) private Type
Executor.resolveClassInfo
(String info) private Type
Executor.returnTypeFromDesc
(String desc) private void
SubroutineScanner.scan
(int pos, CodeIterator iter, Subroutine sub) SubroutineScanner.scan
(MethodInfo method) private void
SubroutineScanner.scanLookupSwitch
(int pos, CodeIterator iter, Subroutine sub) private boolean
SubroutineScanner.scanOp
(int pos, CodeIterator iter, Subroutine sub) private void
SubroutineScanner.scanTableSwitch
(int pos, CodeIterator iter, Subroutine sub) private Type
Executor.typeFromDesc
(String desc) private void
Executor.verifyAssignable
(Type expected, Type type) Constructors in javassist.bytecode.analysis that throw BadBytecodeModifierConstructorDescriptionControlFlow
(CtClass ctclazz, MethodInfo minfo) Constructs a control-flow analyzer.ControlFlow
(CtMethod method) Constructs a control-flow analyzer for the given method. -
Uses of BadBytecode in javassist.bytecode.stackmap
Subclasses of BadBytecode in javassist.bytecode.stackmapMethods in javassist.bytecode.stackmap that throw BadBytecodeModifier and TypeMethodDescriptionstatic void
private void
BasicBlock.Maker.addCatchers
(BasicBlock[] blocks, ExceptionTable et) private void
Tracer.checkParamTypes
(String desc, int i) private static int
private int
Tracer.doGetField
(int pos, byte[] code, boolean notStatic) private int
Tracer.doInvokeDynamic
(int pos, byte[] code) private int
Tracer.doInvokeIntfMethod
(int pos, byte[] code) private int
Tracer.doInvokeMethod
(int pos, byte[] code, boolean notStatic) protected int
Tracer.doOpcode
(int pos, byte[] code) Does abstract interpretation on the given bytecode instruction.private int
Tracer.doOpcode0_53
(int pos, byte[] code, int op) private int
Tracer.doOpcode148_201
(int pos, byte[] code, int op) private int
Tracer.doOpcode54_95
(int pos, byte[] code, int op) private int
Tracer.doPutField
(int pos, byte[] code, boolean notStatic) private int
Tracer.doWIDE
(int pos, byte[] code) static BasicBlock
BasicBlock.find
(BasicBlock[] blocks, int pos) private void
MapMaker.findDeadCatchers
(byte[] code, TypedBlock[] blocks) private void
MapMaker.fixDeadcode
(byte[] code, TypedBlock block) private void
MapMaker.fixTypes
(byte[] code, TypedBlock[] blocks) (package private) void
TypedBlock.initFirstBlock
(int maxStack, int maxLocals, String className, String methodDesc, boolean isStatic, boolean isConstructor) Initializes the first block by the given method descriptor.BasicBlock.Maker.make
(CodeIterator ci, int begin, int end, ExceptionTable et) BasicBlock.Maker.make
(MethodInfo minfo) private void
MapMaker.make
(byte[] code, TypedBlock tb) (package private) void
MapMaker.make
(TypedBlock[] blocks, byte[] code) Runs an analyzer (Phase 1 and 2).static StackMapTable
MapMaker.make
(ClassPool classes, MethodInfo minfo) Computes the stack map table of the given method and returns it.static TypeData
(package private) static TypeData
static StackMap
MapMaker.make2
(ClassPool classes, MethodInfo minfo) Computes the stack map table for J2ME.static TypedBlock[]
TypedBlock.makeBlocks
(MethodInfo minfo, CodeAttribute ca, boolean optimize) Divides the method body into basic blocks.protected void
BasicBlock.Maker.makeJsr
(Map<Integer, BasicBlock.Mark> marks, int pos, int target, int size) private Map
<Integer, BasicBlock.Mark> BasicBlock.Maker.makeMarks
(CodeIterator ci, int begin, int end, ExceptionTable et) private TypeData
private void
MapMaker.mergeMap
(TypedBlock dest, boolean mergeStack) private void
MapMaker.recordStackMap
(TypedBlock target) private void
MapMaker.recordStackMap
(TypedBlock target, int exceptionType) private void
MapMaker.recordStackMap0
(TypedBlock target, int st, TypeData[] tStackTypes) private void
Tracer.setFieldTarget
(boolean notStatic, int index) void
TypedBlock.setStackMap
(int st, TypeData[] stack, int nl, TypeData[] locals) void
void
void
void
abstract void
private static void
Sets the type name of this object type.void
void
private void
MapMaker.traceException
(byte[] code, BasicBlock.Catch handler) protected void
Tracer.visitBranch
(int pos, byte[] code, int offset) protected void
Tracer.visitGoto
(int pos, byte[] code, int offset) protected void
Tracer.visitJSR
(int pos, byte[] code) Invoked when the visited instruction is jsr.protected void
Tracer.visitLookupSwitch
(int pos, byte[] code, int n, int pairsPos, int defaultOffset) protected void
Tracer.visitRET
(int pos, byte[] code) Invoked when the visited instruction is ret or wide ret.protected void
Tracer.visitReturn
(int pos, byte[] code) protected void
Tracer.visitTableSwitch
(int pos, byte[] code, int n, int offsetPos, int defaultOffset) protected void
Tracer.visitThrow
(int pos, byte[] code) -
Uses of BadBytecode in javassist.convert
Methods in javassist.convert that throw BadBytecodeModifier and TypeMethodDescriptionprivate Frame
TransformAccessArrayField.getFrame
(int pos) private String
TransformAccessArrayField.getLoadReplacementSignature
(int opcode) private String
TransformAccessArrayField.getStoreReplacementSignature
(int opcode) private String
TransformAccessArrayField.getTopType
(int pos) private void
TransformAccessArrayField.initFrames
(CtClass clazz, MethodInfo minfo) protected int
TransformBefore.match
(int c, int pos, CodeIterator iterator, int typedesc, ConstPool cp) protected int
TransformCall.match
(int c, int pos, CodeIterator iterator, int typedesc, ConstPool cp) protected int
TransformAfter.match2
(int pos, CodeIterator iterator) protected int
TransformBefore.match2
(int pos, CodeIterator iterator) private int
TransformAccessArrayField.replace
(ConstPool cp, CodeIterator iterator, int pos, int opcode, String signature) int
TransformAccessArrayField.transform
(CtClass tclazz, int pos, CodeIterator iterator, ConstPool cp) int
TransformCall.transform
(CtClass clazz, int pos, CodeIterator iterator, ConstPool cp) Modify INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC and INVOKEVIRTUAL so that a different method is invoked.abstract int
Transformer.transform
(CtClass clazz, int pos, CodeIterator it, ConstPool cp) int
TransformReadField.transform
(CtClass tclazz, int pos, CodeIterator iterator, ConstPool cp) int
TransformWriteField.transform
(CtClass tclazz, int pos, CodeIterator iterator, ConstPool cp) -
Uses of BadBytecode in javassist.expr
Methods in javassist.expr that throw BadBytecode -
Uses of BadBytecode in javassist.tools.reflect
Methods in javassist.tools.reflect that throw BadBytecode