org.objectweb.asm.commons

Class InstructionAdapter

public class InstructionAdapter extends MethodAdapter

ASM: a very small and fast Java bytecode manipulation framework Copyright (c) 2000-2005 INRIA, France Telecom All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Field Summary
static TypeOBJECT_TYPE
Constructor Summary
InstructionAdapter(MethodVisitor mv)
Method Summary
voidaconst(Object cst)
voidadd(Type type)
voidaload(Type type)
voidand(Type type)
voidanew(Type type)
voidareturn(Type t)
voidarraylength()
voidastore(Type type)
voidathrow()
voidcast(Type from, Type to)
voidcheckcast(Type type)
voidcmpg(Type type)
voidcmpl(Type type)
voiddconst(double cst)
voiddiv(Type type)
voiddup()
voiddup2()
voiddup2X1()
voiddup2X2()
voiddupX1()
voiddupX2()
voidfconst(float cst)
voidgetfield(String owner, String name, String desc)
voidgetstatic(String owner, String name, String desc)
voidgoTo(Label label)
voidiconst(int cst)
voidifacmpeq(Label label)
voidifacmpne(Label label)
voidifeq(Label label)
voidifge(Label label)
voidifgt(Label label)
voidificmpeq(Label label)
voidificmpge(Label label)
voidificmpgt(Label label)
voidificmple(Label label)
voidificmplt(Label label)
voidificmpne(Label label)
voidifle(Label label)
voidiflt(Label label)
voidifne(Label label)
voidifnonnull(Label label)
voidifnull(Label label)
voidiinc(int var, int increment)
voidinstanceOf(Type type)
voidinvokeinterface(String owner, String name, String desc)
voidinvokespecial(String owner, String name, String desc)
voidinvokestatic(String owner, String name, String desc)
voidinvokevirtual(String owner, String name, String desc)
voidjsr(Label label)
voidlcmp()
voidlconst(long cst)
voidload(int var, Type type)
voidlookupswitch(Label dflt, int[] keys, Label[] labels)
voidmark(Label label)
voidmonitorenter()
voidmonitorexit()
voidmul(Type type)
voidmultianewarray(String desc, int dims)
voidneg(Type type)
voidnewarray(Type type)
voidnop()
voidor(Type type)
voidpop()
voidpop2()
voidputfield(String owner, String name, String desc)
voidputstatic(String owner, String name, String desc)
voidrem(Type type)
voidret(int var)
voidshl(Type type)
voidshr(Type type)
voidstore(int var, Type type)
voidsub(Type type)
voidswap()
voidtableswitch(int min, int max, Label dflt, Label[] labels)
voidtconst(Type type)
voidushr(Type type)
voidvisitFieldInsn(int opcode, String owner, String name, String desc)
voidvisitIincInsn(int var, int increment)
voidvisitInsn(int opcode)
voidvisitIntInsn(int opcode, int operand)
voidvisitJumpInsn(int opcode, Label label)
voidvisitLabel(Label label)
voidvisitLdcInsn(Object cst)
voidvisitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels)
voidvisitMethodInsn(int opcode, String owner, String name, String desc)
voidvisitMultiANewArrayInsn(String desc, int dims)
voidvisitTableSwitchInsn(int min, int max, Label dflt, Label[] labels)
voidvisitTypeInsn(int opcode, String type)
voidvisitVarInsn(int opcode, int var)
voidxor(Type type)

Field Detail

OBJECT_TYPE

public static final Type OBJECT_TYPE

Constructor Detail

InstructionAdapter

public InstructionAdapter(MethodVisitor mv)

Method Detail

aconst

public void aconst(Object cst)

add

public void add(Type type)

aload

public void aload(Type type)

and

public void and(Type type)

anew

public void anew(Type type)

areturn

public void areturn(Type t)

arraylength

public void arraylength()

astore

public void astore(Type type)

athrow

public void athrow()

cast

public void cast(Type from, Type to)

checkcast

public void checkcast(Type type)

cmpg

public void cmpg(Type type)

cmpl

public void cmpl(Type type)

dconst

public void dconst(double cst)

div

public void div(Type type)

dup

public void dup()

dup2

public void dup2()

dup2X1

public void dup2X1()

dup2X2

public void dup2X2()

dupX1

public void dupX1()

dupX2

public void dupX2()

fconst

public void fconst(float cst)

getfield

public void getfield(String owner, String name, String desc)

getstatic

public void getstatic(String owner, String name, String desc)

goTo

public void goTo(Label label)

iconst

public void iconst(int cst)

ifacmpeq

public void ifacmpeq(Label label)

ifacmpne

public void ifacmpne(Label label)

ifeq

public void ifeq(Label label)

ifge

public void ifge(Label label)

ifgt

public void ifgt(Label label)

ificmpeq

public void ificmpeq(Label label)

ificmpge

public void ificmpge(Label label)

ificmpgt

public void ificmpgt(Label label)

ificmple

public void ificmple(Label label)

ificmplt

public void ificmplt(Label label)

ificmpne

public void ificmpne(Label label)

ifle

public void ifle(Label label)

iflt

public void iflt(Label label)

ifne

public void ifne(Label label)

ifnonnull

public void ifnonnull(Label label)

ifnull

public void ifnull(Label label)

iinc

public void iinc(int var, int increment)

instanceOf

public void instanceOf(Type type)

invokeinterface

public void invokeinterface(String owner, String name, String desc)

invokespecial

public void invokespecial(String owner, String name, String desc)

invokestatic

public void invokestatic(String owner, String name, String desc)

invokevirtual

public void invokevirtual(String owner, String name, String desc)

jsr

public void jsr(Label label)

lcmp

public void lcmp()

lconst

public void lconst(long cst)

load

public void load(int var, Type type)

lookupswitch

public void lookupswitch(Label dflt, int[] keys, Label[] labels)

mark

public void mark(Label label)

monitorenter

public void monitorenter()

monitorexit

public void monitorexit()

mul

public void mul(Type type)

multianewarray

public void multianewarray(String desc, int dims)

neg

public void neg(Type type)

newarray

public void newarray(Type type)

nop

public void nop()

or

public void or(Type type)

pop

public void pop()

pop2

public void pop2()

putfield

public void putfield(String owner, String name, String desc)

putstatic

public void putstatic(String owner, String name, String desc)

rem

public void rem(Type type)

ret

public void ret(int var)

shl

public void shl(Type type)

shr

public void shr(Type type)

store

public void store(int var, Type type)

sub

public void sub(Type type)

swap

public void swap()

tableswitch

public void tableswitch(int min, int max, Label dflt, Label[] labels)

tconst

public void tconst(Type type)

ushr

public void ushr(Type type)

visitFieldInsn

public void visitFieldInsn(int opcode, String owner, String name, String desc)

visitIincInsn

public void visitIincInsn(int var, int increment)

visitInsn

public void visitInsn(int opcode)

visitIntInsn

public void visitIntInsn(int opcode, int operand)

visitJumpInsn

public void visitJumpInsn(int opcode, Label label)

visitLabel

public void visitLabel(Label label)

visitLdcInsn

public void visitLdcInsn(Object cst)

visitLookupSwitchInsn

public void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels)

visitMethodInsn

public void visitMethodInsn(int opcode, String owner, String name, String desc)

visitMultiANewArrayInsn

public void visitMultiANewArrayInsn(String desc, int dims)

visitTableSwitchInsn

public void visitTableSwitchInsn(int min, int max, Label dflt, Label[] labels)

visitTypeInsn

public void visitTypeInsn(int opcode, String type)

visitVarInsn

public void visitVarInsn(int opcode, int var)

xor

public void xor(Type type)