Java Doc for SerialVersionUidVisitor.java in  » Net » Terracotta » com » tc » aspectwerkz » transform » inlining » weaver » 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.aspectwerkz.transform.inlining.weaver 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.tc.asm.ClassAdapter
      com.tc.aspectwerkz.transform.inlining.weaver.SerialVersionUidVisitor

SerialVersionUidVisitor
public class SerialVersionUidVisitor extends ClassAdapter implements Opcodes(Code)
See http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/class.html#60

The SerialVersionUidVisitor lookups for the serial ver uid and compute it when not found. See Add and Compute subclasses.

Initial implementation courtesy of Vishal Vishnoi
author:
   Alexandre Vasseur


Inner Class :abstract static class Item implements Comparable
Inner Class :static class FieldItem extends Item
Inner Class :static class MethodItem extends Item
Inner Class :public static class Add extends ClassAdapter

Field Summary
final public static  StringCLINIT
    
final public static  StringINIT
    
final public static  StringSVUID_NAME
    
protected  longm_SVUID
    
protected  intm_access
    
protected  Stringm_className
    
protected  booleanm_computeSVUID
    
protected  booleanm_hadSVUID
    
protected  booleanm_hasStaticInitializer
    
protected  String[]m_interfaces
    
protected  Collectionm_svuidConstructors
     Collection of non private constructors.
protected  Collectionm_svuidFields
     Collection of fields.
protected  Collectionm_svuidMethods
    

Constructor Summary
 SerialVersionUidVisitor(ClassVisitor cv)
    

Method Summary
public static  longcalculateSerialVersionUID(Class klass)
    
protected  longcomputeSVUID()
     Returns the value of SVUID if the class doesn't have one already.
protected  booleanmayNeedSerialVersionUid(int access)
    
public  voidvisit(int version, int access, String name, String signature, String superName, String[] interfaces)
     Visit class header and getDefault class name, access , and interfaces information (step 1,2, and 3) for SVUID computation.
public  voidvisitEnd()
    
public  FieldVisitorvisitField(int access, String name, String desc, String signature, Object value)
     Gets class field information for step 4 of the alogrithm.
public  MethodVisitorvisitMethod(int access, String name, String desc, String signature, String[] exceptions)
     Visit the methods and getDefault constructor and method information (step 5 and 7).
protected  voidwriteItems(Collection itemCollection, DataOutputStream dos, boolean dotted)
    

Field Detail
CLINIT
final public static String CLINIT(Code)



INIT
final public static String INIT(Code)



SVUID_NAME
final public static String SVUID_NAME(Code)



m_SVUID
protected long m_SVUID(Code)
The SVUID value (valid at the end of the visit only ie the one that was present or the computed one)



m_access
protected int m_access(Code)
Classes access flag



m_className
protected String m_className(Code)
Internal name of the class



m_computeSVUID
protected boolean m_computeSVUID(Code)
flag that indicates if we need to compute SVUID (no need for interfaces)



m_hadSVUID
protected boolean m_hadSVUID(Code)
Set to true if the class already has SVUID



m_hasStaticInitializer
protected boolean m_hasStaticInitializer(Code)
Set to true if the class has static initializer



m_interfaces
protected String[] m_interfaces(Code)
Interfaces implemented by the class



m_svuidConstructors
protected Collection m_svuidConstructors(Code)
Collection of non private constructors.



m_svuidFields
protected Collection m_svuidFields(Code)
Collection of fields. (except private static and private transient fields)



m_svuidMethods
protected Collection m_svuidMethods(Code)
Collection of non private method




Constructor Detail
SerialVersionUidVisitor
SerialVersionUidVisitor(ClassVisitor cv)(Code)




Method Detail
calculateSerialVersionUID
public static long calculateSerialVersionUID(Class klass)(Code)
helper method (test purpose)
Parameters:
  klass -



computeSVUID
protected long computeSVUID() throws IOException, NoSuchAlgorithmException(Code)
Returns the value of SVUID if the class doesn't have one already. Please note that 0 is returned if the class already has SVUID, thus use isHasSVUID to determine if the class already had an SVUID. Returns the serila version UID



mayNeedSerialVersionUid
protected boolean mayNeedSerialVersionUid(int access)(Code)



visit
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)(Code)
Visit class header and getDefault class name, access , and interfaces information (step 1,2, and 3) for SVUID computation.



visitEnd
public void visitEnd()(Code)
Add the SVUID if class doesn't have one



visitField
public FieldVisitor visitField(int access, String name, String desc, String signature, Object value)(Code)
Gets class field information for step 4 of the alogrithm. Also determines if the class already has a SVUID.



visitMethod
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)(Code)
Visit the methods and getDefault constructor and method information (step 5 and 7). Also determince if there is a class initializer (step 6).



writeItems
protected void writeItems(Collection itemCollection, DataOutputStream dos, boolean dotted) throws IOException(Code)
Sorts the items in the collection and writes it to the data output stream
Parameters:
  itemCollection - collection of items
Parameters:
  dos - a DataOutputStream value
Parameters:
  dotted - a boolean value
throws:
  IOException - if an error occurs



Fields inherited from com.tc.asm.ClassAdapter
protected ClassVisitor cv(Code)(Java Doc)

Methods inherited from com.tc.asm.ClassAdapter
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)(Code)(Java Doc)
public AnnotationVisitor visitAnnotation(String desc, boolean visible)(Code)(Java Doc)
public void visitAttribute(Attribute attr)(Code)(Java Doc)
public void visitEnd()(Code)(Java Doc)
public FieldVisitor visitField(int access, String name, String desc, String signature, Object value)(Code)(Java Doc)
public void visitInnerClass(String name, String outerName, String innerName, int access)(Code)(Java Doc)
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)(Code)(Java Doc)
public void visitOuterClass(String owner, String name, String desc)(Code)(Java Doc)
public void visitSource(String source, String debug)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.