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.ast.ASTNestedInterfaceDeclaration;
12: import net.sourceforge.jrefactory.ast.ASTUnmodifiedInterfaceDeclaration;
13: import org.acm.seguin.pretty.DescriptionPadder;
14: import org.acm.seguin.pretty.ForceJavadocComments;
15: import org.acm.seguin.pretty.PrintData;
16: import org.acm.seguin.pretty.ai.RequiredTags;
17:
18: /**
19: * Holds a nested interface
20: *
21: * @author Mike Atkinson
22: * @since jRefactory 2.9.0, created October 16, 2003
23: */
24: public class NestedInterfaceDeclaration extends BaseJDI {
25: private ASTNestedInterfaceDeclaration intf;
26:
27: /**
28: * Constructor for the NestedInterfaceDeclaration JavaDoc creator.
29: *
30: * @param intf Create JavaDoc for this node.
31: */
32: public NestedInterfaceDeclaration(ASTNestedInterfaceDeclaration intf) {
33: super ();
34: this .intf = intf;
35: }
36:
37: /**
38: * Checks to see if it was printed
39: *
40: * @return true if it still needs to be printed
41: */
42: public boolean isRequired() {
43: return jdi.isRequired()
44: && (new ForceJavadocComments()).isJavaDocRequired(
45: "class", intf);
46: }
47:
48: /**
49: * Prints all the java doc components
50: *
51: * @param printData the print data
52: */
53: public void printJavaDocComponents(PrintData printData) {
54: jdi.printJavaDocComponents(printData, bundle
55: .getString("class.tags"));
56: }
57:
58: /** Makes sure all the java doc components are present */
59: public void finish() {
60: jdi.require("", DescriptionPadder.find(bundle,
61: "interface.descr"));
62:
63: // Require the other tags
64: ASTUnmodifiedInterfaceDeclaration child = (ASTUnmodifiedInterfaceDeclaration) intf
65: .jjtGetFirstChild();
66: RequiredTags.getTagger().addTags(bundle, "class",
67: child.getName(), jdi);
68: }
69:
70: }
|