Java Doc for AbstractCrosscut.java in  » Byte-Code » PROSE » ch » ethz » prose » crosscut » 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 » Byte Code » PROSE » ch.ethz.prose.crosscut 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


ch.ethz.prose.crosscut.Crosscut
   ch.ethz.prose.crosscut.AbstractCrosscut

All known Subclasses:   ch.ethz.prose.crosscut.SetCut,  ch.ethz.prose.crosscut.MethodCut,  ch.ethz.prose.crosscut.ThrowCut,  ch.ethz.prose.crosscut.ConstructorCut,  ch.ethz.prose.crosscut.CatchCut,  ch.ethz.prose.crosscut.GetCut,
AbstractCrosscut
abstract public class AbstractCrosscut extends Crosscut (Code)
Interface AbstractCrosscut is a Crosscut implementation together with a filtering mechanism for both join-point requests and join-point events. Every AbstractCrosscut owns a PointFilter. A specializer is a strategy-object used for filtering event requests.

A Crosscut is used to generate a crosscut request, that is, a collection of join-point requests(Method createRequest). Upon the first usage of a crosscut, the crosscut selects a number of classes in the current virtual machine or maybe all (default), and then generates for every potential point inside these classes (e.g. for all method entries, exits, or field accesses) a separate join point request. Before returning these requests to the user of the crosscut, it applies the filter provided by its specializer to every one of them. Only the ones which passed are returned in the crosscut.

For each event it receives, the abstract crosscut uses the specializer as a filter. If the specializer allows the action corresponding to this event, joinPointAction is called with the current event as a parameter. If the specializer disagrees with the current event, no action is performed.

How to extend AbstractCrosscut

Every subclass of crosscut will have to provide implementations for doCreateRequest(Class), joinPointAction and possibly for potentialCrosscutClasses. Implementations of these methods have to use the getRequestFactory to retrieve the factory for creating the necessary JoinPointRequest objects.
version:
   $Revision: 1.3 $
author:
   Andrei Popovici
author:
   Angela Nicoara


Field Summary
protected transient  JoinPointManagerrequestFactory
     This is the info interface of the current system.


Method Summary
protected  PointCutterNOT(PointCutter cs)
    
public  voidassociateToGroup(CrosscutGroup grp)
     Associated this crosscut to the group grp.
final public  CrosscutRequestcreateRequest(Class c)
     This method determines the join-points of the specified class (c).
final public  CrosscutRequestcreateRequest()
     This method is the mechanism used by an extension for creating a crosscut Request.
abstract protected  CrosscutRequestdoCreateRequest(Class c)
     This method has to be implemented by subclasses.
public  AspectgetOwner()
    
public  intgetPriority()
    
public  PointFiltergetSpecializer()
     Return the current specializer.
public  voidinsertionAction(boolean beforeInsertion)
     Upon insertion, the a default (abstract) crosscuts tries to figure out where it is running.
protected  booleanisPotentialCrosscutClass(Class c)
     Override this method if you want to filter the clases to be crosscut at runtime.
protected  voidjoinPointAction(FieldModificationJoinPoint e)
     This method should be implemented by subclasses; this method is a template method.
protected  voidjoinPointAction(FieldAccessJoinPoint e)
     This method should be implemented by subclasses; this method is a template method.
protected  voidjoinPointAction(MethodEntryJoinPoint e)
     This method should be implemented by subclasses; this method is a template method.
protected  voidjoinPointAction(ConstructorJoinPoint e)
     This method should be implemented by subclasses; this method is a template method.
protected  voidjoinPointAction(MethodExitJoinPoint e)
     This method should be implemented by subclasses; this method is a template method.
protected  voidjoinPointAction(ExceptionJoinPoint e)
     This method should be implemented by subclasses; this method is a template method.
protected  voidjoinPointAction(ExceptionCatchJoinPoint e)
     This method should be implemented by subclasses; this method is a template method.
public  voidjoinPointReached(MethodEntryJoinPoint jp)
     This method performs the actions upon receiving a JoinPointEvent.
public  voidjoinPointReached(ConstructorJoinPoint jp)
     This method performs the actions upon receiving a JoinPointEvent.
public  voidjoinPointReached(MethodExitJoinPoint jp)
     This method performs the actions upon receiving a JoinPointEvent.
public  voidjoinPointReached(FieldAccessJoinPoint jp)
     This method performs the actions upon receiving a JoinPointEvent.
