public class SourceCodeTemplate extends OnlyOneBodyGapTemplateBase
The text into which {@.codelet} output (the example-code's source) is placed.
Codelet: {@.codelet}: Template: Gap namesThe only required gap is "body", which is where the fully-processed source-code is placed.
In addition to any user-extra gaps, the {@.codelet} template also provides for the following "default" optional gaps:
| Name | Description |
source_url |
The absolute url to the example code's source file, as created by JavaDoc (in {@docRoot}/src-html/) |
javadoc_url |
The absolute url to the example code's JavaDoc. |
fq_class_name_url |
The example's fully-qualified class name, with dots ('.') replaced by url-slashes ('/'). |
package_url |
The example code's package, with dots ('.') replaced by url-slashes ('/'). |
| Name | Description |
source_path |
The full on-disk path to the example code's source file. |
source_base_dir |
The on-disk directory in which the top-most package of example source-code file exists. |
simple_class_name |
The example code's non-fully-qualified class name. |
fq_class_name |
The example code's fully-qualified class name. |
fq_class_name_dir |
The example's fully-qualified class name, with dots '.' replaced by file-separators. |
package |
The example code's package name. |
package_dir |
The example's package name, with dots '.' replaced by file-separators. |
aliteralmind __DASH__ github __AT__ yahoo __DOT__ com), dual-licensed under the LGPL (version 3.0 or later) or the ASL (version 2.0). See source code for details. http://codelet.aliteralmind.com, https://github.com/aliteralmind/codelet| Modifier and Type | Field and Description |
|---|---|
static CodeletGap |
GAP_FQ_CLASS_NAME
The example code's fully-qualified class name--Gap name is
"fq_class_name". |
static CodeletGap |
GAP_FQ_CLASS_NAME_DIR
The example's fully-qualified class name, with dots
'.' replaced by file-separators--Gap name is "fq_class_name_dir". |
static CodeletGap |
GAP_FQ_CLASS_NAME_URL
The example's fully-qualified class name, with dots (
'.') replaced by url-slashes ('/')--Gap name is "fq_class_name_url". |
static CodeletGap |
GAP_JAVADOC_URL
The absolute url to the example code's JavaDoc--Gap name is
"javadoc_url". |
static CodeletGap |
GAP_PACKAGE
The example code's package name--Gap name is
"package". |
static CodeletGap |
GAP_PACKAGE_DIR
The example's package name, with dots
'.' replaced by file-separators--Gap name is "package_dir". |
static CodeletGap |
GAP_PACKAGE_URL
The example code's package, with dots (
'.') replaced by url-slashes ('/')--Gap name is "package_url". |
static CodeletGap |
GAP_SIMPLE_CLASS_NAME
The example code's non-fully-qualified class name--Gap name is
"simple_class_name". |
static CodeletGap |
GAP_SOURCE_URL
The absolute url to the example code's source file, as created by JavaDoc (in
{@docRoot}/src-html/)--Gap name is "source_url". |
static CodeletGap |
GAP_SRC_BASE_DIR
The on-disk directory in which the top-most package of example source-code file exists--Gap name is
"source_base_dir". |
static CodeletGap |
GAP_SRC_PATH
The full on-disk path to the example code's source file--Gap name is
"source_path". |
BODY_GAP_NAME| Constructor and Description |
|---|
SourceCodeTemplate(FeatherTemplate template,
String tmpl_path,
UserExtraGapGetter userExtra_getter)
Create the first instance.
|
SourceCodeTemplate(SourceCodeTemplate to_copy,
Appendable debugDest_ifNonNull) |
SourceCodeTemplate(SourceCodeTemplate to_copy,
FeatherTemplate template,
String tmpl_path)
Create the second or subsequent instance.
|
| Modifier and Type | Method and Description |
|---|---|
SourceCodeTemplate |
fillBody(String fully_processed) |
SourceCodeTemplate |
getObjectCopy(Appendable debugDest_ifNonNull)
Duplicate this template.
|
static SourceCodeTemplate |
newFromPathAndUserExtraGaps(String path,
String path_name,
UserExtraGapGetter userExtra_getter) |
fillBodyGap, newTemplateFromPathaddCustomGaps, fillBodyGap, getGapCount, getPath, getRendered, getTemplate, getType, newGapMapFromArray, newTemplateFromPath, setDebug, setDebugOnappendToString, debug, debugln, getDebugApbl, getDebugAptr, getObjectCopy, isDebugOn, onIfNonNull, toString, zsetDebugDB, zsetDebugOnDBpublic static final CodeletGap GAP_SRC_PATH
The full on-disk path to the example code's source file--Gap name is "source_path".
Gap is filled with
TagletTextUtil.getJavaSourceFilePath([the-instance])
,
GAP_SRC_BASE_DIRpublic static final CodeletGap GAP_SRC_BASE_DIR
The on-disk directory in which the top-most package of example source-code file exists--Gap name is "source_base_dir".
Gap is filled with
CodeletBaseConfig.INSTANCE.getExampleClassFQName()
,
GAP_SRC_PATHpublic static final CodeletGap GAP_SIMPLE_CLASS_NAME
The example code's non-fully-qualified class name--Gap name is "simple_class_name".
Gap is filled with
TagletTextUtil.getExampleSimpleClassName([the-instance])
,
GAP_FQ_CLASS_NAME,
GAP_PACKAGEpublic static final CodeletGap GAP_FQ_CLASS_NAME
The example code's fully-qualified class name--Gap name is "fq_class_name".
Gap is filled with
TagletTextUtil.getExampleClassFQName([the-instance])
public static final CodeletGap GAP_FQ_CLASS_NAME_URL
The example's fully-qualified class name, with dots ('.') replaced by url-slashes ('/')--Gap name is "fq_class_name_url".
Example input:
"fully.qualified.examples.AnExample""fully/qualified/examples/AnExample"
Gap is filled with
TagletTextUtil.getExampleClassFQName([the-instance]).replace(".", "/")
,
GAP_FQ_CLASS_NAMEpublic static final CodeletGap GAP_FQ_CLASS_NAME_DIR
The example's fully-qualified class name, with dots '.' replaced by file-separators--Gap name is "fq_class_name_dir".
Example input:
"fully.qualified.examples.AnExample"Output (assuming Microsoft Windows):
"fully\qualified\examples\AnExample"
Gap is filled with
TagletTextUtil.getExampleClassFQName([the-instance]).replace(".",FILE_SEP*)
,
GAP_FQ_CLASS_NAMEpublic static final CodeletGap GAP_SOURCE_URL
The absolute url to the example code's source file, as created by JavaDoc (in {@docRoot}/src-html/)--Gap name is "source_url".
Gap is filled with
TagletTextUtil.getJavaDocSourceUrl([the-instance])
,
GAP_JAVADOC_URLpublic static final CodeletGap GAP_JAVADOC_URL
The absolute url to the example code's JavaDoc--Gap name is "javadoc_url".
Gap is filled with
TagletTextUtil.getJavaDocSourceUrl([the-instance])
,
GAP_SOURCE_URLpublic static final CodeletGap GAP_PACKAGE
The example code's package name--Gap name is "package".
Gap is filled with
TagletTextUtil.getExamplePackageName([the-instance])
,
GAP_PACKAGE_DIR,
GAP_PACKAGE_URL,
GAP_FQ_CLASS_NAME,
GAP_SIMPLE_CLASS_NAMEpublic static final CodeletGap GAP_PACKAGE_URL
The example code's package, with dots ('.') replaced by url-slashes ('/')--Gap name is "package_url".
Example input:
"fully.qualified.examples.AnExample""fully/qualified/examples"
Gap is filled with
TagletTextUtil.getExamplePackageName([the-instance]).replace(".", "/")
,
GAP_PACKAGEpublic static final CodeletGap GAP_PACKAGE_DIR
The example's package name, with dots '.' replaced by file-separators--Gap name is "package_dir".
Example input:
"fully.qualified.examples.AnExample"Output (assuming Microsoft Windows):
"fully\qualified\examples"
Gap is filled with
TagletTextUtil.getExamplePackageName([the-instance]).replace(".",FILE_SEP*)
,
GAP_PACKAGEpublic SourceCodeTemplate(FeatherTemplate template, String tmpl_path, UserExtraGapGetter userExtra_getter)
Create the first instance.
Equal to
super(CodeletType.SOURCE_CODE, template, tmpl_path, new CodeletGap[] {GAP_SRC_PATH,GAP_SRC_BASE_DIR,GAP_SIMPLE_CLASS_NAME,GAP_FQ_CLASS_NAME,GAP_FQ_CLASS_NAME_URL,GAP_FQ_CLASS_NAME_DIR,GAP_SOURCE_URL,GAP_JAVADOC_URL,GAP_PACKAGE,GAP_PACKAGE_URL,GAP_PACKAGE_DIR}, userExtra_getter)
public SourceCodeTemplate(SourceCodeTemplate to_copy, FeatherTemplate template, String tmpl_path)
public SourceCodeTemplate(SourceCodeTemplate to_copy, Appendable debugDest_ifNonNull)
public SourceCodeTemplate fillBody(String fully_processed)
public static final SourceCodeTemplate newFromPathAndUserExtraGaps(String path, String path_name, UserExtraGapGetter userExtra_getter)
public SourceCodeTemplate getObjectCopy(Appendable debugDest_ifNonNull)
Duplicate this template.
getObjectCopy in class CodeletTemplateBase(new SourceCodeTemplate(this, debugDest_ifNonNull))Copyright 2014, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.
https://github.com/aliteralmind/codelet