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 StringCtNewWrappedMethod.addBodyMethod(CtClassType clazz, ClassFile classfile, CtMethod src) private voidCtBehavior.addParameter2(int where, CtClass type, String desc) private static voidCtClassType.insertAuxInitializer(CodeAttribute codeAttr, Bytecode initializer, int stacksize) private voidCtBehavior.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) voidCodeIterator.Switcher.adjustOffsets(int size, int nops) private intStackMapTable.Walker.appendFrame(int pos, int type) voidStackMapTable.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 voidCodeAnalyzer.checkTarget(int opIndex, int target, int codeLength, int[] stack, int stackDepth) voidStackMapTable.Walker.chopFrame(int pos, int offsetDelta, int k) Invoked if the visited frame is achop_frame.intCodeAnalyzer.computeMaxStack()intCodeAttribute.computeMaxStack()Computes the maximum stack size and setsmax_stackto the computed size.private static CodeAttribute.LdcEntryCodeAttribute.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) voidStackMapTable.Shifter.doit()byte[]StackMapTable.SimpleCopy.doit()private intStackMapTable.Walker.fullFrame(int pos) voidStackMapTable.Walker.fullFrame(int pos, int offsetDelta, int[] localTags, int[] localData, int[] stackTags, int[] stackData) Invoked if the visited frame isfull_frame.(package private) intintCodeIterator.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()).voidCodeIterator.insert(int pos, byte[] code) Inserts the given bytecode sequence before the instruction at the given indexpos.private intCodeIterator.insert0(int pos, byte[] code, boolean exclusive) intCodeIterator.insertAt(int pos, byte[] code) Inserts the given bytecode sequence before the instruction at the given indexpos.intCodeIterator.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()).voidCodeIterator.insertEx(int pos, byte[] code) Inserts the given bytecode sequence exclusively before the instruction at the given indexpos.intCodeIterator.insertExAt(int pos, byte[] code) Inserts the given bytecode sequence exclusively before the instruction at the given indexpos.intCodeIterator.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()).intCodeIterator.insertExGap(int pos, int length) Inserts an exclusive gap in front of the instruction at the given indexpos.intCodeIterator.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()).intCodeIterator.insertGap(int pos, int length) Inserts a gap in front of the instruction at the given indexpos.private static voidCodeIterator.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) voidStackMap.insertLocal(int index, int tag, int classInfo) Updates this stack map table when a new local variable is inserted for a new parameter.voidStackMapTable.insertLocal(int index, int tag, int classInfo) Updates this stack map table when a new local variable is inserted for a new parameter.voidCodeAttribute.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) intCodeIterator.next()Returns the index of the next instruction (not the operand following the current opcode).(package private) static intCodeIterator.nextOpcode(byte[] code, int index) Calculates the index of the next opcode.voidStackMapTable.Walker.parse()Visits each entry of the stack map frames.private static SignatureAttribute.ObjectTypeSignatureAttribute.parseArray(String sig, SignatureAttribute.Cursor c) private static SignatureAttribute.ClassTypeSignatureAttribute.parseClassType(String sig, SignatureAttribute.Cursor c) private static SignatureAttribute.ClassTypeSignatureAttribute.parseClassType2(String sig, SignatureAttribute.Cursor c, SignatureAttribute.ClassType parent) private static SignatureAttribute.MethodSignatureSignatureAttribute.parseMethodSig(String sig) private static SignatureAttribute.ObjectTypeSignatureAttribute.parseObjectType(String sig, SignatureAttribute.Cursor c, boolean dontThrow) private static SignatureAttribute.ClassSignatureprivate static SignatureAttribute.TypeSignatureAttribute.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 booleanCodeAnalyzer.processBranch(int opcode, CodeIterator ci, int index, int codeLength, int[] stack, int stackDepth, int[] jsrDepth) voidMethodInfo.rebuildStackMap(ClassPool pool) Rebuilds a stack map table.voidMethodInfo.rebuildStackMapForME(ClassPool pool) Rebuilds a stack map table for J2ME (CLDC).voidMethodInfo.rebuildStackMapIf6(ClassPool pool, ClassFile cf) Rebuilds a stack map table if the class file is for Java 6 or later.voidStackMapTable.Walker.sameFrame(int pos, int offsetDelta) Invoked if the visited frame is asame_frameor asame_frame_extended.private intStackMapTable.Walker.sameLocals(int pos, int type) voidStackMapTable.Walker.sameLocals(int pos, int offsetDelta, int stackTag, int stackData) Invoked if the visited frame is asame_locals_1_stack_item_frameor asame_locals_1_stack_item_frame_extended.voidMethodInfo.setSuperclass(String superclass) Changes a super constructor called by this constructor.(package private) voidCodeIterator.Pointers.shiftForSwitch(int where, int gapLength) (package private) voidStackMap.shiftForSwitch(int where, int gapSize) (package private) voidStackMapTable.shiftForSwitch(int where, int gapSize) private static voidCodeAttribute.shiftIndex(CodeIterator ci, int lessThan, int delta) private static voidCodeAttribute.shiftIndex0(CodeIterator ci, int index, int opcode, int lessThan, int delta, int opcode_i_0, int opcode_i) private static voidCodeAttribute.shiftIndex8(CodeIterator ci, int index, int opcode, int lessThan, int delta) (package private) voidCodeIterator.Pointers.shiftPc(int where, int gapLength, boolean exclusive) (package private) voidStackMap.shiftPc(int where, int gapSize, boolean exclusive) (package private) voidStackMapTable.shiftPc(int where, int gapSize, boolean exclusive) intCodeIterator.skipConstructor()Moves to the instruction for eithersuper()orthis().intCodeIterator.skipSuperConstructor()Moves to the instruction forsuper().private intCodeIterator.skipSuperConstructor0(int skipThis) intCodeIterator.skipThisConstructor()Moves to the instruction forthis().(package private) intStackMapTable.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.TypeSignatureAttribute.toTypeSignature(String sig) Parses the given signature string as a type signature.private voidCodeAnalyzer.visitBytecode(CodeIterator ci, int[] stack, int index) private intCodeAnalyzer.visitInst(int op, CodeIterator ci, int index, int stack) Visits an instruction.(package private) abstract intCodeIterator.Branch.write(int srcPos, byte[] code, int destPos, byte[] newcode) (package private) intCodeIterator.Switcher.write(int src, byte[] code, int dest, byte[] newcode) Constructors in javassist.bytecode that throw BadBytecodeModifierConstructorDescriptionprivateCodeAttribute(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_infostructure. -
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 voidAnalyzer.analyzeNextEntry(MethodInfo method, CodeIterator iter, IntQueue queue, Executor executor) private voidExecutor.evalArrayLoad(Type expectedComponent, Frame frame) private voidExecutor.evalArrayStore(Type expectedComponent, Frame frame) private voidExecutor.evalBinaryMath(Type expected, Frame frame) private voidExecutor.evalGetField(int opcode, int index, Frame frame) private voidExecutor.evalInvokeDynamic(int opcode, int index, Frame frame) private voidExecutor.evalInvokeIntfMethod(int opcode, int index, Frame frame) private voidExecutor.evalInvokeMethod(int opcode, int index, Frame frame) private voidprivate voidExecutor.evalLoad(Type expected, int index, Frame frame, Subroutine subroutine) private voidExecutor.evalNewArray(int pos, CodeIterator iter, Frame frame) private voidExecutor.evalNewObjectArray(int pos, CodeIterator iter, Frame frame) private voidExecutor.evalPutField(int opcode, int index, Frame frame) private voidprivate voidExecutor.evalStore(Type expected, int index, Frame frame, Subroutine subroutine) private voidExecutor.evalWide(int pos, CodeIterator iter, Frame frame, Subroutine subroutine) voidExecutor.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 intAnalyzer.getNext(CodeIterator iter, int of, int restore) private Typeprivate intAnalyzer.lookAhead(CodeIterator iter, int pos) private voidAnalyzer.mergeJsr(IntQueue queue, Frame frame, Subroutine sub, int pos, int next) private voidAnalyzer.mergeLookupSwitch(IntQueue queue, int pos, CodeIterator iter, Frame frame) private voidAnalyzer.mergeRet(IntQueue queue, CodeIterator iter, int pos, Frame frame, Subroutine subroutine) private voidAnalyzer.mergeTableSwitch(IntQueue queue, int pos, CodeIterator iter, Frame frame) private Type[]Executor.paramTypesFromDesc(String desc) private TypeExecutor.resolveClassInfo(String info) private TypeExecutor.returnTypeFromDesc(String desc) private voidSubroutineScanner.scan(int pos, CodeIterator iter, Subroutine sub) SubroutineScanner.scan(MethodInfo method) private voidSubroutineScanner.scanLookupSwitch(int pos, CodeIterator iter, Subroutine sub) private booleanSubroutineScanner.scanOp(int pos, CodeIterator iter, Subroutine sub) private voidSubroutineScanner.scanTableSwitch(int pos, CodeIterator iter, Subroutine sub) private TypeExecutor.typeFromDesc(String desc) private voidExecutor.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 voidprivate voidBasicBlock.Maker.addCatchers(BasicBlock[] blocks, ExceptionTable et) private voidTracer.checkParamTypes(String desc, int i) private static intprivate intTracer.doGetField(int pos, byte[] code, boolean notStatic) private intTracer.doInvokeDynamic(int pos, byte[] code) private intTracer.doInvokeIntfMethod(int pos, byte[] code) private intTracer.doInvokeMethod(int pos, byte[] code, boolean notStatic) protected intTracer.doOpcode(int pos, byte[] code) Does abstract interpretation on the given bytecode instruction.private intTracer.doOpcode0_53(int pos, byte[] code, int op) private intTracer.doOpcode148_201(int pos, byte[] code, int op) private intTracer.doOpcode54_95(int pos, byte[] code, int op) private intTracer.doPutField(int pos, byte[] code, boolean notStatic) private intTracer.doWIDE(int pos, byte[] code) static BasicBlockBasicBlock.find(BasicBlock[] blocks, int pos) private voidMapMaker.findDeadCatchers(byte[] code, TypedBlock[] blocks) private voidMapMaker.fixDeadcode(byte[] code, TypedBlock block) private voidMapMaker.fixTypes(byte[] code, TypedBlock[] blocks) (package private) voidTypedBlock.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 voidMapMaker.make(byte[] code, TypedBlock tb) (package private) voidMapMaker.make(TypedBlock[] blocks, byte[] code) Runs an analyzer (Phase 1 and 2).static StackMapTableMapMaker.make(ClassPool classes, MethodInfo minfo) Computes the stack map table of the given method and returns it.static TypeData(package private) static TypeDatastatic StackMapMapMaker.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 voidBasicBlock.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 TypeDataprivate voidMapMaker.mergeMap(TypedBlock dest, boolean mergeStack) private voidMapMaker.recordStackMap(TypedBlock target) private voidMapMaker.recordStackMap(TypedBlock target, int exceptionType) private voidMapMaker.recordStackMap0(TypedBlock target, int st, TypeData[] tStackTypes) private voidTracer.setFieldTarget(boolean notStatic, int index) voidTypedBlock.setStackMap(int st, TypeData[] stack, int nl, TypeData[] locals) voidvoidvoidvoidabstract voidprivate static voidSets the type name of this object type.voidvoidprivate voidMapMaker.traceException(byte[] code, BasicBlock.Catch handler) protected voidTracer.visitBranch(int pos, byte[] code, int offset) protected voidTracer.visitGoto(int pos, byte[] code, int offset) protected voidTracer.visitJSR(int pos, byte[] code) Invoked when the visited instruction is jsr.protected voidTracer.visitLookupSwitch(int pos, byte[] code, int n, int pairsPos, int defaultOffset) protected voidTracer.visitRET(int pos, byte[] code) Invoked when the visited instruction is ret or wide ret.protected voidTracer.visitReturn(int pos, byte[] code) protected voidTracer.visitTableSwitch(int pos, byte[] code, int n, int offsetPos, int defaultOffset) protected voidTracer.visitThrow(int pos, byte[] code) -
Uses of BadBytecode in javassist.convert
Methods in javassist.convert that throw BadBytecodeModifier and TypeMethodDescriptionprivate FrameTransformAccessArrayField.getFrame(int pos) private StringTransformAccessArrayField.getLoadReplacementSignature(int opcode) private StringTransformAccessArrayField.getStoreReplacementSignature(int opcode) private StringTransformAccessArrayField.getTopType(int pos) private voidTransformAccessArrayField.initFrames(CtClass clazz, MethodInfo minfo) protected intTransformBefore.match(int c, int pos, CodeIterator iterator, int typedesc, ConstPool cp) protected intTransformCall.match(int c, int pos, CodeIterator iterator, int typedesc, ConstPool cp) protected intTransformAfter.match2(int pos, CodeIterator iterator) protected intTransformBefore.match2(int pos, CodeIterator iterator) private intTransformAccessArrayField.replace(ConstPool cp, CodeIterator iterator, int pos, int opcode, String signature) intTransformAccessArrayField.transform(CtClass tclazz, int pos, CodeIterator iterator, ConstPool cp) intTransformCall.transform(CtClass clazz, int pos, CodeIterator iterator, ConstPool cp) Modify INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC and INVOKEVIRTUAL so that a different method is invoked.abstract intTransformer.transform(CtClass clazz, int pos, CodeIterator it, ConstPool cp) intTransformReadField.transform(CtClass tclazz, int pos, CodeIterator iterator, ConstPool cp) intTransformWriteField.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