Java Doc for AdviceAdapter.java in  » Rule-Engine » drolls-Rule-Engine » org » drools » asm » commons » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Rule Engine » drolls Rule Engine » org.drools.asm.commons 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.drools.asm.commons.LocalVariablesSorter
   org.drools.asm.commons.GeneratorAdapter
      org.drools.asm.commons.AdviceAdapter

AdviceAdapter
abstract public class AdviceAdapter extends GeneratorAdapter implements Opcodes(Code)
A MethodAdapter to dispatch method body instruction

The behavior is like this:

  1. as long as the INVOKESPECIAL for the object initialization has not been reached, every bytecode instruction is dispatched in the ctor code visitor
  2. when this one is reached, it is only added in the ctor code visitor and a JP invoke is added
  3. after that, only the other code visitor receives the instructions

author:
   Eugene Kuleshov
author:
   Eric Bruneton


Field Summary
protected  intmethodAccess
    
protected  StringmethodDesc
    

Constructor Summary
public  AdviceAdapter(MethodVisitor mv, int access, String name, String desc)
     Creates a new AdviceAdapter .

Method Summary
abstract protected  voidonMethodEnter()
     Called at the beginning of the method or after super class class call in the constructor.
abstract protected  voidonMethodExit(int opcode)
     Called before explicit exit from the method using either return or throw.
public  voidvisitFieldInsn(int opcode, String owner, String name, String desc)
    
public  voidvisitInsn(int opcode)
    
public  voidvisitIntInsn(int opcode, int operand)
    
public  voidvisitJumpInsn(int opcode, Label label)
    
public  voidvisitLabel(Label label)
    
public  voidvisitLdcInsn(Object cst)
    
public  voidvisitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels)
    
public  voidvisitMethodInsn(int opcode, String owner, String name, String desc)
    
public  voidvisitMultiANewArrayInsn(String desc, int dims)
    
public  voidvisitTableSwitchInsn(int min, int max, Label dflt, Label[] labels)
    
public  voidvisitTypeInsn(int opcode, String name)
    
public  voidvisitVarInsn(int opcode, int var)
    

Field Detail
methodAccess
protected int methodAccess(Code)



methodDesc
protected String methodDesc(Code)




Constructor Detail
AdviceAdapter
public AdviceAdapter(MethodVisitor mv, int access, String name, String desc)(Code)
Creates a new AdviceAdapter .
Parameters:
  mv - the method visitor to which this adapter delegates calls.
Parameters:
  access - the method's access flags (see Opcodes).
Parameters:
  name - the method's name.
Parameters:
  desc - the method's descriptor (see Type Type).




Method Detail
onMethodEnter
abstract protected void onMethodEnter()(Code)
Called at the beginning of the method or after super class class call in the constructor.

Custom code can use or change all the local variables, but should not change state of the stack.



