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


java.lang.Object
   org.springframework.aop.aspectj.AbstractAspectJAdvice

All known Subclasses:   org.springframework.aop.aspectj.AspectJAfterReturningAdvice,  org.springframework.aop.aspectj.AspectJAfterThrowingAdvice,  org.springframework.aop.aspectj.AspectJMethodBeforeAdvice,  org.springframework.aop.aspectj.AspectJAroundAdvice,  org.springframework.aop.aspectj.AspectJAfterAdvice,
AbstractAspectJAdvice
abstract public class AbstractAspectJAdvice implements Advice,AspectJPrecedenceInformation(Code)
Base class for AOP Alliance org.aopalliance.aop.Advice classes wrapping an AspectJ aspect or an AspectJ-annotated advice method.
author:
   Rod Johnson
author:
   Adrian Colyer
author:
   Juergen Hoeller
since:
   2.0


Field Summary
final protected static  StringJOIN_POINT_KEY
     Key used in ReflectiveMethodInvocation userAtributes map for the current joinpoint.
final protected  MethodaspectJAdviceMethod
    

Constructor Summary
public  AbstractAspectJAdvice(Method aspectJAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aspectInstanceFactory)
     Create a new AbstractAspectJAdvice for the given advice method.

Method Summary
protected  Object[]argBinding(JoinPoint jp, JoinPointMatch jpMatch, Object returnValue, Throwable t)
    
final public  PointcutbuildSafePointcut()
     Build a 'safe' pointcut that excludes the AspectJ advice method itself.
final public synchronized  voidcalculateArgumentBindings()
     Do as much work as we can as part of the set-up so that argument binding on subsequent advice invocations can be as fast as possible.

If the first argument is of type JoinPoint or ProceedingJoinPoint then we pass a JoinPoint in that position (ProceedingJoinPoint for around advice).

If the first argument is of type JoinPoint.StaticPart then we pass a JoinPoint.StaticPart in that position.

Remaining arguments have to be bound by pointcut evaluation at a given join point.

protected  ParameterNameDiscoverercreateParameterNameDiscoverer()
     Create a ParameterNameDiscoverer to be used for argument binding.
public static  JoinPointcurrentJoinPoint()
     Lazily instantiate joinpoint for the current invocation.
final public  AspectInstanceFactorygetAspectInstanceFactory()
     Return the factory for aspect instances.
final public  MethodgetAspectJAdviceMethod()
     Return the AspectJ-style advice method.
public  StringgetAspectName()
    
public  intgetDeclarationOrder()
    
protected  ClassgetDiscoveredReturningType()
    
protected  ClassgetDiscoveredThrowingType()
    
protected  JoinPointgetJoinPoint()
     Overridden in around advice to return proceeding join point.
protected  JoinPointMatchgetJoinPointMatch()
     Get the current join point match at the join point we are being dispatched on.
protected  JoinPointMatchgetJoinPointMatch(ProxyMethodInvocation pmi)
    
public  intgetOrder()
    
final public  AspectJExpressionPointcutgetPointcut()
     Return the AspectJ expression pointcut.
protected  ObjectinvokeAdviceMethod(JoinPointMatch jpMatch, Object returnValue, Throwable ex)
     Invoke the advice method.
protected  ObjectinvokeAdviceMethod(JoinPoint jp, JoinPointMatch jpMatch, Object returnValue, Throwable t)
    
protected  ObjectinvokeAdviceMethodWithGivenArgs(Object[] args)
    
public  voidsetArgumentNames(String argNames)
     Set by creator of this advice object if the argument names are known.
public  voidsetArgumentNamesFromStringArray(String[] args)
    
public  voidsetAspectName(String name)
    
public  voidsetDeclarationOrder(int order)
    
public  voidsetReturningName(String name)
    
protected  voidsetReturningNameNoCheck(String name)
     We need to hold the returning name at this level for argument binding calculations, this method allows the afterReturning advice subclass to set the name.
public  voidsetThrowingName(String name)
    
protected  voidsetThrowingNameNoCheck(String name)
     We need to hold the throwing name at this level for argument binding calculations, this method allows the afterThrowing advice subclass to set the name.
public  StringtoString()
    

Field Detail
JOIN_POINT_KEY
final protected static String JOIN_POINT_KEY(Code)
Key used in ReflectiveMethodInvocation userAtributes map for the current joinpoint.



aspectJAdviceMethod
final protected Method aspectJAdviceMethod(Code)




Constructor Detail
AbstractAspectJAdvice
public AbstractAspectJAdvice(Method aspectJAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aspectInstanceFactory)(Code)
Create a new AbstractAspectJAdvice for the given advice method.
Parameters:
  aspectJAdviceMethod - the AspectJ-style advice method
Parameters:
  pointcut - the AspectJ expression pointcut
Parameters:
  aspectInstanceFactory - the factory for aspect instances




