public enum TemplateOverrides extends Enum<TemplateOverrides>
For optional overriding of default templates, for a single JavaDoc page or an entire package. For overriding a template in a single taglet, a customizer must be used.
Configuration is in a text file named template_overrides_config.txt, which is located in the same directory as codelet.properties (view {@docRoot}/../codelet_config/template_overrides_config.txt). Loading is executed by CodeletBootstrap.
If template_overrides_config.txt is empty (or contains only comments), then default templates are always used.
Each line is an override for either a specific JavaDoc file, or an entire package. It's format:
[fully-qualified-JavaDoc-file-name] [codelet-type] [relative-path-of-template-file]
Examples:
com.github.smith.overview-summary.html SOURCE_CODE overview_codelet_tmpl.txt com.github.smith.overview-summary.html SOURCE_AND_OUT overview_codelet_and_out.txt com.github.smith.sub.package SOURCE_CODE sub_packages\smith_pkg_codelet_tmpl.txt com.github.smith.sub.package.AClass.java CONSOLE_OUT sub_packages\com_github_smith_overview_codelet_dot_out_tmpl.txt com.github.smith.sub.package.AClass.java FILE_TEXT sub_packages\com_github_smith_overview_file_textlet_tmpl.txt
There are three columns, separated by one-or-more tabs, or two-or-more spaces:
[fully-qualified-JavaDoc-file-name]: The file or package to override.[codelet-type]: The type of codelet to override. Must equal "SOURCE_CODE", "CONSOLE_OUT", "SOURCE_AND_OUT", or "FILE_TEXT".[relative-path-of-template-file]: The relative directory to the template file, as it exists in the user-template base directory.Lines may be indented, and any lines starting with a hash ('#') are ignored. Empty lines are also ignored.
Column one: [fully-qualified-JavaDoc-file-name]
| Item type | Example | Description |
| An individual class | fully.qualified.AClass.java |
Its fully-qualified class name, plus ".java" |
| The package summary page | fully.qualified.package-info.java
fully.qualified.package-summary.html |
It's fully-qualified name, including postfix, as it is read by the javadoc application (use the name of its source-file). |
| The overview summary page | overview-summary.html |
The relative path of overview file, as it is configured into the -overview option. |
| An entire package | fully.qualified |
The fully qualified package name. This only overrides classes directly in this package. No sub-packages are affected. |
If both a file and its package are overridden, the individual file's override always takes precedence.
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| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
SPLIT_PATTERN
|
| Modifier and Type | Method and Description |
|---|---|
static StringBuilder |
appendStaticToString(StringBuilder to_appendTo) |
static <T extends CodeletTemplateBase> |
get(CodeletInstance instance,
Appendable debugDest_ifNonNull)
Get the template.
|
static String |
staticToString() |
static TemplateOverrides |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TemplateOverrides[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static boolean |
wasLoaded()
Was configuration loaded?.
|
public static final TemplateOverrides INSTANCE
public static final Pattern SPLIT_PATTERN
public static TemplateOverrides[] values()
for (TemplateOverrides c : TemplateOverrides.values()) System.out.println(c);
public static TemplateOverrides valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static final boolean wasLoaded()
Was configuration loaded?.
true If all values loaded successfully.public static final <T extends CodeletTemplateBase> T get(CodeletInstance instance, Appendable debugDest_ifNonNull)
Get the template.
IllegalArgumentStateException - If the enclosing file's path does not start with the enclosing class base directory.public static final String staticToString()
public static final StringBuilder appendStaticToString(StringBuilder to_appendTo)
Copyright 2014, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.
https://github.com/aliteralmind/codelet