Source Code Cross Referenced for MethodArgumentsTest.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 Referenced  Class Diagram Java Document (Java Doc) 


001:        //$Id$
002:        //=====================================================================
003:        //
004:        //(history at end)
005:        //
006:
007:        package ch.ethz.prose.crosscut;
008:
009:        import junit.framework.TestCase;
010:        import ch.ethz.prose.*;
011:        import ch.ethz.prose.filter.*;
012:
013:        /**
014:         * Cross-cut methods with different arguments.
015:         * 
016:         * @version $Revision$
017:         * @author Johann Gyger
018:         */
019:        public class MethodArgumentsTest extends TestCase {
020:
021:            protected static boolean crosscutted;
022:
023:            public MethodArgumentsTest(String name) {
024:                super (name);
025:            }
026:
027:            protected void setUp() throws SystemStartupException {
028:                ProseSystem.startup();
029:            }
030:
031:            protected void tearDown() throws SystemTeardownException {
032:                ProseSystem.teardown();
033:            }
034:
035:            public void myMethod() {
036:            }
037:
038:            public void myMethodByte(byte arg1, byte arg2) {
039:            }
040:
041:            public void myMethodShort(short arg1, short arg2) {
042:            }
043:
044:            public void myMethodInt(int arg1, int arg2) {
045:            }
046:
047:            public void myMethodLong(long arg1, long arg2) {
048:            }
049:
050:            public void myMethodFloat(float arg1, float arg2) {
051:            }
052:
053:            public void myMethodDouble(double arg1, double arg2) {
054:            }
055:
056:            public void myMethodReference(Object arg1, Object arg2) {
057:            }
058:
059:            public void myMethodMixed(byte arg1, short arg2, int arg3,
060:                    long arg4, float arg5, double arg6, Object arg7, byte arg8,
061:                    short arg9, int arg10, long arg11, float arg12,
062:                    double arg13, Object arg14) {
063:            }
064:
065:            public void test_010_interface() {
066:                ProseSystem.getAspectManager().insert(new MethodAspect());
067:                MyInterface mi = new MyClass();
068:
069:                crosscutted = false;
070:                myMethod();
071:                assertTrue("Method invocation is cross-cutted (empty)",
072:                        crosscutted);
073:
074:                crosscutted = false;
075:                byte b = 0;
076:                myMethodByte(b, b);
077:                assertTrue("Method invocation is cross-cutted (byte)",
078:                        crosscutted);
079:
080:                crosscutted = false;
081:                short s = 0;
082:                myMethodShort(s, s);
083:                assertTrue("Method invocation is cross-cutted (short)",
084:                        crosscutted);
085:
086:                crosscutted = false;
087:                myMethodInt(0, 0);
088:                assertTrue("Method invocation is cross-cutted (int)",
089:                        crosscutted);
090:
091:                crosscutted = false;
092:                myMethodLong(0, 0);
093:                assertTrue("Method invocation is cross-cutted (long)",
094:                        crosscutted);
095:
096:                crosscutted = false;
097:                myMethodFloat(0, 0);
098:                assertTrue("Method invocation is cross-cutted (float)",
099:                        crosscutted);
100:
101:                crosscutted = false;
102:                myMethodDouble(0, 0);
103:                assertTrue("Method invocation is cross-cutted (double)",
104:                        crosscutted);
105:
106:                crosscutted = false;
107:                myMethodReference(null, null);
108:                assertTrue("Method invocation is cross-cutted (ref)",
109:                        crosscutted);
110:
111:                crosscutted = false;
112:                myMethodMixed(b, s, 0, 0, 0, 0, null, b, s, 0, 0, 0, 0, null);
113:                assertTrue("Method invocation is cross-cutted (mixed)",
114:                        crosscutted);
115:            }
116:
117:            public interface MyInterface {
118:                public void myMethod();
119:            }
120:
121:            public class MyClass implements  MyInterface {
122:                public void myMethod() {
123:                };
124:            }
125:
126:            public class MethodAspect extends DefaultAspect {
127:                public Crosscut c = new MethodCut() {
128:                    public void METHOD_ARGS(MethodArgumentsTest c, REST r) {
129:                        crosscutted = true;
130:                    }
131:
132:                    protected PointCutter pointCutter() {
133:                        return Within.method("myMethod.*").AND(
134:                                Executions.before());
135:                    }
136:
137:                    protected Class[] potentialCrosscutClasses() {
138:                        return new Class[] { MethodArgumentsTest.class };
139:                    }
140:                };
141:            };
142:        }
143:
144:        //======================================================================
145:        //
146:        // $Log$
147:        //
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.