public abstract class SourceRenderer extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CURRENT_DIRECTORY |
static String |
DOT |
static char |
FORWARD_SLASH |
| Constructor and Description |
|---|
SourceRenderer() |
| Modifier and Type | Method and Description |
|---|---|
abstract TokenRenderer |
createRenderer(CommandProcessor options,
File outFile) |
File |
getDestinationDirectory() |
protected InputStream |
getInputStream(File srcDir,
String path)
Gets the input stream.
|
File |
getSourceDirectory() |
abstract void |
registerOptions(CommandProcessor options) |
protected void |
run(String[] args)
Renders the given source files.
|
protected void |
verbose(String s) |
protected void |
warn(String s) |
public static final char FORWARD_SLASH
public static final String DOT
public static final String CURRENT_DIRECTORY
protected final void run(String[] args) throws Exception
$ java SourceRenderer [options] filesFor example,
$ java SourceRenderer -stylesheet mystyle.css -sourcepath test -d generated/html acme/foo/SomeClass.java
Recognized options are
-format | the format of the converted output. Recognized monikers are
html and text. A fully qualified class name that implements TokenRenderer is
allowed. Default is html |
-sourcepath | the root of the source files. Default is the current directory |
-d | the root of the generated files. Default is the current directory |
-someProperty
will configure the renderer if a bean-style setter method setSomeProperty(String|boolean|int)
is available. See available documentation on the specific renderer.
-stylesheetis relative to destination directory.
args - command-line arguments.Exceptionpublic File getDestinationDirectory()
public File getSourceDirectory()
public abstract void registerOptions(CommandProcessor options)
public abstract TokenRenderer createRenderer(CommandProcessor options, File outFile)
protected InputStream getInputStream(File srcDir, String path)
srcDir - the root source directory.path - the path to input file.protected void verbose(String s)
protected void warn(String s)
Copyright © 2006–2018 Apache Software Foundation. All rights reserved.