Source Code Cross Referenced for AdviceInfoContainer.java in  » Net » Terracotta » com » tc » aspectwerkz » joinpoint » management » 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 » Net » Terracotta » com.tc.aspectwerkz.joinpoint.management 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice.  All rights reserved.
003:         */
004:        package com.tc.aspectwerkz.joinpoint.management;
005:
006:        import java.util.List;
007:        import java.util.ArrayList;
008:
009:        import com.tc.aspectwerkz.aspect.AdviceInfo;
010:
011:        /**
012:         * Container for the advice infos that belongs to a specific join point.
013:         *
014:         * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
015:         * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
016:         */
017:        public class AdviceInfoContainer {
018:
019:            /**
020:             * Null AdviceInfoContainer instance
021:             */
022:            public static final AdviceInfoContainer NULL;
023:
024:            static {
025:                NULL = new AdviceInfoContainer(new ArrayList(),
026:                        new ArrayList(), new ArrayList(), new ArrayList(),
027:                        new ArrayList());
028:            }
029:
030:            private final AdviceInfo[] m_aroundAdvices;
031:            private final AdviceInfo[] m_beforeAdvices;
032:            private final AdviceInfo[] m_afterFinallyAdvices;
033:            private final AdviceInfo[] m_afterReturningAdvices;
034:            private final AdviceInfo[] m_afterThrowingAdvices;
035:
036:            /**
037:             * Creates a advice info container.
038:             *
039:             * @param aroundAdvices
040:             * @param beforeAdvices
041:             * @param afterFinallyAdvices
042:             * @param afterReturningAdvices
043:             * @param afterThrowingAdvices
044:             */
045:            public AdviceInfoContainer(final List aroundAdvices,
046:                    final List beforeAdvices, final List afterFinallyAdvices,
047:                    final List afterReturningAdvices,
048:                    final List afterThrowingAdvices) {
049:                m_aroundAdvices = (AdviceInfo[]) aroundAdvices
050:                        .toArray(AdviceInfo.EMPTY_ADVICE_INFO_ARRAY);
051:                m_beforeAdvices = (AdviceInfo[]) beforeAdvices
052:                        .toArray(AdviceInfo.EMPTY_ADVICE_INFO_ARRAY);
053:                m_afterFinallyAdvices = (AdviceInfo[]) afterFinallyAdvices
054:                        .toArray(AdviceInfo.EMPTY_ADVICE_INFO_ARRAY);
055:                m_afterReturningAdvices = (AdviceInfo[]) afterReturningAdvices
056:                        .toArray(AdviceInfo.EMPTY_ADVICE_INFO_ARRAY);
057:                m_afterThrowingAdvices = (AdviceInfo[]) afterThrowingAdvices
058:                        .toArray(AdviceInfo.EMPTY_ADVICE_INFO_ARRAY);
059:            }
060:
061:            /**
062:             * Returns the around advice infos.
063:             *
064:             * @return
065:             */
066:            public AdviceInfo[] getAroundAdviceInfos() {
067:                return m_aroundAdvices;
068:            }
069:
070:            /**
071:             * Returns the before advice infos.
072:             *
073:             * @return
074:             */
075:            public AdviceInfo[] getBeforeAdviceInfos() {
076:                return m_beforeAdvices;
077:            }
078:
079:            /**
080:             * Returns the after finally advice infos.
081:             *
082:             * @return
083:             */
084:            public AdviceInfo[] getAfterFinallyAdviceInfos() {
085:                return m_afterFinallyAdvices;
086:            }
087:
088:            /**
089:             * Returns the after returning advice infos.
090:             *
091:             * @return
092:             */
093:            public AdviceInfo[] getAfterReturningAdviceInfos() {
094:                return m_afterReturningAdvices;
095:            }
096:
097:            /**
098:             * Returns the after throwing advice infos.
099:             *
100:             * @return
101:             */
102:            public AdviceInfo[] getAfterThrowingAdviceInfos() {
103:                return m_afterThrowingAdvices;
104:            }
105:
106:            /**
107:             * Return all advice infos.
108:             *
109:             * @return
110:             */
111:            public AdviceInfo[] getAllAdviceInfos() {
112:                int size = m_beforeAdvices.length + m_aroundAdvices.length
113:                        + m_afterReturningAdvices.length
114:                        + m_afterThrowingAdvices.length
115:                        + m_afterFinallyAdvices.length;
116:                AdviceInfo[] advices = new AdviceInfo[size];
117:
118:                int destPos = 0;
119:                System.arraycopy(m_beforeAdvices, 0, advices, destPos,
120:                        m_beforeAdvices.length);
121:                destPos += m_beforeAdvices.length;
122:                System.arraycopy(m_aroundAdvices, 0, advices, destPos,
123:                        m_aroundAdvices.length);
124:                destPos += m_aroundAdvices.length;
125:                System.arraycopy(m_afterReturningAdvices, 0, advices, destPos,
126:                        m_afterReturningAdvices.length);
127:                destPos += m_afterReturningAdvices.length;
128:                System.arraycopy(m_afterThrowingAdvices, 0, advices, destPos,
129:                        m_afterThrowingAdvices.length);
130:                destPos += m_afterThrowingAdvices.length;
131:                System.arraycopy(m_afterFinallyAdvices, 0, advices, destPos,
132:                        m_afterFinallyAdvices.length);
133:                destPos += m_afterFinallyAdvices.length;
134:
135:                return advices;
136:            }
137:
138:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.