File: package.html

package info (click to toggle)
libgroboutils-java 5-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,396 kB
  • ctags: 11,186
  • sloc: java: 59,748; xml: 12,762; sh: 377; perl: 104; makefile: 20
file content (71 lines) | stat: -rw-r--r-- 2,574 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<HTML><HEAD><TITLE>net.sourceforge.groboutils.autodoc.v1</TITLE></HEAD><BODY>
Test Self-Documentation aid classes.
<H3>Overview</H3>

<P>
This package contains a bootstrap class (AutoDoc), and the interfaces that it
delivers.
</P>
<P>
Other classes use this package by creating an instance of the AutoDoc class on
a per-class basis.  This <tt>AutoDoc</tt> instance then returns to the using
class-specific instances for the owning class' Self-Documentation needs.
</P>

<H3>Generating Implementations of the AutoDoc Framework</H3>

<P>
This framework makes it easy to create your own implementation for each
part.  Here's how the framework loads in the classes.
</P>
<P>
The <tt>AutoDoc</tt> class 
</P>




<P>
The <tt>AutoDoc</tt> class loads an instance of the AutoDocFactory interface.
It first checks the system property
"<tt>net.sourceforge.groboutils.autodoc.AutoDocFactory.implementation</tt>".
The value which this is set to will be the fully-qualified class name to create
as the factory (an instance of <tt>AutoDocFactory</tt>).  If that is not set,
then it defaults to
<tt>net.sourceforge.groboutils.autodoc.defimpl.DefaultAutoDocFactory</tt>.
</P>
<P>
Then, <tt>AutoDoc</tt> requests for a new instance of each entry-point interface
from the loaded factory.
</P>
<P>
As an implementation creator, you could create your own <tt>AutoDocFactory</tt>
instance, and set the system property to point to your own.  Or, you could leave
the DefaultAutoDocFactory, and depend upon it to load your specific
entry-point factory.
</P>
<P>
The <tt>DefaultAutoDocFactory</tt> loads entry-point factories in a similar
fashion to how <tt>AutoDoc</tt> loads its factory: through the system
properties.  It uses for the implementation class name the fully-qualified
class name specified in the system property of the form "<i>factory interface
fully-qualified class name</i><tt>.implementation</tt></P>".  If the property
isn't set, it uses the default implementation.
</P>

<H3>ToDo</H3>

<UL>
    <LI>
    Right now, there can be only one factory for each section system-wide.
    This should be modified to allow for a hierarchy much like log4j allows,
    where the owning class can have its own factory set, or its package,
    or each package component, or finally it defaults to the system-wide
    setting (and if that isn't defined, then the default framework setting).
    Alternatively, it could load a property file from each of these
    namespaces.  I'll leave that as a AutoDoc factory specific type to be
    created in the future.
    </LI>
</UL>

</BODY></HTML>