| java.lang.Object de.gulden.util.javasource.sourclet.AbstractSourclet
All known Subclasses: de.gulden.util.javasource.sourclet.standard.StandardSourclet,
AbstractSourclet | abstract public class AbstractSourclet implements Sourclet,SourcletOptions(Code) | | Class AbstractSourclet.
author: Jens Gulden version: 1.0 |
Field Summary | |
public static String | nl Helper for quick newline character(s) access. | protected SourcletOptions | options Proxy object that may work as provider of option values. |
Constructor Summary | |
protected | AbstractSourclet() Creates a new instance of AbstractSourclet. |
Method Summary | |
abstract public void | buildBodySource(OutputStream out, SourceObjectDeclared o) Outputs the body content of the source object. | abstract public void | buildEndSource(OutputStream out, SourceObjectDeclared o) Outputs everything that occurs after the SourceObject. | abstract public void | buildHeadSource(OutputStream out, SourceObjectDeclared o) Outputs the head part of a source object. | public void | buildSource(OutputStream out, SourceObjectDeclared o) Outputs the source code for an entire SourceObject to an OutputStream. | abstract public void | buildStartSource(OutputStream out, SourceObjectDeclared o) Outputs the start part of a source object.
This is the part which comes before the 'normal' head
(e.g. | public int | getIntOption(String name) Passes requests for option values to the SourcletOptions proxy object that has been set through setOptions(..). | public String | getOption(String name) Passes requests for option values to the SourcletOptions proxy object that has been set through setOptions(..). | public SourcletOptions | getOptions() Returns the options.
the options proxy, if it exists. | public boolean | hasOption(String name, String value) Passes requests for option values to the SourcletOptions proxy object that has been set through setOptions(..). | public void | init(SourcletOptions options) Initializes the Sourclet. | public boolean | isOption(String name) Passes requests for option values to the SourcletOptions proxy object that has been set through setOptions(..). | public boolean | isOption(String name, String value) Passes requests for option values to the SourcletOptions proxy object that has been set through setOptions(..). | public void | setOptions(SourcletOptions options) Sets an object that works as a proxy for asccessing option values. | public static void | write(OutputStream out, String s) Tool method for writing a string to an OutputStream. | public static void | writeln(OutputStream out, String s) Tool method for writing a string concatenated with a newline-feed to an OutputStream. |
nl | public static String nl(Code) | | Helper for quick newline character(s) access.
|
AbstractSourclet | protected AbstractSourclet()(Code) | | Creates a new instance of AbstractSourclet.
|
buildBodySource | abstract public void buildBodySource(OutputStream out, SourceObjectDeclared o) throws IOException(Code) | | Outputs the body content of the source object. For example,
in case of methods this is Java code, in case of classes this recursively
contains other SourceObjects' code.
throws: IOException - if an i/o error occurs |
buildHeadSource | abstract public void buildHeadSource(OutputStream out, SourceObjectDeclared o) throws IOException(Code) | | Outputs the head part of a source object.
This is the actual Java code that declares the source object,
for example a method's signature.
throws: IOException - if an i/o error occurs |
buildStartSource | abstract public void buildStartSource(OutputStream out, SourceObjectDeclared o) throws IOException(Code) | | Outputs the start part of a source object.
This is the part which comes before the 'normal' head
(e.g. before a method's signature), so usually this is
the place where to output Javadoc comments.
throws: IOException - if an i/o error occurs |
getIntOption | public int getIntOption(String name)(Code) | | Passes requests for option values to the SourcletOptions proxy object that has been set through setOptions(..).
May be overwritten by a subclass to provide options from a different source.
|
getOption | public String getOption(String name)(Code) | | Passes requests for option values to the SourcletOptions proxy object that has been set through setOptions(..).
May be overwritten by a subclass to provide options from a different source.
|
getOptions | public SourcletOptions getOptions()(Code) | | Returns the options.
the options proxy, if it exists. Otherwise returns null . |
hasOption | public boolean hasOption(String name, String value)(Code) | | Passes requests for option values to the SourcletOptions proxy object that has been set through setOptions(..).
May be overwritten by a subclass to provide options from a different source.
|
init | public void init(SourcletOptions options)(Code) | | Initializes the Sourclet. This is called once before the
first SourceObject's code is being generated.
|
isOption | public boolean isOption(String name)(Code) | | Passes requests for option values to the SourcletOptions proxy object that has been set through setOptions(..).
May be overwritten by a subclass to provide options from a different source.
|
isOption | public boolean isOption(String name, String value)(Code) | | Passes requests for option values to the SourcletOptions proxy object that has been set through setOptions(..).
May be overwritten by a subclass to provide options from a different source.
|
setOptions | public void setOptions(SourcletOptions options)(Code) | | Sets an object that works as a proxy for asccessing option values.
The default implementations of getOption ,
getIntOption and isOption acess this proxy
to deliver option values to the Sourclet.
Alternatively, getOption ,
getIntOption and isOption can be reimplemented
(overwritten) by the Sourclet implementation to use its own option
retrieval mechanism.
See Also: AbstractSourclet.getOption See Also: AbstractSourclet.getIntOption See Also: AbstractSourclet.isOption |
|
|