Interface Wurbler
- All Known Implementing Classes:
AbstractWurbler, ConsoleWurbler, SourceWurbler
public interface Wurbler
The wurblet container.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringnamespace for the runtime environment.static final Stringextra namespace.
used for wurbletProperites in maven pomsstatic final Stringnamespace for the wurblet.static final Stringproperty in wurblet namespace holding the directory of the source file.static final Stringproperty in wurblet namespace holding the contents of the source file.static final Stringproperty in wurblet namespace holding the absolute pathname of the source file.static final Stringproperty in wurblet namespace holding the guardname of the wurblet anchor.static final Stringfile extension for the wurblet source.static final Stringproperty in wurblet namespace holding the name of the wurblet.static final Stringproperty in wurblet namespace holding the pathname of the *.wurb-file (additional properties), null if none. -
Method Summary
Modifier and TypeMethodDescriptiongetAnalyzeFile(String name) Gets an analyze-information file.
Some wurblets need extra information which is provided in files in the so-called analyzedir (example in ant: analyzedir=${apt})String[]getArgs()Gets the wurblet args.intGets the invocation count.
Wurblets are invoked as long as the data changes.Gets the logger.Gets the writer where to write generated code to.getProperties(String nameSpace) Gets all Properties within a namespace.getProperty(String nameSpace, String key) Gets the property value for a given namespace and key.String[]Gets the fixed source texts.Gets the verbosity level.wurbel()Processes the source file, create here-docs and replace wurblet-guarded sections.
-
Field Details
-
WURBLET_PROPERTIES_EXTENSION
-
PROPSPACE_ENV
-
PROPSPACE_WURBLET
-
PROPSPACE_EXTRA
extra namespace.
used for wurbletProperites in maven poms- See Also:
-
WURBLET_FILENAME
property in wurblet namespace holding the absolute pathname of the source file.- See Also:
-
WURBLET_FILECONTENTS
property in wurblet namespace holding the contents of the source file.- See Also:
-
WURBLET_WURBNAME
property in wurblet namespace holding the pathname of the *.wurb-file (additional properties), null if none.- See Also:
-
WURBLET_DIRNAME
property in wurblet namespace holding the directory of the source file.- See Also:
-
WURBLET_GUARDNAME
property in wurblet namespace holding the guardname of the wurblet anchor. (wurblet tag)- See Also:
-
WURBLET_WURBLETNAME
property in wurblet namespace holding the name of the wurblet.- See Also:
-
-
Method Details
-
wurbel
Processes the source file, create here-docs and replace wurblet-guarded sections.- Returns:
- the wurbel result
- Throws:
WurbelException- if a file- or heapfile operation failedSourceException- if source scanning failed
-
getSource
-
getPrintStream
PrintStream getPrintStream()Gets the writer where to write generated code to.- Returns:
- the open writer
-
getArgs
String[] getArgs()Gets the wurblet args.- Returns:
- array of strings representing args for the wurblet
-
getInvocationCount
int getInvocationCount()Gets the invocation count.
Wurblets are invoked as long as the data changes. Some wurblets need to know how often (i.e. to allocate HeapFiles only once)- Returns:
- the invocation count, starting at 1
-
getProperty
-
getProperties
Gets all Properties within a namespace.- Parameters:
nameSpace- the namespace, null for the default java runtime properties- Returns:
- the properties, null if no such namespace
-
getAnalyzeFile
-
getVerbosity
-
getLogger
-