Source Code Cross Referenced for TCClass.java in  » Net » Terracotta » com » tc » object » 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 
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.object;
005:
006:        import com.tc.object.dna.api.DNA;
007:        import com.tc.object.dna.api.DNAWriter;
008:        import com.tc.object.field.TCField;
009:        import com.tc.object.tx.optimistic.OptimisticTransactionManager;
010:
011:        import java.io.IOException;
012:        import java.lang.reflect.Constructor;
013:        import java.lang.reflect.Field;
014:        import java.util.Map;
015:
016:        /**
017:         * Interface for peer to java.lang.Class. The Class of every object under management is represented by an instance of
018:         * TCClass. Keeping a peer of each Class object allows us to organize the class elements in useful ways and to cache
019:         * that organization so we only have to do it once per class.
020:         * <p>
021:         * <b>Important </b>-- It is likely that we will enforce the Serializable contract and only manage those classes which
022:         * implement Serializable.
023:         * <p>
024:         * TODO: Add support for using a serialized instance of classes with no nullary constructor to rehydrate into. <br>
025:         *
026:         * @author Orion Letizi
027:         */
028:        public interface TCClass {
029:
030:            /**
031:             * Get the class this TCClass is a peer for
032:             * @return Peer class, never null
033:             */
034:            public Class getPeerClass();
035:
036:            /**
037:             * Determine whether this class has a BeanShell script to execute on class load
038:             * @return True if has script
039:             */
040:            public boolean hasOnLoadExecuteScript();
041:
042:            /**
043:             * Determine whether this class has a method to execute on class loade
044:             * @return True if has load method
045:             */
046:            public boolean hasOnLoadMethod();
047:
048:            /**
049:             * Get name of method to execute on load
050:             * @return Method name
051:             */
052:            public String getOnLoadMethod();
053:
054:            /**
055:             * Get script to execute on load
056:             * @return Execute script
057:             */
058:            public String getOnLoadExecuteScript();
059:
060:            /**
061:             * If the class is an inner class, get the field referring to the parent "this object.
062:             * @return The field referring to the parent this
063:             */
064:            public Field getParentField();
065:
066:            /**
067:             * If the class is an inner class, get the name of the field referring to the parent "this"
068:             * object.  
069:             * @return The field name referring to the parent this
070:             */
071:            public String getParentFieldName();
072:
073:            /**
074:             * Get all portable fields in the class
075:             * @return Fields, never null
076:             */
077:            public TCField[] getPortableFields();
078:
079:            /**
080:             * Connects the original object to the copy object and creates new copies of referened objects but leaves them
081:             * unconnected (mostly this is about doing a deep connected clone without recurrsion so that we don't get stack
082:             * overflows
083:             * @param source Source object
084:             * @param dest Copy object
085:             * @param visited Note already visited objects
086:             * @param txManager Transaction manager
087:             * @return Map of original to copy key that were cloned while executing the method
088:             */
089:            public Map connectedCopy(Object source, Object dest, Map visited,
090:                    OptimisticTransactionManager txManager);
091:
092:            /**
093:             * Traverse a graph of objects to find the portable ones
094:             * @param pojo The object to walk
095:             * @param addTo The traversed references collected so far
096:             * @return The addTo collection
097:             */
098:            public TraversedReferences getPortableObjects(Object pojo,
099:                    TraversedReferences addTo);
100:
101:            /**
102:             * Get constructor for the class
103:             * @return The constructor
104:             * @throws NoSuchMethodException If there is no constructor
105:             * @throws SecurityException If the constructor cannot be accessed in the current security model
106:             */
107:            public Constructor getConstructor() throws NoSuchMethodException,
108:                    SecurityException;
109:
110:            /**
111:             * @return Name of peer or proxy class
112:             */
113:            public String getName();
114:
115:            /**
116:             * @return If this is an array, the type of array elements
117:             */
118:            public Class getComponentType();
119:
120:            /**
121:             * @return True if this is a logically instrumented class
122:             */
123:            public boolean isLogical();
124:
125:            /**
126:             * @return The client object manager for this client
127:             */
128:            public ClientObjectManager getObjectManager();
129:
130:            /**
131:             * @return TCClass of the super class of the peer
132:             */
133:            public TCClass getSuperclass();
134:
135:            /**
136:             * @return True if this is a non-static inner class and has a parent
137:             */
138:            public boolean isNonStaticInner();
139:
140:            /**
141:             * @return True if this is an enum
142:             */
143:            public boolean isEnum();
144:
145:            /**
146:             * @return True if should use a non-default constructor when creating new instances
147:             */
148:            public boolean isUseNonDefaultConstructor();
149:
150:            /**
151:             * Construct a new instance from a DNA strand using a non-default constructor
152:             * @param dna The DNA with the data to use
153:             * @return The new instance
154:             * @throws IOException Reading DNA
155:             * @throws ClassNotFoundException Can't instantiate a class
156:             */
157:            public Object getNewInstanceFromNonDefaultConstructor(DNA dna)
158:                    throws IOException, ClassNotFoundException;
159:
160:            /**
161:             * Get TCField for this class
162:             * @param name Field name
163:             * @return TCField
164:             */
165:            public TCField getField(String name);
166:
167:            /**
168:             * @return True if this is an array and indexed
169:             */
170:            public boolean isIndexed();
171:
172:            /**
173:             * Reconstitute object from DNA
174:             * @param tcObject The object manager
175:             * @param dna The DNA to read
176:             * @param pojo The new instance of the pojo to reconstitute (will be modified)
177:             * @param force Set to true to force an update to the DNA version, regardless of the local version
178:             */
179:            public void hydrate(TCObject tcObject, DNA dna, Object pojo,
180:                    boolean force) throws IOException, ClassNotFoundException;
181:
182:            /**
183:             * Write an object to DNA
184:             * @param tcObject The object manager
185:             * @param writer The writer to write to
186:             * @param pojo The instance to write
187:             */
188:            public void dehydrate(TCObject tcObject, DNAWriter writer,
189:                    Object pojo);
190:
191:            /**
192:             * @return Name of defining classloader
193:             */
194:            public String getDefiningLoaderDescription();
195:
196:            /**
197:             * Create a new TCObject
198:             * @param id The object identifier
199:             * @param peer The object
200:             */
201:            public TCObject createTCObject(ObjectID id, Object peer);
202:
203:            /**
204:             * Get a field name by offset into an index of fields
205:             * @param fieldOffset The index
206:             * @return The fully-qualified field name at that index
207:             */
208:            public String getFieldNameByOffset(long fieldOffset);
209:
210:            /**
211:             * @return True if this class uses a proxy class
212:             */
213:            public boolean isProxyClass();
214:
215:            /**
216:             * Returns special generated name for classes extending logical classes
217:             * @return Special generated logical extending class name or just the normal class name if not extending logical
218:             */
219:            public String getExtendingClassName();
220:
221:            /**
222:             * Returns true if the field represented by the offset is a portable field, i.e., not static and not dso transient
223:             * @param fieldOffset The index
224:             * @return true if the field is portable and false otherwise 
225:             */
226:            public boolean isPortableField(long fieldOffset);
227:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.