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


001:        // $Id: CrosscutSurrogate.java,v 1.1.1.1 2003/07/02 15:30:52 apopovic Exp $
002:        // =====================================================================
003:        //
004:        // (history at end)
005:        //
006:
007:        package ch.ethz.prose.query;
008:
009:        // used packages
010:        import java.util.List;
011:        import ch.ethz.prose.crosscut.Crosscut;
012:
013:        /**
014:         * Class CrosscutSurrogate represents a <code>Class</code> object without the need
015:         * that the classe's byte-code is available in the current virtual machine.
016:         *
017:         * @version	$Revision: 1.1.1.1 $
018:         * @author	Andrei Popovici
019:         */
020:        public class CrosscutSurrogate implements  java.io.Serializable {
021:
022:            /**
023:             * Serial Version Unique Identifier, used as identifier when serializing
024:             * this class. A static final definition like this gains a speed up at
025:             * when serializing the class. 
026:             */
027:            private static final long serialVersionUID = 3618696392269575216L;
028:
029:            AspectSurrogate ownerSurrogate;
030:            int index;
031:            String crosscutClassName;
032:            String initialToString;
033:
034:            /**
035:             * Creates a CrosscutSurrogate
036:             * @param as surrogate for the aspect defining this crosscut
037:             * @param crsc the real crosscut
038:             */
039:            public CrosscutSurrogate(AspectSurrogate as, Crosscut crsc) {
040:                if (as == null || crsc == null)
041:                    throw new IllegalArgumentException(
042:                            "CrosscutSurrogate.init: NULL argument");
043:
044:                ownerSurrogate = as;
045:                crosscutClassName = crsc.getClass().getName();
046:                try {
047:                    List crosscuts = crsc.getOwner().getCrosscuts();
048:                    index = crosscuts.indexOf(crsc);
049:                } catch (NullPointerException e) {
050:                    index = -1;
051:                }
052:                initialToString = crsc.toString();
053:            }
054:
055:            public AspectSurrogate getOwnerSurrogate() {
056:                return ownerSurrogate;
057:            }
058:
059:            public String getCrosscutClassName() {
060:                return crosscutClassName;
061:            }
062:
063:            public int getIndex() {
064:                return index;
065:            }
066:
067:            /**
068:             * Indicates whether some other object is "equal to" this one. The
069:             * result is <code>true</code> if and only if <code>obj</code> is
070:             * not <code>null</code> and is a instance of
071:             * <code>CrosscutSurrogate</code> and has equal contents as this
072:             * object.
073:             * @param obj	other object with which to compare
074:             * @return <code>true</code> iff <code>obj</code> is equal to this
075:             * <code>CrosscutSurrogate</code>
076:             */
077:            public boolean equals(Object obj) {
078:                return obj instanceof  CrosscutSurrogate
079:                        && ownerSurrogate
080:                                .equals(((CrosscutSurrogate) obj).ownerSurrogate)
081:                        && index == ((CrosscutSurrogate) obj).index;
082:            }
083:
084:            /**
085:             * Returns a hashcode for this object.
086:             * @return	hashcode value
087:             */
088:            public int hashCode() {
089:                return ownerSurrogate.hashCode() + index;
090:            }
091:
092:            public String toString() {
093:                return initialToString;
094:            }
095:
096:        }
097:
098:        //======================================================================
099:        //
100:        // $Log: CrosscutSurrogate.java,v $
101:        // Revision 1.1.1.1  2003/07/02 15:30:52  apopovic
102:        // Imported from ETH Zurich
103:        //
104:        // Revision 1.1  2003/05/20 16:05:07  popovici
105:        //
106:        // New QueryManager replaces functionality in AspectManager (better Soc)
107:        // New 'Surrogate' classes for usage in the QueryManager
108:        // The 'RemoteAspectManager' and tools modified to use the Surrogates and the QueryManager
109:        //
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.