1 34 35 package net.percederberg.grammatica.code.visualbasic; 36 37 import java.io.PrintWriter ; 38 import net.percederberg.grammatica.code.CodeElementContainer; 39 import net.percederberg.grammatica.code.CodeStyle; 40 41 49 public class VisualBasicNamespace extends CodeElementContainer { 50 51 54 private String name; 55 56 61 public VisualBasicNamespace(String name) { 62 this.name = name; 63 } 64 65 73 public int category() { 74 return 11; 75 } 76 77 82 public void addClass(VisualBasicClass c) { 83 addElement(c); 84 } 85 86 91 public void addEnumeration(VisualBasicEnumeration e) { 92 addElement(e); 93 } 94 95 102 public void print(PrintWriter out, CodeStyle style, int indent) { 103 String indentStr = style.getIndent(indent); 104 105 out.println(indentStr + "Namespace " + name ); 106 out.println(); 107 printContents(out, style, indent + 1); 108 out.println(indentStr + "End Namespace"); 109 } 110 } 111 | Popular Tags |