1 52 53 package com.go.trove.classfile; 54 55 61 public class FilteredCodeAssembler implements CodeAssembler { 62 protected final CodeAssembler mAssembler; 63 64 public FilteredCodeAssembler(CodeAssembler assembler) { 65 mAssembler = assembler; 66 } 67 68 public LocalVariable[] getParameters() { 69 return mAssembler.getParameters(); 70 } 71 72 public LocalVariable createLocalVariable(String name, 73 TypeDescriptor type) { 74 return mAssembler.createLocalVariable(name, type); 75 } 76 77 public Label createLabel() { 78 return mAssembler.createLabel(); 79 } 80 81 public void exceptionHandler(Location startLocation, 82 Location endLocation, 83 String catchClassName) { 84 mAssembler.exceptionHandler 85 (startLocation, endLocation, catchClassName); 86 } 87 88 public void mapLineNumber(int lineNumber) { 89 mAssembler.mapLineNumber(lineNumber); 90 } 91 92 public void loadConstant(String value) { 93 mAssembler.loadConstant(value); 94 } 95 96 public void loadConstant(boolean value) { 97 mAssembler.loadConstant(value); 98 } 99 100 public void loadConstant(int value) { 101 mAssembler.loadConstant(value); 102 } 103 104 public void loadConstant(long value) { 105 mAssembler.loadConstant(value); 106 } 107 108 public void loadConstant(float value) { 109 mAssembler.loadConstant(value); 110 } 111 112 public void loadConstant(double value) { 113 mAssembler.loadConstant(value); 114 } 115 116 public void loadLocal(LocalVariable local) { 117 mAssembler.loadLocal(local); 118 } 119 120 public void loadThis() { 121 mAssembler.loadThis(); 122 } 123 124 public void storeLocal(LocalVariable local) { 125 mAssembler.storeLocal(local); 126 } 127 128 public void loadFromArray(Class type) { 129 mAssembler.loadFromArray(type); 130 } 131 132 public void storeToArray(Class type) { 133 mAssembler.storeToArray(type); 134 } 135 136 public void loadField(String fieldName, 137 TypeDescriptor type) { 138 mAssembler.loadField(fieldName, type); 139 } 140 141 public void loadField(String className, 142 String fieldName, 143 TypeDescriptor type) { 144 mAssembler.loadField(className, fieldName, type); 145 } 146 147 public void loadStaticField(String fieldName, 148 TypeDescriptor type) { 149 mAssembler.loadStaticField(fieldName, type); 150 } 151 152 public void loadStaticField(String className, 153 String fieldName, 154 TypeDescriptor type) { 155 mAssembler.loadStaticField(className, fieldName, type); 156 } 157 158 public void storeField(String fieldName, 159 TypeDescriptor type) { 160 mAssembler.storeField(fieldName, type); 161 } 162 163 public void storeField(String className, 164 String fieldName, 165 TypeDescriptor type) { 166 mAssembler.storeField(className, fieldName, type); 167 } 168 169 public void storeStaticField(String fieldName, 170 TypeDescriptor type) { 171 mAssembler.storeStaticField(fieldName, type); 172 } 173 174 public void storeStaticField(String className, 175 String fieldName, 176 TypeDescriptor type) { 177 mAssembler.storeStaticField(className, fieldName, type); 178 } 179 180 public void returnVoid() { 181 mAssembler.returnVoid(); 182 } 183 184 public void returnValue(Class type) { 185 mAssembler.returnValue(type); 186 } 187 188 public void convert(Class fromType, Class toType) { 189 mAssembler.convert(fromType, toType); 190 } 191 192 public void invokeVirtual(String methodName, 193 TypeDescriptor ret, 194 TypeDescriptor[] params) { 195 mAssembler.invokeVirtual(methodName, ret, params); 196 } 197 198 public void invokeVirtual(String className, 199 String methodName, 200 TypeDescriptor ret, 201 TypeDescriptor[] params) { 202 mAssembler.invokeVirtual(className, methodName, ret, params); 203 } 204 205 public void invokeStatic(String methodName, 206 TypeDescriptor ret, 207 TypeDescriptor[] params) { 208 mAssembler.invokeStatic(methodName, ret, params); 209 } 210 211 public void invokeStatic(String className, 212 String methodName, 213 TypeDescriptor ret, 214 TypeDescriptor[] params) { 215 mAssembler.invokeStatic(className, methodName, ret, params); 216 } 217 218 public void invokeInterface(String className, 219 String methodName, 220 TypeDescriptor ret, 221 TypeDescriptor[] params) { 222 mAssembler.invokeInterface(className, methodName, ret, params); 223 } 224 225 public void invokePrivate(String methodName, 226 TypeDescriptor ret, 227 TypeDescriptor[] params) { 228 mAssembler.invokePrivate(methodName, ret, params); 229 } 230 231 public void invokeSuper(String superClassName, 232 String methodName, 233 TypeDescriptor ret, 234 TypeDescriptor[] params) { 235 mAssembler.invokeSuper(superClassName, methodName, ret, params); 236 } 237 238 public void invokeConstructor(TypeDescriptor[] params) { 239 mAssembler.invokeConstructor(params); 240 } 241 242 public void invokeConstructor(String className, TypeDescriptor[] params) { 243 mAssembler.invokeConstructor(className, params); 244 } 245 246 public void invokeSuperConstructor(TypeDescriptor[] params) { 247 mAssembler.invokeSuperConstructor(params); 248 } 249 250 public void newObject(TypeDescriptor type) { 251 mAssembler.newObject(type); 252 } 253 254 public void dup() { 255 mAssembler.dup(); 256 } 257 258 public void dupX1() { 259 mAssembler.dupX1(); 260 } 261 262 public void dupX2() { 263 mAssembler.dupX2(); 264 } 265 266 public void dup2() { 267 mAssembler.dup2(); 268 } 269 270 public void dup2X1() { 271 mAssembler.dup2X1(); 272 } 273 274 public void dup2X2() { 275 mAssembler.dup2X2(); 276 } 277 278 public void pop() { 279 mAssembler.pop(); 280 } 281 282 public void pop2() { 283 mAssembler.pop2(); 284 } 285 286 public void swap() { 287 mAssembler.swap(); 288 } 289 290 public void swap2() { 291 mAssembler.swap2(); 292 } 293 294 public void branch(Location location) { 295 mAssembler.branch(location); 296 } 297 298 public void ifNullBranch(Location location, boolean choice) { 299 mAssembler.ifNullBranch(location, choice); 300 } 301 302 public void ifEqualBranch(Location location, boolean choice) { 303 mAssembler.ifEqualBranch(location, choice); 304 } 305 306 public void ifZeroComparisonBranch(Location location, String choice) 307 throws IllegalArgumentException { 308 mAssembler.ifZeroComparisonBranch(location, choice); 309 } 310 311 public void ifComparisonBranch(Location location, String choice) 312 throws IllegalArgumentException { 313 mAssembler.ifComparisonBranch(location, choice); 314 } 315 316 public void switchBranch(int[] cases, 317 Location[] locations, Location defaultLocation) { 318 mAssembler.switchBranch(cases, locations, defaultLocation); 319 } 320 321 public void jsr(Location location) { 322 mAssembler.jsr(location); 323 } 324 325 public void ret(LocalVariable local) { 326 mAssembler.ret(local); 327 } 328 329 public void math(byte opcode) { 330 mAssembler.math(opcode); 331 } 332 333 public void arrayLength() { 334 mAssembler.arrayLength(); 335 } 336 337 public void throwObject() { 338 mAssembler.throwObject(); 339 } 340 341 public void checkCast(TypeDescriptor type) { 342 mAssembler.checkCast(type); 343 } 344 345 public void instanceOf(TypeDescriptor type) { 346 mAssembler.instanceOf(type); 347 } 348 349 public void integerIncrement(LocalVariable local, int amount) { 350 mAssembler.integerIncrement(local, amount); 351 } 352 353 public void monitorEnter() { 354 mAssembler.monitorEnter(); 355 } 356 357 public void monitorExit() { 358 mAssembler.monitorExit(); 359 } 360 361 public void nop() { 362 mAssembler.nop(); 363 } 364 365 public void breakpoint() { 366 mAssembler.breakpoint(); 367 } 368 } 369 | Popular Tags |