Source Code Cross Referenced for AspectModel.java in  » Aspect-oriented » aspectwerkz-2.0 » org » codehaus » aspectwerkz » transform » inlining » spi » 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 » Aspect oriented » aspectwerkz 2.0 » org.codehaus.aspectwerkz.transform.inlining.spi 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**************************************************************************************
002:         * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved.                 *
003:         * http://aspectwerkz.codehaus.org                                                    *
004:         * ---------------------------------------------------------------------------------- *
005:         * The software in this package is published under the terms of the LGPL license      *
006:         * a copy of which has been included with this distribution in the license.txt file.  *
007:         **************************************************************************************/package org.codehaus.aspectwerkz.transform.inlining.spi;
008:
009:        import org.codehaus.aspectwerkz.reflect.ClassInfo;
010:        import org.codehaus.aspectwerkz.definition.AspectDefinition;
011:        import org.codehaus.aspectwerkz.transform.inlining.AdviceMethodInfo;
012:        import org.codehaus.aspectwerkz.transform.inlining.AspectInfo;
013:        import org.objectweb.asm.CodeVisitor;
014:        import org.objectweb.asm.ClassWriter;
015:
016:        /**
017:         * TODO document
018:         *
019:         * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
020:         */
021:        public interface AspectModel {
022:            /**
023:             * Returns the aspect model type, which is an id for the the special aspect model, can be anything as long
024:             * as it is unique.
025:             *
026:             * @return the aspect model type id
027:             */
028:            String getAspectModelType();
029:
030:            /**
031:             * Defines the aspect and adds definition to the aspect definition.
032:             *
033:             * @param aspectClassInfo
034:             * @param aspectDef
035:             * @param loader
036:             */
037:            void defineAspect(ClassInfo aspectClassInfo,
038:                    AspectDefinition aspectDef, ClassLoader loader);
039:
040:            /**
041:             * Returns info about the closure class, name and type (interface or class).
042:             *
043:             * @return the closure class info
044:             */
045:            AroundClosureClassInfo getAroundClosureClassInfo();
046:
047:            /**
048:             * Creates the methods required to implement or extend to implement the closure for the specific aspect model type.
049:             *
050:             * @param cw
051:             * @param className
052:             */
053:            void createMandatoryMethods(ClassWriter cw, String className);
054:
055:            /**
056:             * Creates invocation of the super class for the around closure.
057:             * <p/>
058:             * E.g. the invocation of super(..) in the constructor.
059:             * <p/>
060:             * Only needed to be implemented if the around closure base class is really a base class and not an interface.
061:             *
062:             * @param cv
063:             */
064:            void createInvocationOfAroundClosureSuperClass(CodeVisitor cv);
065:
066:            /**
067:             * Creates aspect reference field (field in the jit jointpoint class f.e.) for an aspect instance.
068:             *
069:             * @param cw
070:             * @param aspectInfo
071:             * @param joinPointClassName
072:             */
073:            void createAspectReferenceField(ClassWriter cw,
074:                    AspectInfo aspectInfo, String joinPointClassName);
075:
076:            /**
077:             * Creates instantiation of an aspect instance.
078:             *
079:             * @param cv
080:             * @param aspectInfo
081:             * @param joinPointClassName
082:             */
083:            void createAspectInstantiation(CodeVisitor cv,
084:                    AspectInfo aspectInfo, String joinPointClassName);
085:
086:            /**
087:             * Handles the arguments to the around advice.
088:             *
089:             * @param cv
090:             * @param adviceMethodInfo
091:             */
092:            void createAroundAdviceArgumentHandling(CodeVisitor cv,
093:                    AdviceMethodInfo adviceMethodInfo);
094:
095:            /**
096:             * Handles the arguments to the after advice.
097:             *
098:             * @param cv
099:             * @param adviceMethodInfo
100:             */
101:            void createBeforeAdviceArgumentHandling(CodeVisitor cv,
102:                    AdviceMethodInfo adviceMethodInfo);
103:
104:            /**
105:             * Handles the arguments to the after advice.
106:             *
107:             * @param cv
108:             * @param adviceMethodInfo
109:             */
110:            void createAfterAdviceArgumentHandling(CodeVisitor cv,
111:                    AdviceMethodInfo adviceMethodInfo);
112:
113:            /**
114:             * Should return true if the aspect model requires that Runtime Type Information (RTTI) is build up
115:             * for the join point. Needed for reflective systems and systems that does not support f.e. args() binding.
116:             *
117:             * @return
118:             */
119:            boolean requiresReflectiveInfo();
120:
121:            /**
122:             * Info about the around closure class or interface for this specific aspect model.
123:             *
124:             * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
125:             */
126:            public static class AroundClosureClassInfo {
127:                private final String m_super ClassName;
128:                private final String[] m_interfaceNames;
129:
130:                public AroundClosureClassInfo(final String super ClassName,
131:                        final String[] interfaceNames) {
132:                    m_super ClassName = super ClassName;
133:                    m_interfaceNames = interfaceNames;
134:                }
135:
136:                public String getSuperClassName() {
137:                    return m_super ClassName;
138:                }
139:
140:                public String[] getInterfaceNames() {
141:                    return m_interfaceNames;
142:                }
143:
144:                /**
145:                 * Type safe enum for the around closure class type.
146:                 */
147:                public static class Type {
148:                    public static final Type INTERFACE = new Type("INTERFACE");
149:                    public static final Type CLASS = new Type("CLASS");
150:                    private final String m_name;
151:
152:                    private Type(String name) {
153:                        m_name = name;
154:                    }
155:
156:                    public String toString() {
157:                        return m_name;
158:                    }
159:                }
160:
161:            }
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.