Java Doc for ReflectiveMethodInvocation.java in  » J2EE » spring-framework-2.0.6 » org » springframework » aop » framework » 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 » J2EE » spring framework 2.0.6 » org.springframework.aop.framework 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.springframework.aop.framework.ReflectiveMethodInvocation

ReflectiveMethodInvocation
public class ReflectiveMethodInvocation implements ProxyMethodInvocation,Cloneable(Code)
Spring's implementation of the AOP Alliance org.aopalliance.intercept.MethodInvocation interface, implementing the extended org.springframework.aop.ProxyMethodInvocation interface.

Invokes the target object using reflection. Subclasses can override the ReflectiveMethodInvocation.invokeJoinpoint() method to change this behavior, so this is also a useful base class for more specialized MethodInvocation implementations.

It is possible to clone an invocation, to invoke ReflectiveMethodInvocation.proceed() repeatedly (once per clone), using the ReflectiveMethodInvocation.invocableClone() method. It is also possible to attach custom attributes to the invocation, using the ReflectiveMethodInvocation.setUserAttribute / ReflectiveMethodInvocation.getUserAttribute methods.
author:
   Rod Johnson
author:
   Juergen Hoeller
author:
   Adrian Colyer
See Also:   ReflectiveMethodInvocation.invokeJoinpoint
See Also:   ReflectiveMethodInvocation.proceed
See Also:   ReflectiveMethodInvocation.invocableClone
See Also:   ReflectiveMethodInvocation.setUserAttribute
See Also:   ReflectiveMethodInvocation.getUserAttribute



Field Summary
protected  Object[]arguments
    
final protected  ListinterceptorsAndDynamicMethodMatchers
     List of MethodInterceptor and InterceptorAndDynamicMethodMatcher that need dynamic checks.
final protected  Methodmethod
    
final protected  Objectproxy
    
final protected  Objecttarget
    

Constructor Summary
public  ReflectiveMethodInvocation(Object proxy, Object target, Method method, Object[] arguments, Class targetClass, List interceptorsAndDynamicMethodMatchers)
     Construct a new ReflectiveMethodInvocation with the given arguments.
Parameters:
  proxy - the proxy object that the invocation was made on
Parameters:
  target - the target object to invoke
Parameters:
  method - the method to invoke
Parameters:
  arguments - the arguments to invoke the method with
Parameters:
  targetClass - the target class, for MethodMatcher invocations
Parameters:
  interceptorsAndDynamicMethodMatchers - interceptors that should be applied,along with any InterceptorAndDynamicMethodMatchers that need evaluation at runtime.MethodMatchers included in this struct must already have been found to have matchedas far as was possibly statically.

Method Summary
final public  Object[]getArguments()
    
final public  MethodgetMethod()
     Return the method invoked on the proxied interface.
final public  ObjectgetProxy()
    
final public  AccessibleObjectgetStaticPart()
    
final public  ObjectgetThis()
    
public  ObjectgetUserAttribute(String key)
    
public  MapgetUserAttributes()
     Return user attributes associated with this invocation.
public  MethodInvocationinvocableClone()
     This implementation returns a shallow copy of this invocation object, including an independent copy of the original arguments array.
public  MethodInvocationinvocableClone(Object[] arguments)
     This implementation returns a shallow copy of this invocation object, using the given arguments array for the clone.
protected  ObjectinvokeJoinpoint()
     Invoke the joinpoint using reflection.
public  Objectproceed()
    
public  voidsetArguments(Object[] arguments)
    
public  voidsetUserAttribute(String key, Object value)
    
public  StringtoString()
    

Field Detail
arguments
protected Object[] arguments(Code)



interceptorsAndDynamicMethodMatchers
final protected List interceptorsAndDynamicMethodMatchers(Code)
List of MethodInterceptor and InterceptorAndDynamicMethodMatcher that need dynamic checks.



method
final protected Method method(Code)



proxy
final protected Object proxy(Code)



target
final protected Object target(Code)




Constructor Detail
ReflectiveMethodInvocation
public ReflectiveMethodInvocation(Object proxy, Object target, Method method, Object[] arguments, Class targetClass, List interceptorsAndDynamicMethodMatchers)(Code)
Construct a new ReflectiveMethodInvocation with the given arguments.
Parameters:
  proxy - the proxy object that the invocation was made on
Parameters:
  target - the target object to invoke
Parameters:
  method - the method to invoke
Parameters:
  arguments - the arguments to invoke the method with
Parameters:
  targetClass - the target class, for MethodMatcher invocations
Parameters:
  interceptorsAndDynamicMethodMatchers - interceptors that should be applied,along with any InterceptorAndDynamicMethodMatchers that need evaluation at runtime.MethodMatchers included in this struct must already have been found to have matchedas far as was possibly statically. Passing an array might be about 10% faster,but would complicate the code. And it would work only for static pointcuts.




Method Detail
getArguments
final public Object[] getArguments()(Code)



getMethod
final public Method getMethod()(Code)
Return the method invoked on the proxied interface. May or may not correspond with a method invoked on an underlying implementation of that interface.



getProxy
final public Object getProxy()(Code)



getStaticPart
final public AccessibleObject getStaticPart()(Code)



getThis
final public Object getThis()(Code)



getUserAttribute
public Object getUserAttribute(String key)(Code)



getUserAttributes
public Map getUserAttributes()(Code)
Return user attributes associated with this invocation. This method provides an invocation-bound alternative to a ThreadLocal.

This map is initialized lazily and is not used in the AOP framework itself. any user attributes associated with this invocation(never null)




invocableClone
public MethodInvocation invocableClone()(Code)
This implementation returns a shallow copy of this invocation object, including an independent copy of the original arguments array.

We want a shallow copy in this case: We want to use the same interceptor chain and other object references, but we want an independent value for the current interceptor index.
See Also:   java.lang.Object.clone




invocableClone
public MethodInvocation invocableClone(Object[] arguments)(Code)
This implementation returns a shallow copy of this invocation object, using the given arguments array for the clone.

We want a shallow copy in this case: We want to use the same interceptor chain and other object references, but we want an independent value for the current interceptor index.
See Also:   java.lang.Object.clone




invokeJoinpoint
protected Object invokeJoinpoint() throws Throwable(Code)
Invoke the joinpoint using reflection. Subclasses can override this to use custom invocation. the return value of the joinpoint
throws:
  Throwable - if invoking the joinpoint resulted in an exception



proceed
public Object proceed() throws Throwable(Code)



setArguments
public void setArguments(Object[] arguments)(Code)



setUserAttribute
public void setUserAttribute(String key, Object value)(Code)



toString
public String toString()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.