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


001:        //
002:        //  This file is part of the prose package.
003:        //
004:        //  The contents of this file are subject to the Mozilla Public License
005:        //  Version 1.1 (the "License"); you may not use this file except in
006:        //  compliance with the License. You may obtain a copy of the License at
007:        //  http://www.mozilla.org/MPL/
008:        //
009:        //  Software distributed under the License is distributed on an "AS IS" basis,
010:        //  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
011:        //  for the specific language governing rights and limitations under the
012:        //  License.
013:        //
014:        //  The Original Code is prose.
015:        //
016:        //  The Initial Developer of the Original Code is Andrei Popovici. Portions
017:        //  created by Andrei Popovici are Copyright (C) 2002 Andrei Popovici.
018:        //  All Rights Reserved.
019:        //
020:        //  Contributor(s):
021:        // $Id: NegatingPointCutter.java,v 1.3 2003/07/17 13:11:08 apopovic Exp $
022:        // =====================================================================
023:        //
024:        // (history at end)
025:        //
026:
027:        package ch.ethz.prose.filter;
028:
029:        // used packages
030:        import java.util.List;
031:        import java.util.Vector;
032:        import ch.ethz.jvmai.CodeJoinPoint;
033:        import ch.ethz.prose.engine.JoinPointRequest;
034:
035:        /**
036:         * Class NegaintPointCuter negates a PointCutter.
037:         * It returns a <code>memberPointFilters()</code>
038:         * collection with only one member (the argument to the constructor) and
039:         * negates only active filters. (That is, if the filter is not doing dynamic
040:         * filtering, the result is undefined).
041:         *
042:         * @version	$Revision: 1.3 $
043:         * @author	Andrei Popovici
044:         */
045:        public class NegatingPointCutter extends PointCutter {
046:
047:            private static final long serialVersionUID = 3689911773301978934L;
048:            PointCutter spec1;
049:
050:            /** Create a PointCutter that negates the filtering behavior of
051:             * s1. <code>s1</code> is the only member PointCutter.
052:             */
053:            public NegatingPointCutter(PointCutter s1) {
054:                if (s1 == null)
055:                    throw new IllegalArgumentException(
056:                            "NegatingPointCutter.<init>: s1 is null");
057:
058:                this .acceptMask = s1.acceptMask;
059:                this .mayFilterStaticallyMask = s1.mayFilterStaticallyMask;
060:                this .canFilterStaticallyMask = s1.canFilterStaticallyMask;
061:                spec1 = s1;
062:            }
063:
064:            /** Returns the inner PointCutter, passed to the constructor. */
065:            public List memberPointFilters() {
066:                Vector result = new Vector();
067:                result.add(spec1);
068:                return result;
069:            }
070:
071:            /** Negates the <code>isSpecialRequest</code> of the member PointFilter
072:             * <em>if the PointFilter is doing static filtering</em>.
073:             *
074:             * @return <code>!r1.isSpecialRequest(r1)</code>, if spec1 is
075:             * doing static filtering (see <code>filterType</code>). If
076:             * spec1 is not doing static filtering, the result is undefined.
077:             */
078:            protected boolean doIsSpecialRequest(JoinPointRequest r1) {
079:                // we get here if and only if we accept this request
080:                // and it is clear that we MAY filter this. Well,
081:                return !spec1.isSpecialRequest(r1);
082:            }
083:
084:            /** Negates the <code>isSpecialEvent</code> of e1.
085:             *
086:             * @return <code>!spec1.isSpecialRequest(e1)</code>, if spec1 is
087:             * doing dynamic filtering (see <code>filterType</code>). If
088:             * spec1 is not doing dynamic filtering, the result is undefined.
089:             *
090:             */
091:            protected boolean doIsSpecialEvent(CodeJoinPoint e1) {
092:                // we get here if we are accepting this event,
093:                // AND we cannot filter statically. The olny
094:                // sensible thing is to ask..
095:                return !spec1.isSpecialEvent(e1);
096:            }
097:
098:            public String toString() {
099:                return "(!" + spec1.toString() + ")";
100:            }
101:
102:        }
103:
104:        //======================================================================
105:        //
106:        // $Log: NegatingPointCutter.java,v $
107:        // Revision 1.3  2003/07/17 13:11:08  apopovic
108:        // refactorization: from PointFilter.memberSpecializers to PointFilter.memberPointFilters;
109:        // improved documentation (removed references to specializers)
110:        //
111:        // Revision 1.2  2003/07/11 12:24:04  apopovic
112:        // Added 'toString' to NegatingSpec
113:        //
114:        // Revision 1.1.1.1  2003/07/02 15:30:52  apopovic
115:        // Imported from ETH Zurich
116:        //
117:        // Revision 1.2  2003/05/06 15:51:40  popovici
118:        // Mozilla-ification
119:        //
120:        // Revision 1.1  2003/05/05 13:57:56  popovici
121:        // renaming from runes to prose
122:        //
123:        // Revision 1.1  2003/04/27 13:08:50  popovici
124:        // Specializers renamed to PointCutter
125:        //
126:        // Revision 1.6  2003/04/17 12:49:35  popovici
127:        // Refactoring of the crosscut package
128:        //  ExceptionCut renamed to ThrowCut
129:        //  McutSignature is now SignaturePattern
130:        //
131:        // Revision 1.5  2003/04/17 08:47:50  popovici
132:        // Important functionality additions
133:        //  - Cflow specializers
134:        //  - Restructuring of the MethodCut, SetCut, ThrowCut, and GetCut (they are much smaller)
135:        //  - Transactional capabilities
136:        //  - Total refactoring of Specializer evaluation, which permits fine-grained distinction
137:        //    between static and dynamic specializers.
138:        //  - Functionality pulled up in abstract classes
139:        //  - Uniformization of advice methods patterns and names
140:        //
141:        // Revision 1.4  2003/03/04 18:24:14  popovici
142:        // Refactoring of the specializer. De-obfuscation
143:        // by exposing the inner classes of the factory methods
144:        // The specializer implementations now end in 'filter',
145:        // whereas the old factory methods 'xxxS' remain
146:        // pure bootstrap objects.
147:        //
148:        // Revision 1.3  2003/03/04 11:27:23  popovici
149:        // Important refactorization step (march):
150:        // - removal of 'JoinPointEvents'; JoinPoints now have the same function as events
151:        // - reimplementation of the JVMAIDebuggerAspectInterface (better performance, coding conventions, removal of ProseVM
152:        //   structures
153:        //
154:        // Revision 1.2  2002/05/28 15:52:55  popovici
155:        // Bug fix. The constructor used the uninitialized spec1 private variable
156:        //
157:        // Revision 1.1  2002/05/07 10:46:58  popovici
158:        // Reorganization of the Specializer package. All specializer related classes
159:        // moved to ch.ethz.inf.crossucut.spec; Classes ORingPointCutter, ANDspecializer and NOTspecializer is
160:        // introduced, the static analysis of filtering simplified, because now specializers
161:        // contain a field 'filterType' which is propagated to the root of composite specializers. junit packages updated accordingly
162:        //
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.