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


001:        /*
002:         * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
003:         * notice. All rights reserved.
004:         */
005:        package com.tc.object.appevent;
006:
007:        import com.tc.util.NonPortableReason;
008:
009:        import java.io.Serializable;
010:        import java.util.ArrayList;
011:        import java.util.List;
012:
013:        /**
014:         * Represents an object in the object graph held in a non-portable event context.
015:         */
016:        public class NonPortableObjectState implements  Serializable {
017:            private String label, fieldName, typeName;
018:            private boolean isPortable, isTransient, neverPortable,
019:                    isPreInstrumented, isRepeated, isSystemType, isNull;
020:            private String explaination;
021:            private NonPortableReason nonPortableReason;
022:            private List requiredBootTypes;
023:            private List requiredIncludeTypes;
024:
025:            /**
026:             * Construct with all default values.
027:             */
028:            public NonPortableObjectState() {
029:                this (null, null, null, false, false, false, false, false,
030:                        false, false);
031:            }
032:
033:            /**
034:             * Construct with all values
035:             * @param label Label
036:             * @param fieldName Field name
037:             * @param typeName Type name
038:             * @param isPortable Portable flag
039:             * @param isTransient Transient flag
040:             * @param neverPortable Never portable flag
041:             * @param isPreInstrumented Is pre-instrumented flag
042:             * @param isRepeated Is repeated  flag
043:             * @param isSystemType Is system type
044:             * @param isNull Is null
045:             */
046:            public NonPortableObjectState(String label, String fieldName,
047:                    String typeName, boolean isPortable, boolean isTransient,
048:                    boolean neverPortable, boolean isPreInstrumented,
049:                    boolean isRepeated, boolean isSystemType, boolean isNull) {
050:                this .label = label;
051:                this .fieldName = fieldName;
052:                this .typeName = typeName;
053:                this .isPortable = isPortable;
054:                this .isTransient = isTransient;
055:                this .neverPortable = neverPortable;
056:                this .isPreInstrumented = isPreInstrumented;
057:                this .isRepeated = isRepeated;
058:                this .isSystemType = isSystemType;
059:                this .isNull = isNull;
060:            }
061:
062:            /**
063:             * Set explanation
064:             * @param explaination Explanation
065:             */
066:            public void setExplaination(String explaination) {
067:                this .explaination = explaination;
068:            }
069:
070:            /**
071:             * @return Explanation
072:             */
073:            public String getExplaination() {
074:                return this .explaination;
075:            }
076:
077:            /**
078:             * Set reason why this object is non portable
079:             * @param nonPortableReason The reason
080:             */
081:            public void setNonPortableReason(NonPortableReason nonPortableReason) {
082:                this .nonPortableReason = nonPortableReason;
083:                requiredBootTypes = new ArrayList(nonPortableReason
084:                        .getErroneousBootJarSuperClasses());
085:                if (isRequiredBootJarType()) {
086:                    requiredBootTypes.add(getTypeName());
087:                }
088:                requiredIncludeTypes = new ArrayList(nonPortableReason
089:                        .getErroneousSuperClasses());
090:                if (isRequiredIncludeType()) {
091:                    requiredIncludeTypes.add(getTypeName());
092:                }
093:            }
094:
095:            /**
096:             * @return Reason why this object is non portable
097:             */
098:            public NonPortableReason getNonPortableReason() {
099:                return this .nonPortableReason;
100:            }
101:
102:            /**
103:             * @return Label
104:             */
105:            public String getLabel() {
106:                return this .label;
107:            }
108:
109:            /**
110:             * @param label label
111:             */
112:            public void setLabel(String label) {
113:                this .label = label;
114:            }
115:
116:            /**
117:             * @return Field name 
118:             */
119:            public String getFieldName() {
120:                return this .fieldName;
121:            }
122:
123:            /**
124:             * @poram fieldName Field name
125:             */
126:            public void setFieldName(String fieldName) {
127:                this .fieldName = fieldName;
128:            }
129:
130:            /**
131:             * Get type name for this node's state
132:             */
133:            public String getTypeName() {
134:                return this .typeName;
135:            }
136:
137:            public String toString() {
138:                return getLabel();
139:            }
140:
141:            /**
142:             * @return True if portable
143:             */
144:            public boolean isPortable() {
145:                return this .isPortable;
146:            }
147:
148:            /**
149:             * @return True if this is transient
150:             */
151:            public boolean isTransient() {
152:                return this .isTransient;
153:            }
154:
155:            /**
156:             * @return True if this type is never portable
157:             */
158:            public boolean isNeverPortable() {
159:                return this .neverPortable;
160:            }
161:
162:            /**
163:             * @return True if this is pre-instrumented
164:             */
165:            public boolean isPreInstrumented() {
166:                return this .isPreInstrumented;
167:            }
168:
169:            /**
170:             * @return True if this is a system type
171:             */
172:            public boolean isSystemType() {
173:                return this .isSystemType;
174:            }
175:
176:            /**
177:             * @return True if repeated 
178:             */
179:            public boolean isRepeated() {
180:                return this .isRepeated;
181:            }
182:
183:            /**
184:             * @return True if null
185:             */
186:            public boolean isNull() {
187:                return this .isNull;
188:            }
189:
190:            /**
191:             * @return List of types that should be included in the boot jar
192:             */
193:            public List getRequiredBootTypes() {
194:                return requiredBootTypes;
195:            }
196:
197:            /**
198:             * @return List of types that should be included in the config
199:             */
200:            public List getRequiredIncludeTypes() {
201:                return requiredIncludeTypes;
202:            }
203:
204:            /**
205:             * @return List of all super classes that are non-portable objects
206:             */
207:            public List getNonPortableBaseTypes() {
208:                return nonPortableReason != null ? nonPortableReason
209:                        .getErroneousSuperClasses() : null;
210:            }
211:
212:            /**
213:             * @return True if class extends a logically managed type
214:             */
215:            public boolean extendsLogicallyManagedType() {
216:                if (nonPortableReason != null) {
217:                    return nonPortableReason.getReason() == NonPortableReason.SUBCLASS_OF_LOGICALLY_MANAGED_CLASS;
218:                }
219:                return false;
220:            }
221:
222:            /**
223:             * @return True if class is required in boot jar
224:             */
225:            public boolean isRequiredBootJarType() {
226:                if (nonPortableReason != null) {
227:                    return nonPortableReason.getReason() == NonPortableReason.CLASS_NOT_IN_BOOT_JAR;
228:                }
229:                return false;
230:            }
231:
232:            /**
233:             * @return True if class was not included in the config
234:             */
235:            public boolean isRequiredIncludeType() {
236:                if (nonPortableReason != null) {
237:                    return nonPortableReason.getReason() == NonPortableReason.CLASS_NOT_INCLUDED_IN_CONFIG;
238:                }
239:                return false;
240:            }
241:
242:            /**
243:             * @return Get summary of this node's state
244:             */
245:            public String summary() {
246:                StringBuffer sb = new StringBuffer();
247:                String l = getLabel();
248:
249:                if (l == null)
250:                    return "NonPortableTreeRoot";
251:                sb.append(l);
252:                if (isNeverPortable()) {
253:                    sb.append(" Never portable");
254:                } else {
255:                    sb.append(isPortable() ? " portable" : " not portable");
256:                }
257:                if (isTransient()) {
258:                    sb.append(", transient");
259:                }
260:                if (isPreInstrumented()) {
261:                    sb.append(", pre-instrumented");
262:                }
263:                if (isRepeated()) {
264:                    sb.append(", repeated");
265:                }
266:                if (isSystemType()) {
267:                    sb.append(", system type");
268:                }
269:
270:                return sb.toString();
271:            }
272:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.