001/*license*\ 002 Codelet: Copyright (C) 2014, Jeff Epstein (aliteralmind __DASH__ github __AT__ yahoo __DOT__ com) 003 004 This software is dual-licensed under the: 005 - Lesser General Public License (LGPL) version 3.0 or, at your option, any later version; 006 - Apache Software License (ASL) version 2.0. 007 008 Either license may be applied at your discretion. More information may be found at 009 - http://en.wikipedia.org/wiki/Multi-licensing. 010 011 The text of both licenses is available in the root directory of this project, under the names "LICENSE_lgpl-3.0.txt" and "LICENSE_asl-2.0.txt". The latest copies may be downloaded at: 012 - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt 013 - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt 014\*license*/ 015package com.github.aliteralmind.codelet; 016 import com.github.aliteralmind.codelet.alter.DefaultAlterGetterUtil; 017 import com.github.aliteralmind.codelet.alter.NewLineAltererFor; 018 import com.github.xbn.linefilter.alter.TextLineAlterer; 019 import com.github.xbn.linefilter.FilteredLineIterator; 020 import com.github.xbn.analyze.alter.ExpirableElements; 021 import com.github.xbn.analyze.alter.MultiAlterType; 022 import com.github.xbn.array.NullElement; 023 import com.github.xbn.lang.IllegalArgumentStateException; 024 import com.github.xbn.regexutil.IgnoreCase; 025 import com.github.xbn.regexutil.ReplacedInEachInput; 026 import com.github.xbn.util.DefaultValueFor; 027 import com.github.xbn.util.EnumUtil; 028 import java.util.List; 029 import java.util.regex.PatternSyntaxException; 030 import static com.github.aliteralmind.codelet.CodeletBaseConfig.*; 031/** 032 <p>Pre-made Codelet customizers.</p> 033 034 * @since 0.1.0 035 * @author Copyright (C) 2014, Jeff Epstein ({@code 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. <a href="http://codelet.aliteralmind.com">{@code http://codelet.aliteralmind.com}</a>, <a href="https://github.com/aliteralmind/codelet">{@code https://github.com/aliteralmind/codelet}</a> 036 **/ 037public class BasicCustomizers { 038 /** 039 <p><i>Text snippet:</i> Eliminates all lines except those between a specific start and end line, based on text found in those (start and end) lines. The start and end lines are also kept.</p> 040 041 <h4>Example</h4> 042 043 <P style="font-size: 125%;"><b>{@code {@.codelet com.github.aliteralmind.codelet.examples.adder.AdderDemo%lineRange(1, false, "Adder adder", 1, false, "println(adder.getSum())", "^ ")}}</b></p> 044 045 <p>Given <a href="{@docRoot}/overview-summary.html#xmpl_nocust">this source code</a>, this taglet displays the range of lines beginning with {@code "Adder adder"}, and ending with the <i>second</i> {@code "println(adder.getSum())"}. This also eliminates the indentation of the kept lines, which is two tabs at <a href="http://www.regular-expressions.info/anchors.html">line-start</a>: {@code "^ "}.</p> 046 047{@.codelet com.github.aliteralmind.codelet.examples.adder.AdderDemo%lineRange(1, false, "Adder adder", 2, false, "println(adder.getSum())", "^ ")} 048 049 050 <h4>Automated {@linkplain CodeletBootstrap#CODELET_RQD_NAMED_DBGRS_CONFIG_FILE named debuggers}</h4> 051 052 <p>{@code zzBasicCustomizers.lineRange}<ul> 053 <li>{@code .allalterer}: {@linkplain com.github.xbn.linefilter#AllTextLineAlterer(TextLineAlterer[], ExpirableElements, MultiAlterType, Appendable) All alterers}, as a whole.</li> 054 <li>{@code .elimindent}: <code>{@link com.github.aliteralmind.codelet.alter.NewLineAltererFor}.{@link com.github.aliteralmind.codelet.alter.NewLineAltererFor#eliminateIndentationOrNull(String, Appendable) eliminateIndentationOrNull}</code></li> 055 <li>{@code .linenums}: The start and end line numbers of the snippet.</li> 056 <li>{@code filter}: <code>{@link com.github.aliteralmind.codelet.NewLineFilterFor}.{@link com.github.aliteralmind.codelet.NewLineFilterFor#lineRange(int, boolean, String, Appendable, Appendable, int, boolean, String, Appendable, Appendable, Appendable, Appendable, LengthInRange) lineRange}.dbgEveryLine_ifNonNull</code><ul> 057 <li>{@code .endalterer}: <code>NewLineFilterFor.lineRange.dbgEnd_ifNonNull</code></li> 058 <li>{@code .endvalidfilter}: <code>NewLineFilterFor.lineRange.dbgEndFilter_ifNonNull</code></li> 059 <li>{@code .startalterer}: <code>NewLineFilterFor.lineRange.dbgStart_ifNonNull</code></li> 060 <li>{@code .startvalidfilter}: <code>NewLineFilterFor.lineRange.dbgStartFilter_ifNonNull</code></li> 061 </ul></li> 062 <li>{@code template}: The {@linkplain TagletOfTypeProcessor#getTemplateFromInstructionsOverrideOrDefault(CustomizationInstructions) template}</li> 063 </ul></p> 064 065 <p><b>Full names:</b></p> 066 067<blockquote><pre>zzBasicCustomizers.lineRange.allalterer 068zzBasicCustomizers.lineRange.elimindent 069zzBasicCustomizers.lineRange.linenums 070zzBasicCustomizers.lineRange.filter 071zzBasicCustomizers.lineRange.filter.endalterer 072zzBasicCustomizers.lineRange.filter.endvalidfilter 073zzBasicCustomizers.lineRange.filter.startalterer 074zzBasicCustomizers.lineRange.filter.startvalidfilter 075zzBasicCustomizers.lineRange.template</pre></blockquote> 076 077 * @param instance May not be {@code null}. <i>When calling this customizer from a taglet, exclude this parameter. All other parameters are required.</i> 078 * @param startAppearance_num If the text to be found ({@code startLine_findWhat}) exists in multiple lines, this is the one to use. Must be greater than zero (although {@code -1}, meaning "ignore this setting", is equivalent to {@code 1}: the first appearance). 079 * @param is_startLineRegex If {@code true} then {@code startLine_findWhat} is treated as a regular expression. Otherwise, {@code startLine_findWhat} is treated as a literal. 080 * @param startLine_findWhat The search term that defines the line-range start line. If a regex, this may or may not include start or end-of-line anchors ({@code '^'} and {@code '$'}) (matching is done with <code>{@link java.util.regex.Matcher Matcher}.{@link java.util.regex.Matcher#find() find}()</code>). 081 * @param endAppearance_num The appearance number of the end-line search term. If it happens to exist before the start-line search-term, then this parameter must be at least equal to two. 082 * @param is_endLineRegex If {@code true} then {@code endLine_findWhat} is treated as a regular expression. 083 * @param endLine_findWhat The search term that defines the line-range end line. 084 * @param indentRegexToElim_emptyStrIfNone The regular expression representing the indentation that should be eliminated from the line-range. Since these lines exist in the middle of a file, they may be {@linkplain com.github.aliteralmind.codelet.alter.NewLineAltererFor#eliminateIndentationOrNull(String, Appendable) extra-indented}. 085 * @return <code>CustomizationInstructions.<T>newForMaybeElimIndent_tabToSpcEscHtml(instance, filter, indentRegexToElim_emptyStrIfNone)</code> 086 <br/>Where {@code filter} is created with 087 <br/> <code>{@link com.github.aliteralmind.codelet.NewLineFilterFor NewLineFilterFor}.{@link com.github.aliteralmind.codelet.NewLineFilterFor#lineRange(int, boolean, String, Appendable, Appendable, int, boolean, String, Appendable, Appendable, Appendable, Appendable, LengthInRange) lineRange}</code> 088 * @see #lineRangeWithReplace(CodeletInstance, CodeletType, Integer, Boolean, String, String, String, Integer, Boolean, String, String, String, String) lineRangeWithReplace 089 */ 090 public static final <T extends CodeletTemplateBase> CustomizationInstructions<T> lineRange(CodeletInstance instance, CodeletType needed_defaultAlterType, Integer startAppearance_num, Boolean is_startLineRegex, String startLine_findWhat, Integer endAppearance_num, Boolean is_endLineRegex, String endLine_findWhat, String indentRegexToElim_emptyStrIfNone) throws PatternSyntaxException { 091 //Named debuggers appendables 092 String debugPrefix = "zzBasicCustomizers.lineRange"; 093 094 FilteredLineIterator filter = NewLineFilterFor.lineRange(instance, debugPrefix, 095 startAppearance_num, is_startLineRegex, startLine_findWhat, 096 endAppearance_num, is_endLineRegex, endLine_findWhat); 097 098 TextLineAlterer[] alterers = DefaultAlterGetterUtil. 099 getAlterArrayWithDefaultAlterersAdded( 100 needed_defaultAlterType, 101 NewLineAltererFor.eliminateIndentationOrNull( 102 indentRegexToElim_emptyStrIfNone, 103 getDebugApblIfOn(instance, debugPrefix + ".elimindent"))); 104 105 return new CustomizationInstructions<T>(instance, needed_defaultAlterType).filter(filter). 106 orderedAlterers( 107 getDebugApblIfOn(instance, debugPrefix + ".allalterer"), 108 NullElement.BAD, ExpirableElements.OPTIONAL, 109 MultiAlterType.CUMULATIVE, alterers). 110 defaultOrOverrideTemplate( 111 getDebugApblIfOn(instance, debugPrefix + ".template")). 112 build(); 113 } 114 /** 115 <p><i>Text snippet:</i> Eliminates all lines except those between a specific start and end line, based on text found in those (start and end) lines--also makes replacements on the start and end lines only. The start and end lines are also kept. This function is useful when lines must be marked, but those marks should not be seen in the final output.</p> 116 117 <h4>Example</h4> 118 119 <P style="font-size: 125%;"><b>{@code {@.codelet com.github.aliteralmind.codelet.examples.adder.AdderDemoWithSnippetEndMarker%lineRangeWithReplace(1, true, "(Adder adder)", "$1", "FIRST", 1, true, "; +//End snippet$", ";", "FIRST", "^ ")}}</b></p> 120 121{@.codelet com.github.aliteralmind.codelet.examples.adder.AdderDemoWithSnippetEndMarker%lineRangeWithReplace(1, true, "(Adder adder)", "$1", "FIRST", 1, true, "; +//End snippet$", ";", "FIRST", "^ ")} 122 123 <p>Snippet starts with the line containing {@code "Adder adder"}, which is replaced with itself: {@code "$1"}. The last line in the range ends the regular expression {@code "; +//End snippet$"} which is replaced with a semi-colon. This also deletes the indentation of the kept lines, which is two tabs at <a href="http://www.regular-expressions.info/anchors.html">line-start</a>: {@code "^ "}. <i>{@linkplain examples.LineRangeWithReplace View example}</i></p> 124 125 <p>This only documents things that are different from {@link #lineRange(CodeletInstance, CodeletType, Integer, Boolean, String, Integer, Boolean, String, String) lineRange}.</p> 126 127 <h4>Automated {@linkplain CodeletBootstrap#CODELET_RQD_NAMED_DBGRS_CONFIG_FILE named debuggers}</h4> 128 129 <p>{@code zzBasicCustomizers.lineRangeWithReplace}<ul> 130 <li>{@code allalterer}: {@linkplain com.github.xbn.linefilter#AllTextLineAlterer(TextLineAlterer[], ExpirableElements, MultiAlterType, Appendable) All alterers}, as a whole.</li> 131 <li>{@code .elimindent}: <code>{@link com.github.aliteralmind.codelet.alter.NewLineAltererFor}.{@link com.github.aliteralmind.codelet.alter.NewLineAltererFor#eliminateIndentationOrNull(String, Appendable) eliminateIndentationOrNull}</code></li> 132 <li>{@code filter}: <code>{@link com.github.aliteralmind.codelet.NewLineFilterFor}.{@link com.github.aliteralmind.codelet.NewLineFilterFor#lineRange(int, boolean, String, Appendable, Appendable, int, boolean, String, Appendable, Appendable, Appendable, Appendable, LengthInRange) lineRange}.dbgEveryLine_ifNonNull</code><ul> 133 <li>{@code .endalterer}: <code>NewLineFilterFor.lineRange.dbgEnd_ifNonNull</code></li> 134 <li>{@code .endvalidfilter}: <code>NewLineFilterFor.lineRange.dbgEndFilter_ifNonNull</code></li> 135 <li>{@code .startalterer}: <code>NewLineFilterFor.lineRange.dbgStart_ifNonNull</code></li> 136 <li>{@code .startvalidfilter}: <code>NewLineFilterFor.lineRange.dbgStartFilter_ifNonNull</code></li> 137 </ul></li> 138 <li>{@code template}: The {@linkplain TagletOfTypeProcessor#getTemplateFromInstructionsOverrideOrDefault(CustomizationInstructions) template}</li> 139 </ul></p> 140 141 <p><b>Full names:</b></p> 142 143<blockquote><pre>zzBasicCustomizers.lineRangeWithReplace.allalterer 144zzBasicCustomizers.lineRangeWithReplace.elimindent 145zzBasicCustomizers.lineRangeWithReplace.filter 146zzBasicCustomizers.lineRangeWithReplace.filter.endalterer 147zzBasicCustomizers.lineRangeWithReplace.filter.endvalidfilter 148zzBasicCustomizers.lineRangeWithReplace.filter.startalterer 149zzBasicCustomizers.lineRangeWithReplace.filter.startvalidfilter 150zzBasicCustomizers.lineRangeWithReplace.template</pre></blockquote> 151 152 * @param startLine_findWhat The text or match that defines the line-range start line. To search for text only (make no replacement), either set<ul> 153 <li>{@code is_startLineRegex} to {@code false}, and</li> 154 <li>both {@code startLine_findWhat} ({@code "text to find"}) and {@code startLine_rplcWith} to the same text ({@code "text to find"})</li> 155 </ul>or<ul> 156 <li>{@code is_startLineRegex} to {@code true},</li> 157 <li>{@code startLine_findWhat} to the expected text surrounded by a <a href="http://stackoverflow.com/questions/21880127/have-trouble-understanding-capturing-groups-and-back-references">capture group</a> ({@code "(text to find)"}), and</li> 158 <li>{@code startLine_rplcWith} to {@code "$1"}</li> 159 </ul> 160 * @param startRplcWhat_notMatchNums In most cases, this should be set to {@code "FIRST"}. See <code>com.github.xbn.regexutil.{@link com.github.xbn.regexutil.ReplacedInEachInput}</code>. 161 */ 162 public static final <T extends CodeletTemplateBase> CustomizationInstructions<T> lineRangeWithReplace(CodeletInstance instance, CodeletType needed_defaultAlterType, Integer startAppearance_num, Boolean is_startLineRegex, String startLine_findWhat, String startLine_rplcWith, String startRplcWhat_notMatchNums, Integer endAppearance_num, Boolean is_endLineRegex, String endLine_findWhat, String endLine_rplcWith, String endRplcWhat_notMatchNums, String indentRegexToElim_emptyStrIfNone) throws PatternSyntaxException { 163 String debugPrefix = "zzBasicCustomizers.lineRangeWithReplace"; 164 165 ReplacedInEachInput rplcsStart = EnumUtil.toValueWithNullDefault(startRplcWhat_notMatchNums, "startRplcWhat_notMatchNums", IgnoreCase.NO, DefaultValueFor.NOTHING, ReplacedInEachInput.ALL); 166 ReplacedInEachInput rplcsEnd = EnumUtil.toValueWithNullDefault(endRplcWhat_notMatchNums, "startRplcWhat_notMatchNums", IgnoreCase.NO, DefaultValueFor.NOTHING, ReplacedInEachInput.ALL); 167 168 FilteredLineIterator filter = NewLineFilterFor.lineRangeWithReplace( 169 instance, debugPrefix, 170 startAppearance_num, is_startLineRegex, 171 startLine_findWhat, startLine_rplcWith, rplcsStart, 172 endAppearance_num, is_endLineRegex, 173 endLine_findWhat, endLine_rplcWith, rplcsEnd); 174 175 TextLineAlterer[] alterers = DefaultAlterGetterUtil.getAlterArrayWithDefaultAlterersAdded( 176 needed_defaultAlterType, 177 NewLineAltererFor.eliminateIndentationOrNull( 178 indentRegexToElim_emptyStrIfNone, 179 getDebugApblIfOn(instance, debugPrefix + ".elimindent"))); 180 181 return new CustomizationInstructions<T>(instance, needed_defaultAlterType).filter(filter). 182 orderedAlterers( 183 getDebugApblIfOn(instance, debugPrefix + ".allalterer"), 184 NullElement.OK, ExpirableElements.OPTIONAL, 185 MultiAlterType.CUMULATIVE, alterers). 186 defaultOrOverrideTemplate( 187 getDebugApblIfOn(instance, debugPrefix + ".template")). 188 build(); 189 } 190 /** 191 <p>Eliminate all multi-line comments and the package declaration line.</p> 192 193 * @return <code>eliminateCmtBlocksPkgLineAndPkgReferences(instance, needed_defaultAlterType, {@link java.lang.Boolean}.{@link java.lang.Boolean#TRUE TRUE}, Boolean.TRUE, Boolean.{@link java.lang.Boolean#FALSE FALSE})</code> 194 */ 195 public static final <T extends CodeletTemplateBase> CustomizationInstructions<T> eliminateCommentBlocksAndPackageDecl(CodeletInstance instance, CodeletType needed_defaultAlterType) { 196 return eliminateCmtBlocksPkgLineAndPkgReferences(instance, needed_defaultAlterType, Boolean.TRUE, Boolean.TRUE, Boolean.FALSE); 197 } 198 199 /** 200 <p>Eliminate all multi-line comments, the package declaration line, and any references to that package.</p> 201 202 <h4>Examples</h4> 203 204 <P style="font-size: 125%;"><b>{@code {@.codelet com.github.aliteralmind.codelet.examples.adder.Adder%eliminateCmtBlocksPkgLineAndPkgReferences(false, true, false)}}</b></p> 205 206{@.codelet com.github.aliteralmind.codelet.examples.adder.Adder%eliminateCmtBlocksPkgLineAndPkgReferences(false, true, false)} 207 208 <p>Prints all lines except the package declaration. <i>{@linkplain examples.EliminatePackageDeclarationLine Full example}</i></p> 209 210 <P style="font-size: 125%;"><b>{@code {@.codelet com.github.aliteralmind.codelet.examples.adder.AdderDemoWithFullyQualified%eliminateCommentBlocksAndPackageDecl()}}</b></p> 211 212{@.codelet com.github.aliteralmind.codelet.examples.adder.AdderDemoWithFullyQualified%eliminateCommentBlocksAndPackageDecl()} 213 214 <p>Eliminates the package declaration and all multi-line comment blocks (including license and JavaDoc). <i>(<a href="{@docRoot}/overview-summary.html#xmpl_hello">Intro example</a>)</i></p> 215 216 <h4>Automated {@linkplain CodeletBootstrap#CODELET_RQD_NAMED_DBGRS_CONFIG_FILE named debuggers}</h4> 217 218 <p>{@code zzBasicCustomizers.eliminateCmtBlocksPkgLineAndPkgReferences}<ul> 219 <li>{@code alterers}: {@linkplain com.github.xbn.linefilter#AllTextLineAlterer(TextLineAlterer[], ExpirableElements, MultiAlterType, Appendable) All alterers}, as a whole</li> 220 <li>{@code blockmarks}: <code>{@link com.github.aliteralmind.codelet.NewLineFilterFor}.{@link com.github.aliteralmind.codelet.NewLineFilterFor#eliminateAllCmtBlocksAndPackageLine(boolean, Appendable, Appendable, boolean, Appendable, Appendable) lineRange}.dbgBlockMarks_ifNonNull</code></li> 221 <li>{@code filter}: {@code NewLineFilterFor.eliminateAllCmtBlocksAndPackageLine.dbgLnFilter_ifNonNull}</li> 222 <li>{@code pkglinevalidator}: {@code NewLineFilterFor.eliminateAllCmtBlocksAndPackageLine.dbgPkgLnVldtr_ifNonNull}</li> 223 <li>{@code pkglinevalidfilter}: {@code NewLineFilterFor.eliminateAllCmtBlocksAndPackageLine.dbgValidResultFilter_ifNonNull}</li> 224 <li>{@code template}: {@code NewLineFilterFor.eliminateAllCmtBlocksAndPackageLine.dbgPkgLnVldtr_ifNonNull}</li> 225 <li>{@code elimpkgrefsreplacer}: <code>{@link com.github.aliteralmind.codelet.alter.NewLineAltererFor}.{@link com.github.aliteralmind.codelet.alter.NewLineAltererFor#elimPackageReferences(CodeletInstance, Appendable) elimPackageReferences}</code></li> 226 </ul></p> 227 228 <p><b>Full names:</b></p> 229 230<blockquote><pre>zzBasicCustomizers.eliminateCmtBlocksPkgLineAndPkgReferences.alterers 231zzBasicCustomizers.eliminateCmtBlocksPkgLineAndPkgReferences.blockmarks 232zzBasicCustomizers.eliminateCmtBlocksPkgLineAndPkgReferences.filter 233zzBasicCustomizers.eliminateCmtBlocksPkgLineAndPkgReferences.pkglinevalidator 234zzBasicCustomizers.eliminateCmtBlocksPkgLineAndPkgReferences.pkglinevalidfilter 235zzBasicCustomizers.eliminateCmtBlocksPkgLineAndPkgReferences.template 236zzBasicCustomizers.eliminateCmtBlocksPkgLineAndPkgReferences.elimpkgrefsreplacer</pre></blockquote> 237 238 * @return A non-{@code null} instructions object, using the {@linkplain CustomizationInstructions#defaultOrOverrideTemplate(Appendable) default template}, where the filter is created by 239 <br/> <code>{@link com.github.aliteralmind.codelet.NewLineFilterFor NewLineFilterFor}.{@link com.github.aliteralmind.codelet.NewLineFilterFor#eliminateAllCmtBlocksAndPackageLine(boolean, Appendable, Appendable, boolean, Appendable, Appendable) eliminateAllCmtBlocksAndPackageLine}</code> 240 <br/>The {@code dbgLnFilter_ifNonNull} parameter is set to 241 <br/> <code>{@link CodeletBaseConfig CodeletBaseConfig}.{@link CodeletBaseConfig#getDebugApblIfOn(CodeletInstance) getDebugApblIfOn}(instance)</code> 242 <br/>All other debugging parameters are set to 243 <br/> <code>{@link CodeletBaseConfig CodeletBaseConfig}.{@link CodeletBaseConfig#getDebugApblIfOn(3, CodeletInstance) getDebugApblIfTagletVerbose}(instance)</code> 244 * @param doElim_allPkgRefs If {@code doElim_packageDecl} is {@code false}, this must also be {@code false}. 245 * @see #eliminateCommentBlocksAndPackageDecl(CodeletInstance, CodeletType) eliminateCommentBlocksAndPackageDecl 246 */ 247 public static final <T extends CodeletTemplateBase> CustomizationInstructions<T> eliminateCmtBlocksPkgLineAndPkgReferences(CodeletInstance instance, CodeletType needed_defaultAlterType, Boolean doElim_multiLineCmts, Boolean doElim_packageDecl, Boolean doElim_allPkgRefs) { 248 String debugPrefix = "zzBasicCustomizers.eliminateCmtBlocksPkgLineAndPkgReferences"; 249 250 FilteredLineIterator filter = NewLineFilterFor. 251 eliminateAllCmtBlocksAndPackageLine(instance, debugPrefix, 252 doElim_packageDecl, doElim_multiLineCmts); 253 254 CustomizationInstructions<T> instructions = (new CustomizationInstructions<T>(instance, needed_defaultAlterType)). 255 filter(filter). 256 defaultOrOverrideTemplate( 257 getDebugApblIfOn(instance, debugPrefix + ".template")); 258 259 List<TextLineAlterer> alterList = DefaultAlterGetterUtil. 260 newEmptyArrayListWithDefaultInitCapacityPlus(needed_defaultAlterType, 1); 261 if(doElim_allPkgRefs) { 262 if(!doElim_packageDecl) { 263 throw new IllegalArgumentStateException("doElim_allPkgRefs is true, but doElim_packageDecl is false."); 264 } 265 266 alterList.add(NewLineAltererFor.elimPackageReferences( 267 instance, getDebugApblIfOn(instance, debugPrefix + ".elimpkgrefs"))); 268 } 269 270 TextLineAlterer[] alterers = DefaultAlterGetterUtil. 271 getAlterArrayWithDefaultAlterersAdded(needed_defaultAlterType, alterList); 272 273 return instructions.orderedAlterers( 274 getDebugApblIfOn(instance, debugPrefix + ".allalterer"), 275 NullElement.BAD, ExpirableElements.OPTIONAL, 276 MultiAlterType.CUMULATIVE, alterers). 277 build(); 278 } 279 private BasicCustomizers() { 280 throw new IllegalStateException("Do not instantiate."); 281 } 282}