Java Doc for AutoDoc.java in  » Test-Coverage » GroboUtils » net » sourceforge » groboutils » autodoc » v1 » 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 » Test Coverage » GroboUtils » net.sourceforge.groboutils.autodoc.v1 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sourceforge.groboutils.autodoc.v1.AutoDoc

All known Subclasses:   net.sourceforge.groboutils.autodoc.v1.MockAutoDoc,
AutoDoc
public class AutoDoc (Code)
Entry class for loading the AutoDoc pieces for a particular class. As this class is always instantiated, it does not need an interface. This acts as a central factory for generating all the AutoDoc instances.

This default implementation uses a static factory to load each instance's data. That factory may be set by a using class. Since initialization of the inner data is lazy-loaded (only loaded when needed, but when needed it is all loaded), the factory may be set at any time after construction, and before a data access member function is called. If no factory is ever specified, it will load the factory from the fully-qualified class name in the value of the System property specified by the key given by FACTORY_PROPERTY_NAME.

This class follows a combination of the Abstract Factory and Proxy patterns. AutoDoc acts as a Proxy for an Abstract Factory, allowing the particular implemented factory to be hidden from the user. However, a "hole" is open to each instance with the method setFactory(), allowing the owner to setup the factory to their needs.

NOTE: need to update the documentation. I've since replaced the single factory with an SPI fleet. The proxied objects are delegators to collections of sub-proxies, which are loaded as late as possible.
author:
   Matt Albrecht groboclown@users.sourceforge.net
version:
   $Date: 2003/02/10 22:52:11 $
since:
   March 16, 2002




Constructor Summary
public  AutoDoc(Class c)
     Base constructor.

Method Summary
protected  voidaddFactory(AutoDocFactory adf)
     Sets the AutoDoc factory instance.
final protected  voidcheckLoad()
     Check if the data instances have been loaded.
protected  voidcleanUpFactories()
     After loading the instances, we have no need to keep the memory of the original factories around - they may pollute our loaded proxied objects anyway.
protected  AutoDocFactory[]getFactories()
     Returns the factory this implementation knows.
public static  SPISingletonStoregetFactoryStore()
     Retrieve the AutoDocFactory singleton store for setting up the factory to be used for all uninitialized or uncreated AutoDoc instances.
public  AutoDocITgetIT()
     Get the Issue Tracker implementation.
public  AutoDocLoggetLog()
     Get the log implementation.
final protected  ClassgetOwner()
     Retrieves the owning class.
public  AutoDocTPgetTP()
     Get the Test Procedure Marker implementation.
protected  voidloadFromFactory(AutoDocFactory adf)
     Adds to all inner instances from the given factory.
protected  voidloadInstances()
    


Constructor Detail
AutoDoc
public AutoDoc(Class c)(Code)
Base constructor. Pass in the Class instance which will AutoDoc itself.
Parameters:
  c - the class which will be AutoDoced.
exception:
  IllegalArgumentException - if the passed-in class isnull.




Method Detail
addFactory
protected void addFactory(AutoDocFactory adf)(Code)
Sets the AutoDoc factory instance. If this method is never invoked, then the default static store will be used instead.

The standard factory/singleton pattern used in this framework normally does not allow direct setting of the framework for an instance, but rather for the classloader's class. Since AutoDoc (or a subclass) is directly instantiated as a central processing point, opening a "hole" into the class allows for an easier method to setup a particular AutoDoc style. However, this is not the "recommended" usage, since, in general, AutoDoc instances are instantiated independently throughout many different classes, causing independent factory setting to be more difficult.
Parameters:
  adf - the new factory to assign.
exception:
  IllegalArgumentException - if adf is null.
exception:
  IllegalStateException - if the inner factory has already beenassigned. This usually indicates that all the objects have alreadybeen loaded.




checkLoad
final protected void checkLoad()(Code)
Check if the data instances have been loaded. If they have not, then load the instances, and ensure initialization is not performed again. This lazy-loading is thread-safe.



cleanUpFactories
protected void cleanUpFactories()(Code)
After loading the instances, we have no need to keep the memory of the original factories around - they may pollute our loaded proxied objects anyway. But since we've loaded, we don't want to allow another load. So keep the vector, but clean it out.



getFactories
protected AutoDocFactory[] getFactories()(Code)
Returns the factory this implementation knows. By default, this is the static factory instance. This is only called at AutoDoc creation time. This is not static, because subclasses may need to re-implement this method. The factory may be changed through invocation of setFactory( AutoDocFactory ). the inner factory, or the static singleton if it was neverassigned.



getFactoryStore
public static SPISingletonStore getFactoryStore()(Code)
Retrieve the AutoDocFactory singleton store for setting up the factory to be used for all uninitialized or uncreated AutoDoc instances.



getIT
public AutoDocIT getIT()(Code)
Get the Issue Tracker implementation. Each call will return the same object. the Issue Tracker for the owning class.



getLog
public AutoDocLog getLog()(Code)
Get the log implementation. Each call will return the same object. the log for the owning class.



getOwner
final protected Class getOwner()(Code)
Retrieves the owning class. Will never return null. the class which is being AutoDoced.



getTP
public AutoDocTP getTP()(Code)
Get the Test Procedure Marker implementation. Each call will return the same object.



loadFromFactory
protected void loadFromFactory(AutoDocFactory adf)(Code)
Adds to all inner instances from the given factory.



loadInstances
protected void loadInstances()(Code)
Loads all class



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.