Source Code Cross Referenced for AttributeDef.java in  » Collaboration » JacORB » org » jacorb » ir » 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 » Collaboration » JacORB » org.jacorb.ir 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *        JacORB - a free Java ORB
003:         *
004:         *   Copyright (C) 1997-2004 Gerald Brose.
005:         *
006:         *   This library is free software; you can redistribute it and/or
007:         *   modify it under the terms of the GNU Library General Public
008:         *   License as published by the Free Software Foundation; either
009:         *   version 2 of the License, or (at your option) 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:         *   Library General Public License for more details.
015:         *
016:         *   You should have received a copy of the GNU Library General Public
017:         *   License along with this library; if not, write to the Free
018:         *   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
019:         */
020:
021:        package org.jacorb.ir;
022:
023:        import java.lang.reflect.*;
024:        import java.util.*;
025:
026:        import org.omg.CORBA.INTF_REPOS;
027:        import org.omg.CORBA.TypeCode;
028:        import org.omg.PortableServer.POA;
029:
030:        import org.apache.avalon.framework.logger.Logger;
031:
032:        public class AttributeDef extends Contained implements 
033:                org.omg.CORBA.AttributeDefOperations {
034:            private org.omg.CORBA.TypeCode typeCode = null;
035:            private org.omg.CORBA.IDLType type_def = null;
036:            private org.omg.CORBA.AttributeMode mode = null;
037:            private Method method = null;
038:            private boolean defined = false;
039:            private Logger logger;
040:            private POA poa;
041:
042:            public AttributeDef(java.lang.reflect.Method m,
043:                    String attrTypeName, org.omg.CORBA.AttributeMode mode,
044:                    org.omg.CORBA.Container _defined_in,
045:                    org.omg.CORBA.Repository _containing_repository,
046:                    Logger logger, ClassLoader loader, POA poa) {
047:                this .logger = logger;
048:                this .poa = poa;
049:                def_kind = org.omg.CORBA.DefinitionKind.dk_Attribute;
050:                method = m;
051:                this .mode = mode;
052:                name(m.getName());
053:                version("1.0");
054:
055:                try {
056:                    typeCode = TypeCodeUtil.getTypeCode(m.getReturnType(),
057:                            loader, null, attrTypeName, this .logger);
058:                } catch (ClassNotFoundException cnfe) {
059:                    this .logger
060:                            .error(
061:                                    "Error: TypeCode for AttributeDef  could not be created!",
062:                                    cnfe);
063:                }
064:
065:                defined_in = _defined_in;
066:                containing_repository = _containing_repository;
067:
068:                if (containing_repository == null) {
069:                    throw new INTF_REPOS("containing_repository null");
070:                }
071:                if (defined_in == null) {
072:                    throw new INTF_REPOS("defined_in null");
073:                }
074:
075:                org.omg.CORBA.Contained myContainer = org.omg.CORBA.ContainedHelper
076:                        .narrow(defined_in);
077:                String interface_id = myContainer.id();
078:
079:                id = interface_id.substring(interface_id.lastIndexOf(':') - 1)
080:                        + name() + ":" + version();
081:                absolute_name = myContainer.absolute_name() + "::" + name();
082:
083:                if (this .logger.isDebugEnabled()) {
084:                    this .logger.debug("New AttributeDef, name: " + name() + " "
085:                            + absolute_name);
086:                }
087:            }
088:
089:            public org.omg.CORBA.TypeCode type() {
090:                return typeCode;
091:            }
092:
093:            public org.omg.CORBA.IDLType type_def() {
094:                return type_def;
095:            }
096:
097:            public void type_def(org.omg.CORBA.IDLType a) {
098:                if (defined == false) {
099:                    throw new INTF_REPOS("Attribute not defined");
100:                }
101:                type_def = a;
102:            }
103:
104:            public org.omg.CORBA.AttributeMode mode() {
105:                return mode;
106:            }
107:
108:            public void mode(org.omg.CORBA.AttributeMode a) {
109:                mode = a;
110:            }
111:
112:            org.omg.CORBA.AttributeDescription describe_attribute() {
113:                return new org.omg.CORBA.AttributeDescription(name(), id(),
114:                        org.omg.CORBA.ContainedHelper.narrow(defined_in).id(),
115:                        version(), type(), mode());
116:            }
117:
118:            public void define() {
119:                type_def = IDLType.create(typeCode, containing_repository,
120:                        this .logger, this .poa);
121:                defined = true;
122:            }
123:
124:            // from Contained
125:
126:            public org.omg.CORBA.ContainedPackage.Description describe() {
127:                org.omg.CORBA.Any a = orb.create_any();
128:                org.omg.CORBA.AttributeDescriptionHelper.insert(a,
129:                        describe_attribute());
130:                return new org.omg.CORBA.ContainedPackage.Description(
131:                        org.omg.CORBA.DefinitionKind.dk_Attribute, a);
132:            }
133:
134:            // from IRObject
135:
136:            public void destroy() {
137:            }
138:
139:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.