blob: c633ef8c45460545fcdae7322d4189a8dc78d10f (
plain) (
blame)
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
|
/* ____ ____ ____ ____ ______ *\
** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala **
** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL **
** /_____/\____/\___/\____/____/ **
\* */
// $Id$
package meta.java;
import meta.util.TextWriter;
import meta.util.AbstractFileExpander;
/** A base class for java file expanders. */
public abstract class AbstractJavaExpander extends AbstractFileExpander {
//########################################################################
// Public Fields
/** The underlying java writer */
public final JavaWriter writer;
//########################################################################
// Public Constructors
public AbstractJavaExpander() {
this.writer = new JavaWriter(getPackage());
}
//########################################################################
// Public Methods
/** Returns the TextWriter in which this expander writes. */
public TextWriter getTextWriter() {
return writer.getTextWriter();
}
/** Returns the suffix of the target file. Returns "java". */
public String getTargetSuffix() {
return "java";
}
/** Prints the import statements. */
public void printImports() {
writer.printImports();
}
//########################################################################
}
|