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


org.springframework.aop.MethodMatcher

All known Subclasses:   org.springframework.aop.TrueMethodMatcher,  org.springframework.aop.support.DynamicMethodMatcher,  org.springframework.aop.support.ControlFlowPointcut,  org.springframework.aop.support.StaticMethodMatcher,
MethodMatcher
public interface MethodMatcher (Code)
Part of a Pointcut : Checks whether the target method is eligible for advice.

A MethodMatcher may be evaluated statically or at runtime (dynamically). Static matching involves method and (possibly) method attributes. Dynamic matching also makes arguments for a particular call available, and any effects of running previous advice applying to the joinpoint.

If an implementation returns false from its MethodMatcher.isRuntime() method, evaluation can be performed statically, and the result will be the same for all invocations of this method, whatever their arguments. This means that if the MethodMatcher.isRuntime() method returns false, the 3-arg MethodMatcher.matches(java.lang.reflect.Method,Class,Object[]) method will never be invoked.

If an implementation returns true from its 2-arg MethodMatcher.matches(java.lang.reflect.Method,Class) method and its MethodMatcher.isRuntime() method returns true, the 3-arg MethodMatcher.matches(java.lang.reflect.Method,Class,Object[]) method will be invoked immediately before each potential execution of the related advice, to decide whether the advice should run. All previous advice, such as earlier interceptors in an interceptor chain, will have run, so any state changes they have produced in parameters or ThreadLocal state will be available at the time of evaluation.
author:
   Rod Johnson
since:
   11.11.2003
See Also:   Pointcut
See Also:   ClassFilter



Field Summary
 MethodMatcherTRUE
     Canonical instance that matches all methods.


Method Summary
 booleanisRuntime()
    
 booleanmatches(Method method, Class targetClass)
     Perform static checking whether the given method matches.
 booleanmatches(Method method, Class targetClass, Object[] args)
     Check whether there a runtime (dynamic) match for this method, which must have matched statically.

This method is invoked only if the 2-arg matches method returns true for the given method and target class, and if the MethodMatcher.isRuntime() method returns true.


Field Detail
TRUE
MethodMatcher TRUE(Code)
Canonical instance that matches all methods.





Method Detail
isRuntime
boolean isRuntime()(Code)
Is this MethodMatcher dynamic, that is, must a final call be made on the MethodMatcher.matches(java.lang.reflect.Method,Class,Object[]) method at runtime even if the 2-arg matches method returns true?

Can be invoked when an AOP proxy is created, and need not be invoked again before each method invocation, whether or not a runtime match via the 3-argMethodMatcher.matches(java.lang.reflect.Method,Class,Object[]) methodis required if static matching passed




matches
boolean matches(Method method, Class targetClass)(Code)
Perform static checking whether the given method matches. If this returns false or if the MethodMatcher.isRuntime() method returns false, no runtime check (i.e. no. MethodMatcher.matches(java.lang.reflect.Method,Class,Object[]) call) will be made.
Parameters:
  method - the candidate method
Parameters:
  targetClass - the target class (may be null, in which casethe candidate class must be taken to be the method's declaring class) whether or not this method matches statically



matches
boolean matches(Method method, Class targetClass, Object[] args)(Code)
Check whether there a runtime (dynamic) match for this method, which must have matched statically.

This method is invoked only if the 2-arg matches method returns true for the given method and target class, and if the MethodMatcher.isRuntime() method returns true. Invoked immediately before potential running of the advice, after any advice earlier in the advice chain has run.
Parameters:
  method - the candidate method
Parameters:
  targetClass - the target class (may be null, in which casethe candidate class must be taken to be the method's declaring class)
Parameters:
  args - arguments to the method whether there's a runtime match
See Also:   MethodMatcher.matches(MethodClass)




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