net.sf.cglib.core
Class CodeEmitter
public
class
CodeEmitter
extends RemappingCodeVisitor
Author: Juozas Baliuka, Chris Nokleberg
Method Summary |
void | aaload(int index) |
void | aaload() |
void | aastore() |
void | aconst_null() |
void | arraylength() |
void | array_load(Type type) |
void | array_store(Type type) |
void | athrow() |
Block | begin_block() |
void | box(Type type)
If the argument is a primitive class, replaces the primitive value
on the top of the stack with the wrapped (Object) equivalent. |
void | cast_numeric(Type from, Type to)
Casts from one primitive numeric type to another |
void | catch_exception(Block block, Type exception) |
void | checkcast(Type type) |
void | checkcast_this() |
void | create_arg_array()
Allocates and fills an Object[] array with the arguments to the
current method. |
void | define_attribute(Attribute attrs) |
void | dup() |
void | dup2() |
void | dup2_x1() |
void | dup2_x2() |
void | dup_x1() |
void | dup_x2() |
void | end_method() |
ClassEmitter | getClassEmitter() |
void | getfield(String name) |
void | getfield(Type owner, String name, Type type) |
MethodInfo | getMethodInfo() |
Type | getReturnType() |
void | getstatic(Type owner, String name, Type type) |
Signature | getSignature() |
void | goTo(Label label) |
void | ifnonnull(Label label) |
void | ifnull(Label label) |
void | if_cmp(Type type, int mode, Label label) |
void | if_icmp(int mode, Label label) |
void | if_jump(int mode, Label label) |
void | iinc(Local local, int amount) |
void | instance_of(Type type) |
void | instance_of_this() |
void | invoke(MethodInfo method) |
void | invoke_constructor(Type type) |
void | invoke_constructor(Type type, Signature sig) |
void | invoke_constructor_this() |
void | invoke_constructor_this(Signature sig) |
void | invoke_interface(Type owner, Signature sig) |
void | invoke_static(Type owner, Signature sig) |
void | invoke_static_this(Signature sig) |
void | invoke_virtual(Type owner, Signature sig) |
void | invoke_virtual_this(Signature sig) |
boolean | isStaticHook() |
void | load_arg(int index)
Pushes the specified argument of the current method onto the stack. |
void | load_args()
Pushes all of the arguments of the current method onto the stack. |
void | load_args(int fromArg, int count) |
void | load_local(Local local) |
void | load_this() |
Label | make_label() |
Local | make_local() |
Local | make_local(Type type) |
void | mark(Label label) |
void | math(int op, Type type) |
void | monitorenter() |
void | monitorexit() |
void | newarray() |
void | newarray(Type type) |
void | new_instance(Type type) |
void | new_instance_this() |
void | not()
Toggles the integer on the top of the stack from 1 to 0 or vice versa |
void | pop() |
void | pop2() |
void | process_switch(int[] keys, ProcessSwitchCallback callback) |
void | process_switch(int[] keys, ProcessSwitchCallback callback, boolean useTable) |
void | push(int i) |
void | push(long value) |
void | push(float value) |
void | push(double value) |
void | push(String value) |
void | push(boolean value) |
void | putfield(String name) |
void | putfield(Type owner, String name, Type type) |
void | putstatic(Type owner, String name, Type type) |
void | return_value() |
void | store_local(Local local) |
void | super_getfield(String name, Type type) |
void | super_getstatic(String name, Type type) |
void | super_invoke() |
void | super_invoke(Signature sig) |
void | super_invoke_constructor() |
void | super_invoke_constructor(Signature sig) |
void | super_putfield(String name, Type type) |
void | super_putstatic(String name, Type type) |
void | swap() |
void | swap(Type prev, Type type) |
void | throw_exception(Type type, String msg) |
void | unbox(Type type)
If the argument is a primitive class, replaces the object
on the top of the stack with the unwrapped (primitive)
equivalent. |
void | unbox_or_zero(Type type)
Unboxes the object on the top of the stack. |
void | visitMaxs(int maxStack, int maxLocals) |
void | zero_or_null(Type type)
Pushes a zero onto the stack if the argument is a primitive class, or a null otherwise. |
public static final int ADD
public static final int AND
public static final int DIV
public static final int EQ
public static final int GE
public static final int GT
public static final int LE
public static final int LT
public static final int MUL
public static final int NE
public static final int NEG
public static final int OR
public static final int REM
public static final int SUB
public static final int USHR
public static final int XOR
public void aaload(int index)
public void aaload()
public void aastore()
public void aconst_null()
public void arraylength()
public void array_load(Type type)
public void array_store(Type type)
public void athrow()
public
Block begin_block()
public void box(Type type)
If the argument is a primitive class, replaces the primitive value
on the top of the stack with the wrapped (Object) equivalent. For
example, char -> Character.
If the class is Void, a null is pushed onto the stack instead.
Parameters: type the class indicating the current type of the top stack value
public void cast_numeric(Type from, Type to)
Casts from one primitive numeric type to another
public void catch_exception(
Block block, Type exception)
public void checkcast(Type type)
public void checkcast_this()
public void create_arg_array()
Allocates and fills an Object[] array with the arguments to the
current method. Primitive values are inserted as their boxed
(Object) equivalents.
public void define_attribute(Attribute attrs)
public void dup()
public void dup2()
public void dup2_x1()
public void dup2_x2()
public void dup_x1()
public void dup_x2()
public void end_method()
public void getfield(String name)
public void getfield(Type owner, String name, Type type)
public Type getReturnType()
public void getstatic(Type owner, String name, Type type)
public void goTo(Label label)
public void ifnonnull(Label label)
public void ifnull(Label label)
public void if_cmp(Type type, int mode, Label label)
public void if_icmp(int mode, Label label)
public void if_jump(int mode, Label label)
public void iinc(
Local local, int amount)
public void instance_of(Type type)
public void instance_of_this()
public void invoke_constructor(Type type)
public void invoke_constructor(Type type,
Signature sig)
public void invoke_constructor_this()
public void invoke_constructor_this(
Signature sig)
public void invoke_interface(Type owner,
Signature sig)
public void invoke_static(Type owner,
Signature sig)
public void invoke_static_this(
Signature sig)
public void invoke_virtual(Type owner,
Signature sig)
public void invoke_virtual_this(
Signature sig)
public boolean isStaticHook()
public void load_arg(int index)
Pushes the specified argument of the current method onto the stack.
Parameters: index the zero-based index into the argument list
public void load_args()
Pushes all of the arguments of the current method onto the stack.
public void load_args(int fromArg, int count)
public void load_local(
Local local)
public void load_this()
public Label make_label()
public
Local make_local()
public
Local make_local(Type type)
public void mark(Label label)
public void math(int op, Type type)
public void monitorenter()
public void monitorexit()
public void newarray()
public void newarray(Type type)
public void new_instance(Type type)
public void new_instance_this()
public void not()
Toggles the integer on the top of the stack from 1 to 0 or vice versa
public void pop()
public void pop2()
public void push(int i)
public void push(long value)
public void push(float value)
public void push(double value)
public void push(String value)
public void push(boolean value)
public void putfield(String name)
public void putfield(Type owner, String name, Type type)
public void putstatic(Type owner, String name, Type type)
public void return_value()
public void store_local(
Local local)
public void super_getfield(String name, Type type)
public void super_getstatic(String name, Type type)
public void super_invoke()
public void super_invoke_constructor()
public void super_invoke_constructor(
Signature sig)
public void super_putfield(String name, Type type)
public void super_putstatic(String name, Type type)
public void swap()
public void swap(Type prev, Type type)
public void throw_exception(Type type, String msg)
public void unbox(Type type)
If the argument is a primitive class, replaces the object
on the top of the stack with the unwrapped (primitive)
equivalent. For example, Character -> char.
Parameters: type the class indicating the desired type of the top stack value
Returns: true if the value was unboxed
public void unbox_or_zero(Type type)
Unboxes the object on the top of the stack. If the object is null, the
unboxed primitive value becomes zero.
public void visitMaxs(int maxStack, int maxLocals)
public void zero_or_null(Type type)
Pushes a zero onto the stack if the argument is a primitive class, or a null otherwise.
Copyright (c) 2001 - Apache Software Foundation