public class FileTextTemplate extends OnlyOneBodyGapTemplateBase
The text into which {@.file.textlet} output (the example-code's console output) is placed.
Codelet: {@.file.textlet}: 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 |
rel_path_url |
The file's relative url-path, as it exists in the base url. |
javadoc_path_url |
The absolute url to the example code's source file, as exists somewhere in the JavaDoc output directory ({@docRoot}). |
relative_dir_as_url |
The example code's relative_dir, with file-separators replaced by url-slashes ('/'). |
| Name | Description |
path |
The absolute on-disk path to the file. |
base_dir |
The on-disk path that is prepended to the file's relative path. |
file_name_no_ext |
The name of the file, without its dot-extension (such as .txt"}). |
file_name |
The name of the file, including its dot-extension (such as .txt"}). |
file_name_dir |
The example's path as it exists in the base directory. |
relative_dir |
The example code's relative directory, as it exists in the absolute path. |
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_BASE_DIR
The on-disk path that is prepended to the file's relative path--Gap name is
"base_dir". |
static CodeletGap |
GAP_FILE_NAME_NO_EXT
The name of the file, without its dot-extension (such as
".txt")--Gap name is "file_name_no_ext". |
static CodeletGap |
GAP_FILE_NAME_WITH_EXT
The name of the file, including its dot-extension (such as
".txt")--Gap name is "file_name". |
static CodeletGap |
GAP_PATH
The absolute on-disk path to the file--Gap name is
"path". |
static CodeletGap |
GAP_REL_DIR_AS_URL
The example code's relative_dir, with file-separators replaced by url-slashes (
'/')--Gap name is "relative_dir_as_url". |
static CodeletGap |
GAP_REL_PATH_AS_URL
The file's relative url-path, as it exists in the base url--Gap name is
"rel_path_url".. |
static CodeletGap |
GAP_RELATIVE_DIR
The example code's relative directory, as it exists in the absolute path--Gap name is
"relative_dir". |
static CodeletGap |
GAP_RELATIVE_PATH
The example's path as it exists in the base directory--Gap name is
"file_name_dir". |
static CodeletGap |
GAP_URL
The absolute url to the example code's source file, as exists somewhere in the JavaDoc output directory (
{@docRoot})--Gap name is "javadoc_path_url". |
BODY_GAP_NAME| Constructor and Description |
|---|
FileTextTemplate(FeatherTemplate template,
String tmpl_path,
UserExtraGapGetter userExtra_getter)
Create the first instance.
|
FileTextTemplate(FileTextTemplate to_copy,
Appendable debugDest_ifNonNull) |
FileTextTemplate(FileTextTemplate to_copy,
FeatherTemplate template,
String tmpl_path)
Create the second or subsequent instance.
|
| Modifier and Type | Method and Description |
|---|---|
FileTextTemplate |
fillBody(String fully_processed) |
FileTextTemplate |
getObjectCopy(Appendable debugDest_ifNonNull)
Duplicate this template.
|
static FileTextTemplate |
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_PATH
The absolute on-disk path to the file--Gap name is "path".
Gap is filled with
TagletTextUtil.getFilePath([the-instance])
GAP_BASE_DIR,
GAP_RELATIVE_PATHpublic static final CodeletGap GAP_BASE_DIR
The on-disk path that is prepended to the file's relative path--Gap name is "base_dir".
Gap is filled with
GAP_PATHpublic static final CodeletGap GAP_FILE_NAME_NO_EXT
The name of the file, without its dot-extension (such as ".txt")--Gap name is "file_name_no_ext".
Gap is filled with
TagletTextUtil.getFileNameWithoutExtension([the-instance])
GAP_FILE_NAME_WITH_EXT,
GAP_RELATIVE_PATHpublic static final CodeletGap GAP_FILE_NAME_WITH_EXT
The name of the file, including its dot-extension (such as ".txt")--Gap name is "file_name".
Gap is filled with
TagletTextUtil.getFileNameWithExtension([the-instance])
public static final CodeletGap GAP_REL_PATH_AS_URL
The file's relative url-path, as it exists in the base url--Gap name is "rel_path_url"..
Example input:
"fully.qualified.examples.AnExample""fully/qualified/examples/AnExample"
Gap is filled with
TagletTextUtil.getExampleClassFQName([the-instance]).replace(".", "/")
GAP_URLpublic static final CodeletGap GAP_RELATIVE_PATH
The example's path as it exists in the base directory--Gap name is "file_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_PATH,
GAP_REL_PATH_AS_URL,
GAP_FILE_NAME_WITH_EXTpublic static final CodeletGap GAP_URL
The absolute url to the example code's source file, as exists somewhere in the JavaDoc output directory ({@docRoot})--Gap name is "javadoc_path_url".
Gap is filled with
TagletTextUtil.getJavaDocSourceUrl([the-instance])
public static final CodeletGap GAP_RELATIVE_DIR
The example code's relative directory, as it exists in the absolute path--Gap name is "relative_dir".
Gap is filled with
TagletTextUtil.getFilePath([the-instance])
GAP_PATH,
GAP_REL_DIR_AS_URLpublic static final CodeletGap GAP_REL_DIR_AS_URL
The example code's relative_dir, with file-separators replaced by url-slashes ('/')--Gap name is "relative_dir_as_url".
Gap is filled with
TagletTextUtil.getFilePath([the-instance]).replace(".", "/")
GAP_RELATIVE_DIRpublic FileTextTemplate(FeatherTemplate template, String tmpl_path, UserExtraGapGetter userExtra_getter)
Create the first instance.
Equal to
super(CodeletType.FILE_TEXT, template, tmpl_path, new CodeletGap[] {GAP_PATH,GAP_BASE_DIR,GAP_FILE_NAME_NO_EXT,GAP_FILE_NAME_WITH_EXT,GAP_REL_PATH_AS_URL,GAP_RELATIVE_PATH,GAP_URL,GAP_RELATIVE_DIR,GAP_REL_DIR_AS_URL}, userExtra_getter)
public FileTextTemplate(FileTextTemplate to_copy, FeatherTemplate template, String tmpl_path)
public FileTextTemplate(FileTextTemplate to_copy, Appendable debugDest_ifNonNull)
public FileTextTemplate fillBody(String fully_processed)
public FileTextTemplate getObjectCopy(Appendable debugDest_ifNonNull)
Duplicate this template.
getObjectCopy in class CodeletTemplateBase(new FileTextTemplate(this, debugDest_ifNonNull))public static final FileTextTemplate newFromPathAndUserExtraGaps(String path, String path_name, UserExtraGapGetter userExtra_getter)
Copyright 2014, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.
https://github.com/aliteralmind/codelet