public  voidjoinPointReached(FieldModificationJoinPoint jp)
     This method performs the actions upon receiving a JoinPointEvent.
public  voidjoinPointReached(ExceptionJoinPoint jp)
     This method performs the actions upon receiving a JoinPointEvent.
public  voidjoinPointReached(ExceptionCatchJoinPoint jp)
     This method performs the actions upon receiving a JoinPointEvent.
abstract protected  PointCutterpointCutter()
    
protected synchronized  Class[]potentialCrosscutClasses()
     Return an array of classes which will be considered for crosscutting when this crosscut is used to genereate a crosscut request.
public  voidsetOwner(Aspect ext)
     Set the owner of this crosscut.
protected  JoinPointthisJoinPoint()
     This method has to be implemented by concrete crosscut implementation. It returns the thread-local JoinPointEvent object.
public  StringtoString()
    
public  voidwithdrawalAction(boolean beforeInsertion)
    

Field Detail
requestFactory
protected transient JoinPointManager requestFactory(Code)
This is the info interface of the current system. The implementation must ensure that these interfaces are initialized when joinPointReached is called.





Method Detail
NOT
protected PointCutter NOT(PointCutter cs)(Code)



associateToGroup
public void associateToGroup(CrosscutGroup grp) throws IllegalArgumentException(Code)
Associated this crosscut to the group grp.



createRequest
final public CrosscutRequest createRequest(Class c)(Code)
This method determines the join-points of the specified class (c). To generate join-point requests, it uses the doCreateRequest templated method. This method guarantees that the resulting requests:
  1. belong to classes that pass the predicate isPotentialCrosscutClass
  2. are allowes by this crosscuts specializer (if any)

This method will also be used every time a new class is loaded in the current VM in order to determine the new requests.




createRequest
final public CrosscutRequest createRequest()(Code)
This method is the mechanism used by an extension for creating a crosscut Request. It uses the createRequest(Class c) method to build up a crosscut for the entire local VM. It has the following functionality: for each potential crosscut class (as returned by potentialCrosscutClasses), the method createRequest(Class c) is applied. The result corresponds to the union of all requests returned by createRequest(Class c).



doCreateRequest
abstract protected CrosscutRequest doCreateRequest(Class c)(Code)
This method has to be implemented by subclasses. It basically represents the initial generation mechanisms for Join point requests. It should return indiscriminatly a lot of join-points for every potential join-point in the byte-code of the specified class.



getOwner
public Aspect getOwner()(Code)



getPriority
public int getPriority()(Code)



getSpecializer
public PointFilter getSpecializer()(Code)
Return the current specializer. the current specializer



insertionAction
public void insertionAction(boolean beforeInsertion)(Code)
Upon insertion, the a default (abstract) crosscuts tries to figure out where it is running. It then initializes the infoInterface and aspectInterface variables.
Parameters:
  beforeInsertion - true if the crosscut is not yet inserted.



isPotentialCrosscutClass
protected boolean isPotentialCrosscutClass(Class c)(Code)
Override this method if you want to filter the clases to be crosscut at runtime. The potential crosscut classes denotes the initial number of classes to be cutt across. Classes may be loaded later on, and this method decides whether they should be searched for join points or not.



joinPointAction
protected void joinPointAction(FieldModificationJoinPoint e) throws InvocationTargetException, IllegalAccessException(Code)
This method should be implemented by subclasses; this method is a template method. This method should perform the action corresponding to the receipt of events e.



joinPointAction
protected void joinPointAction(FieldAccessJoinPoint e) throws InvocationTargetException, IllegalAccessException(Code)
This method should be implemented by subclasses; this method is a template method. This method should perform the action corresponding to the receipt of events e.



joinPointAction
protected void joinPointAction(MethodEntryJoinPoint e) throws InvocationTargetException, IllegalAccessException(Code)
This method should be implemented by subclasses; this method is a template method. This method should perform the action corresponding to the receipt of events e.



joinPointAction
protected void joinPointAction(ConstructorJoinPoint e) throws InvocationTargetException, IllegalAccessException(Code)
This method should be implemented by subclasses; this method is a template method. This method should perform the action corresponding to the receipt of events e.



joinPointAction
protected void joinPointAction(MethodExitJoinPoint e) throws InvocationTargetException, IllegalAccessException(Code)
This method should be implemented by subclasses; this method is a template method. This method should perform the action corresponding to the receipt of events e.



