01: /*
02: * Author: Mike Atkinson
03: *
04: * This software has been developed under the copyleft
05: * rules of the GNU General Public License. Please
06: * consult the GNU General Public License for more
07: * details about use and distribution of this software.
08: */
09: package org.acm.seguin.pretty.jdi;
10:
11: import net.sourceforge.jrefactory.parser.JavaParser;
12: import net.sourceforge.jrefactory.parser.JavaParserVisitor;
13: import net.sourceforge.jrefactory.ast.ASTPackageDeclaration;
14: import org.acm.seguin.pretty.JavaDocComponent;
15: import org.acm.seguin.pretty.JavaDocable;
16: import org.acm.seguin.pretty.JavaDocableImpl;
17: import org.acm.seguin.pretty.PrintData;
18:
19: /**
20: * Holds the package declaration at the beginning of the java file
21: *
22: * @author Mike Atkinson
23: * @since jRefactory 2.9.0, created October 16, 2003
24: */
25: public class PackageDeclaration implements JavaDocable {
26: private JavaDocableImpl jdi = null;
27: private ASTPackageDeclaration pack;
28:
29: /**
30: * Constructor for the PackageDeclaration JavaDoc creator.
31: *
32: * @param pack Create JavaDoc for this node.
33: */
34: public PackageDeclaration(ASTPackageDeclaration pack) {
35: this .pack = pack;
36: jdi = new JavaDocableImpl();
37: }
38:
39: /**
40: * Checks to see if it was printed
41: *
42: * @return true if it still needs to be printed
43: */
44: public boolean isRequired() {
45: return false;
46: }
47:
48: /**
49: * Allows you to add a java doc component
50: *
51: * @param component the component that can be added
52: */
53: public void addJavaDocComponent(JavaDocComponent component) {
54: jdi.addJavaDocComponent(component);
55: }
56:
57: /**
58: * Prints all the java doc components
59: *
60: * @param printData the print data
61: */
62: public void printJavaDocComponents(PrintData printData) {
63: jdi.printJavaDocComponents(printData, "since");
64: }
65:
66: /** Makes sure all the java doc components are present */
67: public void finish() {
68: }
69:
70: }
|