Uses of Class
javassist.bytecode.BadBytecode
-
Packages that use BadBytecode Package Description javassist The Javassist Core API.javassist.bytecode Bytecode-level API.javassist.bytecode.analysis Bytecode Analysis API.javassist.bytecode.stackmap javassist.convert javassist.expr This package contains the classes for modifying a method body.javassist.tools.reflect Runtime Behavioral Reflection. -
-
Uses of BadBytecode in javassist
Methods in javassist that throw BadBytecode Modifier and Type Method Description private static java.lang.StringCtNewWrappedMethod. addBodyMethod(CtClassType clazz, ClassFile classfile, CtMethod src)private voidCtBehavior. addParameter2(int where, CtClass type, java.lang.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 BadBytecode Modifier and Type Method Description private static BadBytecodeSignatureAttribute. error(java.lang.String sig)Methods in javassist.bytecode that throw BadBytecode Modifier and Type Method Description (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, java.util.Map classnameMap)private byte[]CodeAttribute. copyCode(ConstPool destCp, java.util.Map 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) intSignatureAttribute.Cursor. indexOf(java.lang.String s, int ch)intCodeIterator. 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, java.util.ArrayList jumps, CodeIterator.Pointers ptrs)CodeIterator.GapCodeIterator. 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, java.util.ArrayList jumps, int where, int gapLength)private static java.util.ArrayListCodeIterator. 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(java.lang.String sig, SignatureAttribute.Cursor c)private static SignatureAttribute.ClassTypeSignatureAttribute. parseClassType(java.lang.String sig, SignatureAttribute.Cursor c)private static SignatureAttribute.ClassTypeSignatureAttribute. parseClassType2(java.lang.String sig, SignatureAttribute.Cursor c, SignatureAttribute.ClassType parent)private static SignatureAttribute.MethodSignatureSignatureAttribute. parseMethodSig(java.lang.String sig)private static SignatureAttribute.ObjectTypeSignatureAttribute. parseObjectType(java.lang.String sig, SignatureAttribute.Cursor c, boolean dontThrow)private static SignatureAttribute.ClassSignatureSignatureAttribute. parseSig(java.lang.String sig)private static SignatureAttribute.TypeSignatureAttribute. parseType(java.lang.String sig, SignatureAttribute.Cursor c)private static SignatureAttribute.TypeArgument[]SignatureAttribute. parseTypeArgs(java.lang.String sig, SignatureAttribute.Cursor c)private static SignatureAttribute.TypeParameter[]SignatureAttribute. parseTypeParams(java.lang.String sig, SignatureAttribute.Cursor cur)private booleanCodeAnalyzer. processBranch(int opcode, CodeIterator ci, int index, int codeLength, int[] stack, int stackDepth, int[] jsrDepth)private voidMethodInfo. read(MethodInfo src, java.lang.String methodname, java.util.Map classnames)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(java.lang.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.static SignatureAttribute.ClassSignatureSignatureAttribute. toClassSignature(java.lang.String sig)Parses the given signature string as a class signature.static SignatureAttribute.ObjectTypeSignatureAttribute. toFieldSignature(java.lang.String sig)Parses the given signature string as a field type signature.static SignatureAttribute.MethodSignatureSignatureAttribute. toMethodSignature(java.lang.String sig)Parses the given signature string as a method type signature.static SignatureAttribute.TypeSignatureAttribute. toTypeSignature(java.lang.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 BadBytecode Constructor Description CodeAttribute(ConstPool cp, CodeAttribute src, java.util.Map classnames)Constructs a copy ofCode_attribute.MethodInfo(ConstPool cp, java.lang.String methodname, MethodInfo src, java.util.Map classnameMap)Constructs a copy ofmethod_infostructure. -
Uses of BadBytecode in javassist.bytecode.analysis
Methods in javassist.bytecode.analysis that throw BadBytecode Modifier and Type Method Description Frame[]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[]Analyzer. analyze(CtMethod 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.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 voidExecutor. evalLDC(int index, Frame frame)private 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 voidExecutor. evalShift(Type expected, Frame frame)private 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.FrameControlFlow. 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 TypeExecutor. getType(java.lang.String name)private 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(java.lang.String desc)private TypeExecutor. resolveClassInfo(java.lang.String info)private TypeExecutor. returnTypeFromDesc(java.lang.String desc)private voidSubroutineScanner. scan(int pos, CodeIterator iter, Subroutine sub)Subroutine[]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(java.lang.String desc)private voidExecutor. verifyAssignable(Type expected, Type type)Constructors in javassist.bytecode.analysis that throw BadBytecode Constructor Description ControlFlow(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.stackmap Modifier and Type Class Description (package private) static classBasicBlock.JsrBytecodeMethods in javassist.bytecode.stackmap that throw BadBytecode Modifier and Type Method Description static voidTypeData. aastore(TypeData array, TypeData value, ClassPool cp)private voidBasicBlock.Maker. addCatchers(BasicBlock[] blocks, ExceptionTable et)private voidTracer. checkParamTypes(java.lang.String desc, int i)private static intTypedBlock. descToTag(java.lang.String desc, int i, int n, TypeData[] types)private 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, java.lang.String className, java.lang.String methodDesc, boolean isStatic, boolean isConstructor)Initializes the first block by the given method descriptor.BasicBlock[]BasicBlock.Maker. make(CodeIterator ci, int begin, int end, ExceptionTable et)BasicBlock[]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 TypeDataTypeData.ArrayElement. make(TypeData array)(package private) static TypeDataTypeData.ArrayType. make(TypeData element)static 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(java.util.HashMap marks, int pos, int target, int size)private java.util.HashMapBasicBlock.Maker. makeMarks(CodeIterator ci, int begin, int end, ExceptionTable et)private TypeDataMapMaker. merge(TypeData src, TypeData target)private 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)voidTypeData.ArrayElement. setType(java.lang.String s, ClassPool cp)voidTypeData.ArrayType. setType(java.lang.String s, ClassPool cp)voidTypeData.BasicType. setType(java.lang.String s, ClassPool cp)voidTypeData.ClassName. setType(java.lang.String typeName, ClassPool cp)abstract voidTypeData. setType(java.lang.String s, ClassPool cp)private static voidTypeData. setType(TypeData td, java.lang.String className, ClassPool cp)Sets the type name of this object type.voidTypeData.TypeVar. setType(java.lang.String typeName, ClassPool cp)voidTypeData.UninitTypeVar. setType(java.lang.String s, ClassPool cp)private 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 BadBytecode Modifier and Type Method Description private FrameTransformAccessArrayField. getFrame(int pos)private java.lang.StringTransformAccessArrayField. getLoadReplacementSignature(int opcode)private java.lang.StringTransformAccessArrayField. getStoreReplacementSignature(int opcode)private java.lang.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, java.lang.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 Modifier and Type Method Description protected voidExpr. replace0(int pos, Bytecode bytecode, int size)private voidNewArray. replace2(java.lang.String statement) -
Uses of BadBytecode in javassist.tools.reflect
Methods in javassist.tools.reflect that throw BadBytecode Modifier and Type Method Description voidReflection. rebuildClassFile(ClassFile cf)
-