public class NewJDLinkForWordOccuranceNum extends Object
Convenience functions for creating new line alterers that replace a single occurance of a function (or class, constructor, or field) name with a clickable JavaDoc link.
While it is verified that the link's target exists, it is not known whether the target is made viewable by JavaDoc. For example, if you link to a protected class, but configure JavaDoc to only display public classes, the link will be created, but clicking on it will result in going to the class itself (assuming the class is also viewable).
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/codeletNewTextLineAltererFor| Modifier and Type | Method and Description |
|---|---|
static TextLineAlterAdapter<StringReplacer> |
cclass(CodeletInstance instance,
int line_occuranceNum,
Class<?> target,
Appendable dbgRplcr_ifNonNull,
Appendable dbgResultFilter_ifNonNull)
Replaces a single occurance of a class name with a JavaDoc link.
|
static TextLineAlterAdapter<StringReplacer> |
cclass(CodeletInstance instance,
String debug_prefix,
String dbgPreClassNm_ifNonNull,
int line_occuranceNum,
Class<?> target)
Create a class link replacer with named debuggers.
|
static TextLineAlterAdapter<StringReplacer> |
constructor(CodeletInstance instance,
int lineOccurance_num,
Class<?> target_class,
String param_shortcut,
Appendable dbgRplcr_ifNonNull,
Appendable dbgResultFilter_ifNonNull,
Appendable dbgSearchTerm_ifNonNull,
Appendable dbgSearchTermDoesMatch_ifNonNull)
Replaces a single occurance of a constructor name with a JavaDoc link.
|
static TextLineAlterAdapter<StringReplacer> |
constructor(CodeletInstance instance,
String debug_prefix,
String dbgPreCnstrNm_ifNonNull,
int lineOccurance_num,
Class<?> target_class,
String param_shortcut)
Create a constructor link replacer with named debuggers.
|
static TextLineAlterAdapter<StringReplacer> |
field(CodeletInstance instance,
int line_occuranceNum,
Class<?> containing_class,
String field_name,
Appendable dbgRplcr_ifNonNull,
Appendable dbgResultFilter_ifNonNull)
Replaces a single occurance of a field name (an object contained in another object) with a JavaDoc link.
|
static TextLineAlterAdapter<StringReplacer> |
field(CodeletInstance instance,
int line_occuranceNum,
Field target,
Appendable dbgRplcr_ifNonNull,
Appendable dbgResultFilter_ifNonNull) |
static TextLineAlterAdapter<StringReplacer> |
field(CodeletInstance instance,
String debug_prefix,
String dbgPreFieldNm_ifNonNull,
int line_occuranceNum,
Class<?> containing_class,
String field_name)
Create a field link replacer with named debuggers.
|
static AllSimpleParamSignatures |
getAllParamSigsForLinkTarget(Class<?> target)
Get the object that translates function and constructor shortcut signatures to the method or constructor object they represent.
|
static TextLineAlterAdapter<StringReplacer> |
method(CodeletInstance instance,
int line_occuranceNum,
Class<?> target_class,
String name_paramShortcut,
Appendable dbgRplcr_ifNonNull,
Appendable dbgResultFilter_ifNonNull,
Appendable dbgSearchTerm_ifNonNull,
Appendable dbgSearchTermDoesMatch_ifNonNull)
Replaces a single occurance of a function name with a JavaDoc link.
|
static TextLineAlterAdapter<StringReplacer> |
method(CodeletInstance instance,
String debug_prefix,
String dbgPreMethodNm_ifNonNull,
int line_occuranceNum,
Class<?> target_class,
String name_paramShortcut)
Create a function link replacer with named debuggers.
|
public static final TextLineAlterAdapter<StringReplacer> constructor(CodeletInstance instance, int lineOccurance_num, Class<?> target_class, String param_shortcut, Appendable dbgRplcr_ifNonNull, Appendable dbgResultFilter_ifNonNull, Appendable dbgSearchTerm_ifNonNull, Appendable dbgSearchTermDoesMatch_ifNonNull)
Replaces a single occurance of a constructor name with a JavaDoc link.
lineOccurance_num - Which "line" occurance should be linked? This is the n-th line in which the function name is found in the source code. If it exists in three lines (regardless how many occurances exist within those lines), and you want the second to have the link, set this to two. When there are multiple occurances of a constructor call in a line, the first is always the one linked. Must be one or greater.AdaptRegexReplacerTo.lineReplacer(AlterationRequired.YES, rr, filterAllBut)
rr is a
NewJavaDocLinkReplacerFor.constructor(instance, target, dbgRplcr_ifNonNull)target is
ConstructorParamSearchTerm.
getConstructorFromAllSigsAndSearchTerm(
getAllParamSigsForLinkTarget(target_class),
param_shortcut, dbgSearchTerm_ifNonNull, dbgSearchTermDoesMatch_ifNonNull)filterAllBut is a "result filter" that only accepts a single occurance.public static final TextLineAlterAdapter<StringReplacer> constructor(CodeletInstance instance, String debug_prefix, String dbgPreCnstrNm_ifNonNull, int lineOccurance_num, Class<?> target_class, String param_shortcut)
Create a constructor link replacer with named debuggers.
Named debuggers provided to the following constructor parameters:
[debug_prefix].link.[dbgPreCnstrNm_ifNonNull]: dbgRplcr_ifNonNull.validfilter: dbgResultFilter_ifNonNull.searchterm: dbgSearchTerm_ifNonNull.doesMatch: dbgSearchTermDoesMatch_ifNonNullPREFIX.link.DBGPRECNSTRNM_IFNONNULL.=-1 PREFIX.link.DBGPRECNSTRNM_IFNONNULL.validfilter=-1 PREFIX.link.DBGPRECNSTRNM_IFNONNULL.searchterm=-1 PREFIX.link.DBGPRECNSTRNM_IFNONNULL.searchterm.doesMatch=-1
instance - For determining the current debugging level.debug_prefix - Prepended to all named debuggers. May not be null or empty.dbgPreCnstrNm_ifNonNull - If non-null, this is the name of the class used in the debug-level name. If null, "constructor" is used.public static final TextLineAlterAdapter<StringReplacer> method(CodeletInstance instance, int line_occuranceNum, Class<?> target_class, String name_paramShortcut, Appendable dbgRplcr_ifNonNull, Appendable dbgResultFilter_ifNonNull, Appendable dbgSearchTerm_ifNonNull, Appendable dbgSearchTermDoesMatch_ifNonNull)
Replaces a single occurance of a function name with a JavaDoc link.
line_occuranceNum - Which occurance should be linked? This is the n-th line in which the function name is found in the source code. If it exists in three lines (regardless how many occurances exist within those lines), and you want the second to have the link, set this to two. When there are multiple occurances of a function call in that line, the first is always the one linked. Must be one or greater.AdaptRegexReplacerTo.lineReplacer(AlterationRequired.YES, rr, filterAllBut)
rr is a
NewJavaDocLinkReplacerFor.method(instance, target, dbgRplcr_ifNonNull)target is
MethodSigSearchTerm.
getConstructorFromAllSigsAndSearchTerm(
getAllParamSigsForLinkTarget(target_class),
name_paramShortcut, dbgSearchTerm_ifNonNull, dbgSearchTermDoesMatch_ifNonNull)filterAllBut is a "result filter" that only accepts a single occurance.public static final TextLineAlterAdapter<StringReplacer> method(CodeletInstance instance, String debug_prefix, String dbgPreMethodNm_ifNonNull, int line_occuranceNum, Class<?> target_class, String name_paramShortcut)
Create a function link replacer with named debuggers.
Named debuggers provided to the following method parameters:
[debug_prefix].link.[dbgPreMethodNm_ifNonNull]: dbgRplcr_ifNonNull.validfilter: dbgResultFilter_ifNonNull.searchterm: dbgSearchTerm_ifNonNull.doesMatch: dbgSearchTermDoesMatch_ifNonNullPREFIX.link.DBGPREMETHODNM_IFNONNULL.=-1 PREFIX.link.DBGPREMETHODNM_IFNONNULL.validfilter=-1 PREFIX.link.DBGPREMETHODNM_IFNONNULL.searchterm=-1 PREFIX.link.DBGPREMETHODNM_IFNONNULL.searchterm.doesMatch=-1
instance - For determining the current debugging level.debug_prefix - Prepended to all named debuggers. May not be null or empty.dbgPreMethodNm_ifNonNull - If non-null, this is the name of the method (with potentially a class-dot prefix) used in the debug-level name. If null, the method's name is used.public static final TextLineAlterAdapter<StringReplacer> field(CodeletInstance instance, int line_occuranceNum, Class<?> containing_class, String field_name, Appendable dbgRplcr_ifNonNull, Appendable dbgResultFilter_ifNonNull)
Replaces a single occurance of a field name (an object contained in another object) with a JavaDoc link.
line_occuranceNum - Which occurance should be linked? This is the n-th line in which the obect name is found in the source code. If it exists in three lines (regardless how many occurances exist within those lines), and you want the second to have the link, set this to two. When there are multiple occurances of a field name in a line, the first is always the one linked. Must be one or greater.AdaptRegexReplacerTo.lineReplacer(AlterationRequired.YES, rr, filterAllBut)
rr is a
NewJavaDocLinkReplacerFor.field(instance, target, dbgRplcr_ifNonNull)
filterAllBut is a "result filter" that only accepts a single occurance.public static final TextLineAlterAdapter<StringReplacer> field(CodeletInstance instance, int line_occuranceNum, Field target, Appendable dbgRplcr_ifNonNull, Appendable dbgResultFilter_ifNonNull)
public static final TextLineAlterAdapter<StringReplacer> field(CodeletInstance instance, String debug_prefix, String dbgPreFieldNm_ifNonNull, int line_occuranceNum, Class<?> containing_class, String field_name)
Create a field link replacer with named debuggers.
Named debuggers provided to the following field parameters:
[debug_prefix].link.[dbgPreFieldNm_ifNonNull]: dbgRplcr_ifNonNull.validfilter: dbgResultFilter_ifNonNullPREFIX.link.DBGPREFIELDNM_IFNONNULL.=-1 PREFIX.link.DBGPREFIELDNM_IFNONNULL.validfilter=-1
instance - For determining the current debugging level.debug_prefix - Prepended to all named debuggers. May not be null or empty.dbgPreFieldNm_ifNonNull - If non-null, this is the name of the field (with potentially a class-dot prefix) used in the debug-level name. If null, the field's name is used.public static final TextLineAlterAdapter<StringReplacer> cclass(CodeletInstance instance, int line_occuranceNum, Class<?> target, Appendable dbgRplcr_ifNonNull, Appendable dbgResultFilter_ifNonNull)
Replaces a single occurance of a class name with a JavaDoc link.
line_occuranceNum - Which occurance should be linked? This is the n-th line in which the class name is found in the source code. If it exists in three lines (regardless how many occurances exist within those lines), and you want the second to have the link, set this to two. When there are multiple occurances of a class name in a line, the first is always the one linked. Must be one or greater.AdaptRegexReplacerTo.lineReplacer(AlterationRequired.YES, rr, filterAllBut)
rr is a
NewJavaDocLinkReplacerFor.cclass(urlToExampleClassPkgWSlash_fromTagletFile, class_name, dbgRplcr_ifNonNull)
filterAllBut is a "result filter" that only accepts a single occurance.public static final TextLineAlterAdapter<StringReplacer> cclass(CodeletInstance instance, String debug_prefix, String dbgPreClassNm_ifNonNull, int line_occuranceNum, Class<?> target)
Create a class link replacer with named debuggers.
Named debuggers provided to the following cclass parameters:
[debug_prefix].link.[dbgPreClassNm_ifNonNull]: dbgRplcr_ifNonNull.validfilter: dbgResultFilter_ifNonNullPREFIX.link.DBGPRECLASSNM_IFNONNULL.=-1 PREFIX.link.DBGPRECLASSNM_IFNONNULL.validfilter=-1
instance - For determining the current debugging level.debug_prefix - Prepended to all named debuggers. May not be null or empty.dbgPreClassNm_ifNonNull - If non-null, this is the name of the class used in the debug-level name. If null, target.getSimpleName() is used.public static final AllSimpleParamSignatures getAllParamSigsForLinkTarget(Class<?> target)
Get the object that translates function and constructor shortcut signatures to the method or constructor object they represent. These objects are only created once.
The map holding these class objects is given an initial capacity as in the configuration variable "unique_jd_class_target_init_capacity".
target - May not be null.Copyright 2014, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.
https://github.com/aliteralmind/codelet