1 /*
2 * The Apache Software License, Version 1.1
3 *
4 * Copyright (c) 2003 The Apache Software Foundation. All rights
5 * reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 *
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
17 * distribution.
18 *
19 * 3. The end-user documentation included with the redistribution,
20 * if any, must include the following acknowledgment:
21 * "This product includes software developed by the
22 * Apache Software Foundation (http://www.apache.org/)."
23 * Alternately, this acknowledgment may appear in the software itself,
24 * if and wherever such third-party acknowledgments normally appear.
25 *
26 * 4. The names "Apache" and "Apache Software Foundation" must
27 * not be used to endorse or promote products derived from this
28 * software without prior written permission. For written
29 * permission, please contact apache@apache.org.
30 *
31 * 5. Products derived from this software may not be called "Apache",
32 * nor may "Apache" appear in their name, without prior written
33 * permission of the Apache Software Foundation.
34 *
35 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
36 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
37 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38 * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
39 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
42 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
44 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
45 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
46 * SUCH DAMAGE.
47 * ====================================================================
48 *
49 * This software consists of voluntary contributions made by many
50 * individuals on behalf of the Apache Software Foundation. For more
51 * information on the Apache Software Foundation, please see
52 * <http://www.apache.org/>.
53 */
54 package net.sf.cglib;
55
56 abstract class CodeGeneratorBackend {
57 protected String className;
58 protected Class superclass;
59 protected boolean debug;
60
61 protected CodeGeneratorBackend(String className, Class superclass) {
62 this.className = className;
63 this.superclass = superclass;
64 }
65
66 abstract public void setInterface(boolean flag);
67
68 public void setDebug(boolean debug) {
69 this.debug = debug;
70 }
71
72 abstract public byte[] getBytes();
73 abstract public void ifeq(Object label);
74 abstract public void ifne(Object label);
75 abstract public void iflt(Object label);
76 abstract public void ifge(Object label);
77 abstract public void ifgt(Object label);
78 abstract public void ifle(Object label);
79 abstract public void goTo(Object label);
80 abstract public void ifnull(Object label);
81 abstract public void ifnonnull(Object label);
82 abstract public void if_icmplt(Object label);
83 abstract public void if_icmpne(Object label);
84 abstract public void if_icmpeq(Object label);
85 abstract public void nop(Object label);
86 abstract public void imul();
87 abstract public void iadd();
88 abstract public void lushr();
89 abstract public void lxor();
90 abstract public void ixor();
91 abstract public void l2i();
92 abstract public void dcmpg();
93 abstract public void fcmpg();
94 abstract public void lcmp();
95 abstract public void aconst_null();
96 abstract public void arraylength();
97 abstract public void newarray(Class clazz);
98 abstract public void anewarray(Class clazz);
99 abstract public void new_instance(String className);
100 abstract public void checkcast(String className);
101 abstract public void instance_of(String className);
102 abstract public void athrow();
103 abstract public void pop();
104 abstract public void pop2();
105 abstract public void dup();
106 abstract public void dup2();
107 abstract public void dup_x1();
108 abstract public void dup_x2();
109 abstract public void swap();
110 abstract public void invoke_interface(String className, String methodName, Class returnType, Class[] parameterTypes);
111 abstract public void invoke_virtual(String className, String methodName, Class returnType, Class[] parameterTypes);
112 abstract public void invoke_static(String className, String methodName, Class returnType, Class[] parameterTypes);
113 abstract public void invoke_special(String className, String methodName, Class returnType, Class[] parameterTypes);
114 abstract public void declare_field(int modifiers, Class type, String name);
115 abstract public void getfield(String className, String fieldName, Class type);
116 abstract public void putfield(String className, String fieldName, Class type);
117 abstract public void getstatic(String className, String fieldName, Class type);
118 abstract public void putstatic(String className, String fieldName, Class type);
119 abstract public void begin_static();
120 abstract public void begin_constructor(Class[] parameterTypes);
121 abstract public void declare_interface(Class iface);
122 abstract public void begin_method(int modifiers, Class returnType, String name,
123 Class[] parameterTypes, Class[] exceptionTypes);
124 abstract public Object start_range();
125 abstract public Object end_range();
126 abstract public void handle_exception(Object start, Object end, Class exceptionType);
127 abstract public void end_method();
128 abstract public void ldc(String value);
129 abstract public void ldc(double value);
130 abstract public void ldc(long value);
131 abstract public void ldc(int value);
132 abstract public void ldc(float value);
133 abstract public void laload();
134 abstract public void daload();
135 abstract public void faload();
136 abstract public void saload();
137 abstract public void caload();
138 abstract public void iaload();
139 abstract public void baload();
140 abstract public void aaload();
141 abstract public void lastore();
142 abstract public void dastore();
143 abstract public void fastore();
144 abstract public void sastore();
145 abstract public void castore();
146 abstract public void iastore();
147 abstract public void bastore();
148 abstract public void aastore();
149 abstract public void iconst(int value);
150 abstract public void bipush(byte value);
151 abstract public void sipush(short value);
152 abstract public void lconst(long value);
153 abstract public void fconst(float value);
154 abstract public void dconst(double value);
155 abstract public void lload(int index);
156 abstract public void dload(int index);
157 abstract public void fload(int index);
158 abstract public void iload(int index);
159 abstract public void aload(int index);
160 abstract public void lstore(int index);
161 abstract public void dstore(int index);
162 abstract public void fstore(int index);
163 abstract public void istore(int index);
164 abstract public void astore(int index);
165 abstract public void returnVoid();
166 abstract public void lreturn();
167 abstract public void dreturn();
168 abstract public void freturn();
169 abstract public void ireturn();
170 abstract public void areturn();
171 abstract public void iinc(int index, int amount);
172 }
This page was automatically generated by Maven