Method Detail
argBinding
protected Object[] argBinding(JoinPoint jp, JoinPointMatch jpMatch, Object returnValue, Throwable t)(Code)
Take the arguments at the method execution join point and output a set of arguments to the advice method
Parameters:
  jpMatch - the join point match that matched this execution join point
Parameters:
  returnValue - the return value from the method execution (may be null)
Parameters:
  t - the exception thrown by the method execution (may be null) the empty array if there are no arguments



buildSafePointcut
final public Pointcut buildSafePointcut()(Code)
Build a 'safe' pointcut that excludes the AspectJ advice method itself. a composable pointcut that builds on the original AspectJ expression pointcut
See Also:   AbstractAspectJAdvice.getPointcut()



calculateArgumentBindings
final public synchronized void calculateArgumentBindings()(Code)
Do as much work as we can as part of the set-up so that argument binding on subsequent advice invocations can be as fast as possible.

If the first argument is of type JoinPoint or ProceedingJoinPoint then we pass a JoinPoint in that position (ProceedingJoinPoint for around advice).

If the first argument is of type JoinPoint.StaticPart then we pass a JoinPoint.StaticPart in that position.

Remaining arguments have to be bound by pointcut evaluation at a given join point. We will get back a map from argument name to value. We need to calculate which advice parameter needs to be bound to which argument name. There are multiple strategies for determining this binding, which are arranged in a ChainOfResponsibility.




createParameterNameDiscoverer
protected ParameterNameDiscoverer createParameterNameDiscoverer()(Code)
Create a ParameterNameDiscoverer to be used for argument binding.

The default implementation creates a PrioritizedParameterNameDiscoverer containing a LocalVariableTableParameterNameDiscoverer and an AspectJAdviceParameterNameDiscoverer .




currentJoinPoint
public static JoinPoint currentJoinPoint()(Code)
Lazily instantiate joinpoint for the current invocation. Requires MethodInvocation to be bound with ExposeInvocationInterceptor.

Do not use if access is available to the current ReflectiveMethodInvocation (in an around advice). current AspectJ joinpoint, or through an exception if we're not in aSpring AOP invocation.




getAspectInstanceFactory
final public AspectInstanceFactory getAspectInstanceFactory()(Code)
Return the factory for aspect instances.



getAspectJAdviceMethod
final public Method getAspectJAdviceMethod()(Code)
Return the AspectJ-style advice method.



getAspectName
public String getAspectName()(Code)



getDeclarationOrder
public int getDeclarationOrder()(Code)



getDiscoveredReturningType
protected Class getDiscoveredReturningType()(Code)



getDiscoveredThrowingType
protected Class getDiscoveredThrowingType()(Code)



getJoinPoint
protected JoinPoint getJoinPoint()(Code)
Overridden in around advice to return proceeding join point.



getJoinPointMatch
protected JoinPointMatch getJoinPointMatch()(Code)
Get the current join point match at the join point we are being dispatched on.



getJoinPointMatch
protected JoinPointMatch getJoinPointMatch(ProxyMethodInvocation pmi)(Code)



getOrder
public int getOrder()(Code)



getPointcut
final public AspectJExpressionPointcut getPointcut()(Code)
Return the AspectJ expression pointcut.



invokeAdviceMethod
protected Object invokeAdviceMethod(JoinPointMatch jpMatch, Object returnValue, Throwable ex) throws Throwable(Code)
Invoke the advice method.
Parameters:
  jpMatch - the JoinPointMatch that matched this execution join point
Parameters:
  returnValue - the return value from the method execution (may be null)
Parameters:
  ex - the exception thrown by the method execution (may be null) the invocation result
throws:
  Throwable - in case of invocation failure



invokeAdviceMethod
protected Object invokeAdviceMethod(JoinPoint jp, JoinPointMatch jpMatch, Object returnValue, Throwable t) throws Throwable(Code)



invokeAdviceMethodWithGivenArgs
protected Object invokeAdviceMethodWithGivenArgs(Object[] args) throws Throwable(Code)



setArgumentNames
public void setArgumentNames(String argNames)(Code)
Set by creator of this advice object if the argument names are known.

This could be for example because they have been explicitly specified in XML, or in an advice annotation.
Parameters:
  argNames - comma delimited list of arg names




setArgumentNamesFromStringArray
public void setArgumentNamesFromStringArray(String[] args)(Code)



setAspectName
public void setAspectName(String name)(Code)



setDeclarationOrder
public void setDeclarationOrder(int order)(Code)
Sets the declaration order of this advice within the aspect



setReturningName
public void setReturningName(String name)(Code)



setReturningNameNoCheck
protected void setReturningNameNoCheck(String name)(Code)
We need to hold the returning name at this level for argument binding calculations, this method allows the afterReturning advice subclass to set the name.



setThrowingName
public void setThrowingName(String name)(Code)



setThrowingNameNoCheck
protected void setThrowingNameNoCheck(String name)(Code)
We need to hold the throwing name at this level for argument binding calculations, this method allows the afterThrowing advice subclass to set the name.



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.