onMethodExit
abstract protected void onMethodExit(int opcode)(Code)
Called before explicit exit from the method using either return or throw. Top element on the stack contains the return value or exception instance. For example:
 public void onMethodExit(int opcode) {
 if(opcode==RETURN) {
 visitInsn(ACONST_NULL);
 } else if(opcode==ARETURN || opcode==ATHROW) {
 dup();
 } else {
 if(opcode==LRETURN || opcode==DRETURN) {
 dup2();
 } else {
 dup();
 }
 box(Type.getReturnType(this.methodDesc));
 }
 visitIntInsn(SIPUSH, opcode);
 visitMethodInsn(INVOKESTATIC, owner, "onExit", "(Ljava/lang/Object;I)V");
 }
 // an actual call back method
 public static void onExit(int opcode, Object param) {
 ...
 


Custom code can use or change all the local variables, but should not change state of the stack.
Parameters:
  opcode - one of the RETURN, IRETURN, FRETURN, ARETURN, LRETURN, DRETURN or ATHROW



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



visitInsn
public void visitInsn(int opcode)(Code)



visitIntInsn
public void visitIntInsn(int opcode, int operand)(Code)



visitJumpInsn
public void visitJumpInsn(int opcode, Label label)(Code)



visitLabel
public void visitLabel(Label label)(Code)



visitLdcInsn
public void visitLdcInsn(Object cst)(Code)



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



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



visitMultiANewArrayInsn
public void visitMultiANewArrayInsn(String desc, int dims)(Code)



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



visitTypeInsn
public void visitTypeInsn(int opcode, String name)(Code)



visitVarInsn
public void visitVarInsn(int opcode, int var)(Code)



Fields inherited from org.drools.asm.commons.GeneratorAdapter
final public static int ADD(Code)(Java Doc)
final public static int AND(Code)(Java Doc)
final public static int DIV(Code)(Java Doc)
final public static int EQ(Code)(Java Doc)
final public static int GE(Code)(Java Doc)
final public static int GT(Code)(Java Doc)
final public static int LE(Code)(Java Doc)
final public static int LT(Code)(Java Doc)
final public static int MUL(Code)(Java Doc)
final public static int NE(Code)(Java Doc)
final public static int NEG(Code)(Java Doc)
final public static int OR(Code)(Java Doc)
final public static int REM(Code)(Java Doc)
final public static int SHL(Code)(Java Doc)
final public static int SHR(Code)(Java Doc)
final public static int SUB(Code)(Java Doc)
final public static int USHR(Code)(Java Doc)
final public static int XOR(Code)(Java Doc)

Methods inherited from org.drools.asm.commons.GeneratorAdapter
public void arrayLength()(Code)(Java Doc)
public void arrayLoad(Type type)(Code)(Java Doc)
public void arrayStore(Type type)(Code)(Java Doc)
public void box(Type type)(Code)(Java Doc)
public void cast(Type from, Type to)(Code)(Java Doc)
public void catchException(Label start, Label end, Type exception)(Code)(Java Doc)
public void checkCast(Type type)(Code)(Java Doc)
public void dup()(Code)(Java Doc)
public void dup2()(Code)(Java Doc)
public void dup2X1()(Code)(Java Doc)
public void dup2X2()(Code)(Java Doc)
public void dupX1()(Code)(Java Doc)
public void dupX2()(Code)(Java Doc)
public void endMethod()(Code)(Java Doc)
public void getField(Type owner, String name, Type type)(Code)(Java Doc)
public Type getLocalType(int local)(Code)(Java Doc)
public void getStatic(Type owner, String name, Type type)(Code)(Java Doc)
public void goTo(Label label)(Code)(Java Doc)
public void ifCmp(Type type, int mode, Label label)(Code)(Java Doc)
public void ifICmp(int mode, Label label)(Code)(Java Doc)
public void ifNonNull(Label label)(Code)(Java Doc)
public void ifNull(Label label)(Code)(Java Doc)
public void ifZCmp(int mode, Label label)(Code)(Java Doc)
public void iinc(int local, int amount)(Code)(Java Doc)
public void instanceOf(Type type)(Code)(Java Doc)
public void invokeConstructor(Type type, Method method)(Code)(Java Doc)
public void invokeInterface(Type owner, Method method)(Code)(Java Doc)
public void invokeStatic(Type owner, Method method)(Code)(Java Doc)
public void invokeVirtual(Type owner, Method method)(Code)(Java Doc)
public void loadArg(int arg)(Code)(Java Doc)
public void loadArgArray()(Code)(Java Doc)
public void loadArgs(int arg, int count)(Code)(Java Doc)
public void loadArgs()(Code)(Java Doc)
public void loadLocal(int local)(Code)(Java Doc)
public void loadLocal(int local, Type type)(Code)(Java Doc)
public void loadThis()(Code)(Java Doc)
public void mark(Label label)(Code)(Java Doc)
public Label mark()(Code)(Java Doc)
public void math(int op, Type type)(Code)(Java Doc)
public void monitorEnter()(Code)(Java Doc)
public void monitorExit()(Code)(Java Doc)
public void newArray(Type type)(Code)(Java Doc)
public void newInstance(Type type)(Code)(Java Doc)
public Label newLabel()(Code)(Java Doc)
public int newLocal(Type type)(Code)(Java Doc)
public void not()(Code)(Java Doc)
public void pop()(Code)(Java Doc)
public void pop2()(Code)(Java Doc)
public void push(boolean value)(Code)(Java Doc)
public void push(int value)(Code)(Java Doc)
public void push(long value)(Code)(Java Doc)
public void push(float value)(Code)(Java Doc)
public void push(double value)(Code)(Java Doc)
public void push(String value)(Code)(Java Doc)
public void push(Type value)(Code)(Java Doc)
public void putField(Type owner, String name, Type type)(Code)(Java Doc)
public void putStatic(Type owner, String name, Type type)(Code)(Java Doc)
public void ret(int local)(Code)(Java Doc)
public void returnValue()(Code)(Java Doc)
public void storeArg(int arg)(Code)(Java Doc)
public void storeLocal(int local)(Code)(Java Doc)
public void storeLocal(int local, Type type)(Code)(Java Doc)
public void swap()(Code)(Java Doc)
public void swap(Type prev, Type type)(Code)(Java Doc)
public void tableSwitch(int[] keys, TableSwitchGenerator generator)(Code)(Java Doc)
public void tableSwitch(int[] keys, TableSwitchGenerator generator, boolean useTable)(Code)(Java Doc)
public void throwException()(Code)(Java Doc)
public void throwException(Type type, String msg)(Code)(Java Doc)
public void unbox(Type type)(Code)(Java Doc)

Fields inherited from org.drools.asm.commons.LocalVariablesSorter
final protected int firstLocal(Code)(Java Doc)

Methods inherited from org.drools.asm.commons.LocalVariablesSorter
protected int newLocal(int size)(Code)(Java Doc)
public void visitIincInsn(int var, int increment)(Code)(Java Doc)
public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index)(Code)(Java Doc)
public void visitMaxs(int maxStack, int maxLocals)(Code)(Java Doc)
public void visitVarInsn(int opcode, int var)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.