1 52 53 package com.go.trove.classfile; 54 55 63 public interface CodeAssembler { 64 72 public LocalVariable[] getParameters(); 73 74 83 public LocalVariable createLocalVariable(String name, 84 TypeDescriptor type); 85 86 99 public Label createLabel(); 100 101 112 public void exceptionHandler(Location startLocation, 113 Location endLocation, 114 String catchClassName); 115 116 121 public void mapLineNumber(int lineNumber); 122 123 125 132 public void loadConstant(String value); 133 134 137 public void loadConstant(boolean value); 138 139 143 public void loadConstant(int value); 144 145 148 public void loadConstant(long value); 149 150 153 public void loadConstant(float value); 154 155 158 public void loadConstant(double value); 159 160 162 169 public void loadLocal(LocalVariable local); 170 171 176 public void loadThis(); 177 178 180 187 public void storeLocal(LocalVariable local); 188 189 191 203 public void loadFromArray(Class type); 204 205 207 219 public void storeToArray(Class type); 220 221 223 229 public void loadField(String fieldName, 230 TypeDescriptor type); 231 232 238 public void loadField(String className, 239 String fieldName, 240 TypeDescriptor type); 241 242 247 public void loadStaticField(String fieldName, 248 TypeDescriptor type); 249 250 255 public void loadStaticField(String className, 256 String fieldName, 257 TypeDescriptor type); 258 259 261 267 public void storeField(String fieldName, 268 TypeDescriptor type); 269 270 276 public void storeField(String className, 277 String fieldName, 278 TypeDescriptor type); 279 280 285 public void storeStaticField(String fieldName, 286 TypeDescriptor type); 287 288 293 public void storeStaticField(String className, 294 String fieldName, 295 TypeDescriptor type); 296 297 299 302 public void returnVoid(); 303 304 312 public void returnValue(Class type); 313 314 316 320 public void convert(Class fromType, Class toType); 321 322 324 331 public void invokeVirtual(String methodName, 332 TypeDescriptor ret, 333 TypeDescriptor[] params); 334 335 342 public void invokeVirtual(String className, 343 String methodName, 344 TypeDescriptor ret, 345 TypeDescriptor[] params); 346 347 354 public void invokeStatic(String methodName, 355 TypeDescriptor ret, 356 TypeDescriptor[] params); 357 358 365 public void invokeStatic(String className, 366 String methodName, 367 TypeDescriptor ret, 368 TypeDescriptor[] params); 369 370 377 public void invokeInterface(String className, 378 String methodName, 379 TypeDescriptor ret, 380 TypeDescriptor[] params); 381 382 389 public void invokePrivate(String methodName, 390 TypeDescriptor ret, 391 TypeDescriptor[] params); 392 393 400 public void invokeSuper(String superClassName, 401 String methodName, 402 TypeDescriptor ret, 403 TypeDescriptor[] params); 404 405 411 public void invokeConstructor(TypeDescriptor[] params); 412 413 419 public void invokeConstructor(String className, TypeDescriptor[] params); 420 421 427 public void invokeSuperConstructor(TypeDescriptor[] params); 428 429 431 439 public void newObject(TypeDescriptor type); 440 441 443 446 public void dup(); 447 448 451 public void dupX1(); 452 453 456 public void dupX2(); 457 458 461 public void dup2(); 462 463 466 public void dup2X1(); 467 468 471 public void dup2X2(); 472 473 476 public void pop(); 477 478 481 public void pop2(); 482 483 486 public void swap(); 487 488 491 public void swap2(); 492 493 495 501 public void branch(Location location); 502 503 511 public void ifNullBranch(Location location, boolean choice); 512 513 521 public void ifEqualBranch(Location location, boolean choice); 522 523 532 public void ifZeroComparisonBranch(Location location, String choice) 533 throws IllegalArgumentException ; 534 535 544 public void ifComparisonBranch(Location location, String choice) 545 throws IllegalArgumentException ; 546 547 563 public void switchBranch(int[] cases, 564 Location[] locations, Location defaultLocation); 565 566 573 public void jsr(Location location); 574 575 581 public void ret(LocalVariable local); 582 583 585 611 public void math(byte opcode); 612 613 615 619 public void arrayLength(); 620 621 625 public void throwObject(); 626 627 631 public void checkCast(TypeDescriptor type); 632 633 637 public void instanceOf(TypeDescriptor type); 638 639 643 public void integerIncrement(LocalVariable local, int amount); 644 645 648 public void monitorEnter(); 649 650 653 public void monitorExit(); 654 655 658 public void nop(); 659 660 663 public void breakpoint(); 664 } 665 | Popular Tags |