Source Code Cross Referenced for JClassInterceptor.java in  » Testing » Ejb3Unit » com » bm » ejb3metadata » annotations » 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 » Testing » Ejb3Unit » com.bm.ejb3metadata.annotations 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * EasyBeans
003:         * Copyright (C) 2006 Bull S.A.S.
004:         * Contact: easybeans@objectweb.org
005:         *
006:         * This library is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation; either
009:         * version 2.1 of the License, or any later version.
010:         *
011:         * This library is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         * Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public
017:         * License along with this library; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
019:         * USA
020:         *
021:         * --------------------------------------------------------------------------
022:         * $Id: JClassInterceptor.java 841 2006-07-12 09:03:06Z benoitf $
023:         * --------------------------------------------------------------------------
024:         */package com.bm.ejb3metadata.annotations;
025:
026:        /**
027:         * This class defines a Bean interceptor with the name of the class and the
028:         * method which is the interceptor.
029:         * @author Florent Benoit
030:         */
031:        public class JClassInterceptor {
032:
033:            /**
034:             * String name of the class (internal name) where is the interceptor.
035:             */
036:            private String className = null;
037:
038:            /**
039:             * Method with @{@link javax.interceptor.AroundInvoke} annotation.
040:             */
041:            private JMethod jMethod = null;
042:
043:            /**
044:             * NO ID.
045:             */
046:            private static final int NO_ID = -1;
047:
048:            /**
049:             * Id of this interceptor (0 = no id).
050:             */
051:            private int id = NO_ID;
052:
053:            /**
054:             * Constructor.
055:             * @param className String name of the class (internal name).
056:             * @param jMethod the method with aroundInvoke annotation.
057:             * @param id the id of this interceptor
058:             */
059:            public JClassInterceptor(final String className,
060:                    final JMethod jMethod, final int id) {
061:                this .className = className;
062:                this .jMethod = jMethod;
063:                this .id = id;
064:            }
065:
066:            /**
067:             * Constructor.
068:             * @param className String name of the class (internal name).
069:             * @param jMethod the method with aroundInvoke annotation.
070:             */
071:            public JClassInterceptor(final String className,
072:                    final JMethod jMethod) {
073:                this (className, jMethod, NO_ID);
074:            }
075:
076:            /**
077:             * (internal name) where is the interceptor.
078:             * @return class (internal name) where is the interceptor.
079:             */
080:            public String getClassName() {
081:                return className;
082:            }
083:
084:            /**
085:             * Method with @{@link javax.interceptor.AroundInvoke} annotation.
086:             * @return Method with @{@link javax.interceptor.AroundInvoke} annotation
087:             */
088:            public JMethod getJMethod() {
089:                return jMethod;
090:            }
091:
092:            /**
093:             * Equals method.
094:             * @param another object to compare.
095:             * @return true if the objects are the same.
096:             */
097:            @Override
098:            public boolean equals(final Object another) {
099:                if (!(another instanceof  JClassInterceptor)) {
100:                    return false;
101:                }
102:                JClassInterceptor anotherItcp = (JClassInterceptor) another;
103:                if (id == NO_ID) {
104:                    return (anotherItcp.className.equals(className) && anotherItcp.jMethod
105:                            .equals(jMethod));
106:                }
107:                return (anotherItcp.className.equals(className)
108:                        && anotherItcp.jMethod.equals(jMethod) && anotherItcp.id == id);
109:            }
110:
111:            /**
112:             * {@inheritDoc}
113:             */
114:            @Override
115:            public int hashCode() {
116:                return className.hashCode() + jMethod.hashCode();
117:            }
118:
119:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.