joinPointAction
protected void joinPointAction(ExceptionJoinPoint e) throws InvocationTargetException, IllegalAccessException(Code)
This method should be implemented by subclasses; this method is a template method. This method should perform the action corresponding to the receipt of events e.



joinPointAction
protected void joinPointAction(ExceptionCatchJoinPoint e) throws InvocationTargetException, IllegalAccessException(Code)
This method should be implemented by subclasses; this method is a template method. This method should perform the action corresponding to the receipt of events e.



joinPointReached
public void joinPointReached(MethodEntryJoinPoint jp) throws Exception(Code)
This method performs the actions upon receiving a JoinPointEvent. If this crosscut has a specializer, and the current event is accepted by the specializer, then joinPointAction is invoked. If it has no specializer, joinPointAction is invoked by default.
Parameters:
  jp - the current join point



joinPointReached
public void joinPointReached(ConstructorJoinPoint jp) throws Exception(Code)
This method performs the actions upon receiving a JoinPointEvent. If this crosscut has a specializer, and the current event is accepted by the specializer, then joinPointAction is invoked. If it has no specializer, joinPointAction is invoked by default.
Parameters:
  jp - the current join point



joinPointReached
public void joinPointReached(MethodExitJoinPoint jp) throws Exception(Code)
This method performs the actions upon receiving a JoinPointEvent. If this crosscut has a specializer, and the current event is accepted by the specializer, then joinPointAction is invoked. If it has no specializer, joinPointAction is invoked by default.
Parameters:
  jp - the current join point



joinPointReached
public void joinPointReached(FieldAccessJoinPoint jp) throws Exception(Code)
This method performs the actions upon receiving a JoinPointEvent. If this crosscut has a specializer, and the curren\t event is accepted by the specializer, then joinPointAction is invoked. If it has no specializer, joinPointAction is invoked by default.
Parameters:
  jp - the current join point



joinPointReached
public void joinPointReached(FieldModificationJoinPoint jp) throws Exception(Code)
This method performs the actions upon receiving a JoinPointEvent. If this crosscut has a specializer, and the current event is accepted by the specializer, then joinPointAction is invoked. If it has no specializer, joinPointAction is invoked by default.
Parameters:
  jp - the current join point



joinPointReached
public void joinPointReached(ExceptionJoinPoint jp) throws Exception(Code)
This method performs the actions upon receiving a JoinPointEvent. If this crosscut has a specializer, and the current event is accepted by the specializer, then joinPointAction is invoked. If it has no specializer, joinPointAction is invoked by default.
Parameters:
  jp - the current join point<



joinPointReached
public void joinPointReached(ExceptionCatchJoinPoint jp) throws Exception(Code)
This method performs the actions upon receiving a JoinPointEvent. If this crosscut has a specializer, and the current event is accepted by the specializer, then joinPointAction is invoked. If it has no specializer, joinPointAction is invoked by default.
Parameters:
  jp - the current join point



pointCutter
abstract protected PointCutter pointCutter()(Code)



potentialCrosscutClasses
protected synchronized Class[] potentialCrosscutClasses()(Code)
Return an array of classes which will be considered for crosscutting when this crosscut is used to genereate a crosscut request. A crosscut will implement this method if and only if the number of classes it crosscuts is limited.

The default implementation is to return all loaded classes of the current VM, which means that the default is to crosscut whatever is loaded in the VM (including abstract classes and interfaces! (?)).




setOwner
public void setOwner(Aspect ext) throws IllegalStateException(Code)
Set the owner of this crosscut. This can be done only if the current crosscut does not have an owner.



thisJoinPoint
protected JoinPoint thisJoinPoint() throws IllegalStateException(Code)
This method has to be implemented by concrete crosscut implementation. It returns the thread-local JoinPointEvent object. It can be called just below the control flow of a joinPointAction.
throws:
  IllegalStateException - if this mehtod is invoked from outsidea join-point notification.



toString
public String toString()(Code)



withdrawalAction
public void withdrawalAction(boolean beforeInsertion)(Code)



Methods inherited from ch.ethz.prose.crosscut.Crosscut
abstract public void associateToGroup(CrosscutGroup grp)(Code)(Java Doc)
abstract public CrosscutRequest createRequest()(Code)(Java Doc)
abstract public CrosscutRequest createRequest(Class crtCls)(Code)(Java Doc)
abstract public Aspect getOwner()(Code)(Java Doc)
abstract public void setOwner(Aspect x)(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.