Source Code Cross Referenced for ClassDescription.java in  » Graphic-Library » jcommon-components » org » jfree » xml » generator » model » 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 » Graphic Library » jcommon components » org.jfree.xml.generator.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* ========================================================================
002:         * JCommon : a free general purpose class library for the Java(tm) platform
003:         * ========================================================================
004:         *
005:         * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
006:         * 
007:         * Project Info:  http://www.jfree.org/jcommon/index.html
008:         *
009:         * This library is free software; you can redistribute it and/or modify it 
010:         * under the terms of the GNU Lesser General Public License as published by 
011:         * the Free Software Foundation; either version 2.1 of the License, or 
012:         * (at your option) any later version.
013:         *
014:         * This library is distributed in the hope that it will be useful, but 
015:         * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
016:         * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
017:         * License for more details.
018:         *
019:         * You should have received a copy of the GNU Lesser General Public
020:         * License along with this library; if not, write to the Free Software
021:         * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
022:         * USA.  
023:         *
024:         * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
025:         * in the United States and other countries.]
026:         * 
027:         * ---------------------
028:         * ClassDescription.java
029:         * ---------------------
030:         * (C)opyright 2003, 2004, by Thomas Morgner and Contributors.
031:         *
032:         * Original Author:  Thomas Morgner;
033:         * Contributor(s):   David Gilbert (for Object Refinery Limited);
034:         *
035:         * $Id: ClassDescription.java,v 1.2 2005/10/18 13:32:37 mungady Exp $
036:         *
037:         * Changes
038:         * -------
039:         * 21-Jun-2003 : Initial version (TM);
040:         * 26-Nov-2003 : Updated header and Javadocs (DG);
041:         * 
042:         */
043:
044:        package org.jfree.xml.generator.model;
045:
046:        /**
047:         * A description of a Java class.
048:         */
049:        public class ClassDescription {
050:
051:            /** Storage for info about properties. */
052:            private PropertyInfo[] properties;
053:
054:            /** Constructor descriptions. */
055:            private TypeInfo[] constructorDescription;
056:
057:            /** The class. */
058:            private Class objectClass;
059:
060:            /** A description. */
061:            private String description;
062:
063:            /** The register key. */
064:            private String registerKey;
065:
066:            /** The super class. */
067:            private Class super Class;
068:
069:            /** ??. */
070:            private boolean preserve;
071:
072:            /** The comments. */
073:            private Comments comments;
074:
075:            /** The source. */
076:            private String source;
077:
078:            /**
079:             * Creates a new class description.
080:             * 
081:             * @param objectClass  the class.
082:             */
083:            public ClassDescription(final Class objectClass) {
084:                if (objectClass == null) {
085:                    throw new NullPointerException();
086:                }
087:                this .objectClass = objectClass;
088:            }
089:
090:            /**
091:             * Returns the info about properties.
092:             * 
093:             * @return the info about properties.
094:             */
095:            public PropertyInfo[] getProperties() {
096:                return this .properties;
097:            }
098:
099:            /**
100:             * Sets the info about the class properties.
101:             * 
102:             * @param properties  the properties.
103:             */
104:            public void setProperties(final PropertyInfo[] properties) {
105:                this .properties = properties;
106:            }
107:
108:            /**
109:             * Returns the object's class.
110:             * 
111:             * @return the object's class.
112:             */
113:            public Class getObjectClass() {
114:                return this .objectClass;
115:            }
116:
117:            /**
118:             * Returns the description.
119:             * 
120:             * @return the description.
121:             */
122:            public String getDescription() {
123:                return this .description;
124:            }
125:
126:            /**
127:             * Sets the description for the object.
128:             * 
129:             * @param description  the description.
130:             */
131:            public void setDescription(final String description) {
132:                this .description = description;
133:            }
134:
135:            /**
136:             * Returns the class name.
137:             * 
138:             * @return the class name.
139:             */
140:            public String getName() {
141:                if (getObjectClass() == null) {
142:                    return null;
143:                }
144:                return getObjectClass().getName();
145:            }
146:
147:            /**
148:             * Returns the super class.
149:             * 
150:             * @return the super class.
151:             */
152:            public Class getSuperClass() {
153:                return this .super Class;
154:            }
155:
156:            /**
157:             * Sets the super class.
158:             * 
159:             * @param superClass  the super class.
160:             */
161:            public void setSuperClass(final Class super Class) {
162:                this .super Class = super Class;
163:            }
164:
165:            /**
166:             * Returns the preserve flag.
167:             * 
168:             * @return a boolean.
169:             */
170:            public boolean isPreserve() {
171:                return this .preserve;
172:            }
173:
174:            /**
175:             * Sets the preserve flag.
176:             * 
177:             * @param preserve  the new value of the flag.
178:             */
179:            public void setPreserve(final boolean preserve) {
180:                this .preserve = preserve;
181:            }
182:
183:            /**
184:             * Returns the register key.
185:             * 
186:             * @return the register key.
187:             */
188:            public String getRegisterKey() {
189:                return this .registerKey;
190:            }
191:
192:            /**
193:             * Sets the register key.
194:             * 
195:             * @param registerKey the register key.
196:             */
197:            public void setRegisterKey(final String registerKey) {
198:                this .registerKey = registerKey;
199:            }
200:
201:            /**
202:             * Returns the constructor descriptions.
203:             * 
204:             * @return the constructor descriptions.
205:             */
206:            public TypeInfo[] getConstructorDescription() {
207:                return this .constructorDescription;
208:            }
209:
210:            /**
211:             * Sets the constructor description.
212:             * 
213:             * @param constructorDescription  the constructor description.
214:             */
215:            public void setConstructorDescription(
216:                    final TypeInfo[] constructorDescription) {
217:                this .constructorDescription = constructorDescription;
218:            }
219:
220:            /**
221:             * Returns a property.
222:             * 
223:             * @param name  the property name.
224:             * 
225:             * @return a property.
226:             */
227:            public PropertyInfo getProperty(final String name) {
228:                if (this .properties == null) {
229:                    return null;
230:                }
231:                for (int i = 0; i < this .properties.length; i++) {
232:                    if (this .properties[i].getName().equals(name)) {
233:                        return this .properties[i];
234:                    }
235:                }
236:                return null;
237:            }
238:
239:            /**
240:             * Returns <code>true</code> if the description is undefined.
241:             * 
242:             * @return a boolean.
243:             */
244:            public boolean isUndefined() {
245:                if (this .properties != null) {
246:                    if (this .properties.length > 0) {
247:                        return false;
248:                    }
249:                }
250:                if (isPreserve()) {
251:                    return false;
252:                }
253:                if (getRegisterKey() != null) {
254:                    return false;
255:                }
256:                if (getConstructorDescription() != null) {
257:                    if (getConstructorDescription().length > 0) {
258:                        return false;
259:                    }
260:                }
261:                return true;
262:            }
263:
264:            /**
265:             * Returns the comments for the class description.
266:             * 
267:             * @return The comments.
268:             */
269:            public Comments getComments() {
270:                return this .comments;
271:            }
272:
273:            /**
274:             * Sets the comments for the class description.
275:             * 
276:             * @param comments  the comments.
277:             */
278:            public void setComments(final Comments comments) {
279:                this .comments = comments;
280:            }
281:
282:            /**
283:             * Returns the source for the class description.
284:             * 
285:             * @return The source.
286:             */
287:            public String getSource() {
288:                return this .source;
289:            }
290:
291:            /**
292:             * Sets the source for the class description.
293:             * 
294:             * @param source  the source.
295:             */
296:            public void setSource(final String source) {
297:                this.source = source;
298:            }
299:
300:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.