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.type;
016   import  com.github.aliteralmind.codelet.CodeletType;
017   import  com.github.aliteralmind.codelet.UserExtraGapGetter;
018   import  com.github.aliteralmind.codelet.CodeletGap;
019   import  com.github.aliteralmind.codelet.CodeletBaseConfig;
020   import  com.github.aliteralmind.codelet.CodeletInstance;
021   import  com.github.aliteralmind.codelet.TagletTextUtil;
022   import  com.github.aliteralmind.templatefeather.FeatherTemplate;
023   import  java.util.Map;
024   import  java.util.Set;
025   import  java.util.TreeMap;
026   import  static com.github.xbn.lang.XbnConstants.*;
027/**
028   <p>The text into which {@code {@.codelet}} output (the example-code's source) is placed.</p>
029
030   <A NAME="gaps"></a><h2><a href="{@docRoot}/overview-summary.html#overview_description"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a> &nbsp; Codelet: {@code {@.codelet}}: Template: <u>Gap names</u></h2>
031
032   <p>The only required gap is &quot;{@link com.github.aliteralmind.codelet.type.OnlyOneBodyGapTemplateBase#BODY_GAP_NAME body}&quot;, which is where the fully-processed source-code is placed.</p>
033
034   <p>In addition to any {@linkplain com.github.aliteralmind.codelet.UserExtraGapGetter#getForSourceCodelet() user-extra} gaps, the {@code {@.codelet}} template also provides for the following &quot;default&quot; optional gaps:</p>
035
036   <A NAME="codelet_tmpl_gaps_url"></a><p><a href="SourceCodeTemplate.html"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a> &nbsp; <b>Url-related:</b></p>
037
038   <p><TABLE ALIGN="center" BORDER="1" CELLSPACING="0" CELLPADDING="4" BGCOLOR="#EEEEEE"><TR ALIGN="center" VALIGN="middle">
039      <TD><b><u>Name</u></b></TD>
040      <TD><b><u>Description</u></b></TD>
041   </TR><TR>
042      <TD>{@link #GAP_SOURCE_URL source_url}</TD>
043      <TD>The absolute url to the example code's source file, <a href="http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/javadoc.html#linksource">as created by</a> JavaDoc (in <a href="{@docRoot}/src-html/">{@code {@docRoot}/src-html/}</a>)</TD>
044   </TR><TR>
045      <TD>{@link #GAP_JAVADOC_URL javadoc_url}</TD>
046      <TD>The absolute url to the example code's JavaDoc.</TD>
047   </TR><TR>
048      <TD>{@link #GAP_FQ_CLASS_NAME_URL fq_class_name_url}</TD>
049      <TD>The example's fully-qualified class name, with dots ({@code '.'}) replaced by url-slashes ({@code '/'}).</TD>
050   </TR><TR>
051      <TD>{@link #GAP_PACKAGE_URL package_url}</TD>
052      <TD>The example code's package, with dots ({@code '.'}) replaced by url-slashes ({@code '/'}).</TD>
053   </TR></TABLE></p>
054
055   <A NAME="codelet_tmpl_gaps_dir"></a><p><a href="SourceCodeTemplate.html"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a> &nbsp; <b>Non-url related:</b></p>
056
057   <p><TABLE ALIGN="center" BORDER="1" CELLSPACING="0" CELLPADDING="4" BGCOLOR="#EEEEEE"><TR ALIGN="center" VALIGN="middle">
058      <TD><b><u>Name</u></b></TD>
059      <TD><b><u>Description</u></b></TD>
060   </TR><TR>
061      <TD>{@link #GAP_SRC_PATH source_path}</TD>
062      <TD>The full on-disk path to the example code's source file.</TD>
063   </TR><TR>
064      <TD>{@link #GAP_SRC_BASE_DIR source_base_dir}</TD>
065      <TD>The on-disk directory in which the <i>top-most package</i> of example source-code file exists.</TD>
066   </TR><TR>
067      <TD>{@link #GAP_SIMPLE_CLASS_NAME simple_class_name}</TD>
068      <TD>The example code's non-fully-qualified class name.</TD>
069   </TR><TR>
070      <TD>{@link #GAP_FQ_CLASS_NAME fq_class_name}</TD>
071      <TD>The example code's fully-qualified class name.</TD>
072   </TR><TR>
073      <TD>{@link #GAP_FQ_CLASS_NAME_DIR fq_class_name_dir}</TD>
074      <TD>The example's fully-qualified class name, with dots {@code '.'} replaced by file-separators.</TD>
075   </TR><TR>
076      <TD>{@link #GAP_PACKAGE package}</TD>
077      <TD>The example code's package name.</TD>
078   </TR><TR>
079      <TD>{@link #GAP_PACKAGE_DIR package_dir}</TD>
080      <TD>The example's package name, with dots {@code '.'} replaced by file-separators.</TD>
081   </TR></TABLE></p>
082
083 * @since  0.1.0
084 * @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>
085 **/
086public class SourceCodeTemplate extends OnlyOneBodyGapTemplateBase  {
087   /**
088      <p>The full on-disk path to the example code's source file--Gap name is {@code "source_path"}.</p>
089
090      <p>Gap is {@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) filled} with</p>
091
092      <p><code>{@link com.github.aliteralmind.codelet.TagletTextUtil TagletTextUtil}.{@link com.github.aliteralmind.codelet.TagletTextUtil#getJavaSourceFilePath(CodeletInstance) getJavaSourceFilePath}(<i>[the-instance]</i>)</code></p>
093
094    * @see  <a href="#codelet_tmpl_gaps_dir"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a>
095    * @see  #GAP_SRC_BASE_DIR
096    */
097   public static final CodeletGap GAP_SRC_PATH = new SourcePathGap();
098   /**
099      <p>The on-disk directory in which the <i>top-most package</i> of example source-code file exists--Gap name is {@code "source_base_dir"}.</p>
100
101      <p>Gap is {@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) filled} with</p>
102
103<blockquote><pre>{@link com.github.aliteralmind.codelet.CodeletBaseConfig CodeletBaseConfig}.{@link com.github.aliteralmind.codelet.CodeletBaseConfig#INSTANCE INSTANCE}.{@link com.github.aliteralmind.codelet.CodeletBaseConfig#getExampleSourceBaseDir() getExampleClassFQName}()</pre></blockquote>
104
105    * @see  <a href="#codelet_tmpl_gaps_dir"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a>
106    * @see  #GAP_SRC_PATH
107    */
108   public static final CodeletGap GAP_SRC_BASE_DIR = new SourceBaseDirGap();
109   /**
110      <p>The example code's non-fully-qualified class name--Gap name is {@code "simple_class_name"}.</p>
111
112      <p>Gap is {@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) filled} with</p>
113
114<blockquote><pre>{@link com.github.aliteralmind.codelet.TagletTextUtil TagletTextUtil}.{@link com.github.aliteralmind.codelet.TagletTextUtil#getExampleSimpleClassName(CodeletInstance) getExampleSimpleClassName}(<i>[the-instance]</i>)</pre></blockquote>
115
116    * @see  <a href="#codelet_tmpl_gaps_dir"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a>
117    * @see  #GAP_FQ_CLASS_NAME
118    * @see  #GAP_PACKAGE
119    */
120   public static final CodeletGap GAP_SIMPLE_CLASS_NAME = new ClassNameGap();
121   /**
122      <p>The example code's fully-qualified class name--Gap name is {@code "fq_class_name"}.</p>
123
124      <p>Gap is {@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) filled} with</p>
125
126<blockquote><pre>{@link com.github.aliteralmind.codelet.TagletTextUtil TagletTextUtil}.{@link com.github.aliteralmind.codelet.TagletTextUtil#getExampleClassFQName(CodeletInstance) getExampleClassFQName}(<i>[the-instance]</i>)</pre></blockquote>
127
128    * @see  <a href="#codelet_tmpl_gaps_dir"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a>
129    * @see  #GAP_FQ_CLASS_NAME_DIR
130    * @see  #GAP_FQ_CLASS_NAME_URL
131    * @see  #GAP_PACKAGE
132    * @see  #GAP_SIMPLE_CLASS_NAME
133    */
134   public static final CodeletGap GAP_FQ_CLASS_NAME = new FQClassNameGap();
135   /**
136      <p>The example's fully-qualified class name, with dots ({@code '.'}) replaced by url-slashes ({@code '/'})--Gap name is {@code "fq_class_name_url"}.</p>
137
138      <p>Example input:<ol>
139         <li>Example code's {@linkplain com.github.aliteralmind.codelet.TagletTextUtil#getExampleClassFQName(CodeletInstance) fully-qualified class name}: {@code "fully.qualified.examples.AnExample"}</li>
140      </ol></p>
141
142      <p>{@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) Output}:</p>
143
144      <p>{@code "fully/qualified/examples/AnExample"}</p>
145
146      <p>Gap is {@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) filled} with</p>
147
148<blockquote><pre>{@link com.github.aliteralmind.codelet.TagletTextUtil TagletTextUtil}.{@link com.github.aliteralmind.codelet.TagletTextUtil#getExampleClassFQName(CodeletInstance) getExampleClassFQName}(<i>[the-instance]</i>).{@link java.lang.String#replace(CharSequence, CharSequence) replace}(&quot;.&quot;, &quot;/&quot;)</pre></blockquote>
149
150    * @see  <a href="#codelet_tmpl_gaps_url"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a>
151    * @see  #GAP_FQ_CLASS_NAME
152    */
153   public static final CodeletGap GAP_FQ_CLASS_NAME_URL = new FQClassNameUrlGap();
154   /**
155      <p>The example's fully-qualified class name, with dots {@code '.'} replaced by file-separators--Gap name is {@code "fq_class_name_dir"}.</p>
156
157      <p>Example input:<ol>
158         <li>Example code's {@linkplain com.github.aliteralmind.codelet.TagletTextUtil#getExampleClassFQName(CodeletInstance) fully-qualified class name}: {@code "fully.qualified.examples.AnExample"}</li>
159      </ol></p>
160
161      <p>{@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) Output} (assuming Microsoft Windows):</p>
162
163      <p>{@code "fully\qualified\examples\AnExample"}</p>
164
165      <p>Gap is {@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) filled} with</p>
166
167<blockquote><pre>{@link com.github.aliteralmind.codelet.TagletTextUtil TagletTextUtil}.{@link com.github.aliteralmind.codelet.TagletTextUtil#getExampleClassFQName(CodeletInstance) getExampleClassFQName}(<i>[the-instance]</i>).{@link java.lang.String#replace(CharSequence, CharSequence) replace}(&quot;.&quot;, {@link com.github.xbn.lang.XbnConstants#FILE_SEP FILE_SEP}*)</pre></blockquote>
168
169    * @see  <a href="#codelet_tmpl_gaps_dir"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a>
170    * @see  #GAP_FQ_CLASS_NAME
171    */
172   public static final CodeletGap GAP_FQ_CLASS_NAME_DIR = new FQClassNameDirGap();
173   /**
174      <p>The absolute url to the example code's source file, <a href="http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/javadoc.html#linksource">as created by</a> JavaDoc (in <a href="{@docRoot}/src-html/">{@code {@docRoot}/src-html/}</a>)--Gap name is {@code "source_url"}.</p>
175
176      <p>Gap is {@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) filled} with</p>
177
178<blockquote><pre>{@link com.github.aliteralmind.codelet.TagletTextUtil TagletTextUtil}.{@link com.github.aliteralmind.codelet.TagletTextUtil#getJavaDocSourceUrl(CodeletInstance) getJavaDocSourceUrl}(<i>[the-instance]</i>)</pre></blockquote>
179
180    * @see  <a href="#codelet_tmpl_gaps_url"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a>
181    * @see  #GAP_JAVADOC_URL
182    */
183   public static final CodeletGap GAP_SOURCE_URL = new SourceUrlGap();
184   /**
185      <p>The absolute url to the example code's JavaDoc--Gap name is {@code "javadoc_url"}.</p>
186
187      <p>Gap is {@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) filled} with</p>
188
189<blockquote><pre>{@link com.github.aliteralmind.codelet.TagletTextUtil TagletTextUtil}.{@link com.github.aliteralmind.codelet.TagletTextUtil#getJavaDocSourceUrl(CodeletInstance) getJavaDocSourceUrl}(<i>[the-instance]</i>)</pre></blockquote>
190
191    * @see  <a href="#codelet_tmpl_gaps_url"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a>
192    * @see  #GAP_SOURCE_URL
193    */
194   public static final CodeletGap GAP_JAVADOC_URL = new JavadocUrlGap();
195   /**
196      <p>The example code's package name--Gap name is {@code "package"}.</p>
197
198      <p>Gap is {@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) filled} with</p>
199
200<blockquote><pre>{@link com.github.aliteralmind.codelet.TagletTextUtil TagletTextUtil}.{@link com.github.aliteralmind.codelet.TagletTextUtil#getExamplePackageName(CodeletInstance) getExamplePackageName}(<i>[the-instance]</i>)</pre></blockquote>
201
202    * @see  <a href="#codelet_tmpl_gaps_dir"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a>
203    * @see  #GAP_PACKAGE_DIR
204    * @see  #GAP_PACKAGE_URL
205    * @see  #GAP_FQ_CLASS_NAME
206    * @see  #GAP_SIMPLE_CLASS_NAME
207    */
208   public static final CodeletGap GAP_PACKAGE = new PackageGap();
209   /**
210      <p>The example code's package, with dots ({@code '.'}) replaced by url-slashes ({@code '/'})--Gap name is {@code "package_url"}.</p>
211
212      <p>Example input:<ol>
213         <li>The example code's {@linkplain com.github.aliteralmind.codelet.TagletTextUtil#getExampleClassFQName(CodeletInstance) fully-qualified class name}: {@code "fully.qualified.examples.AnExample"}</li>
214      </ol></p>
215
216      <p>{@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) Output}:</p>
217
218      <p>{@code "fully/qualified/examples"}</p>
219
220      <p>Gap is {@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) filled} with</p>
221
222<blockquote><pre>{@link com.github.aliteralmind.codelet.TagletTextUtil TagletTextUtil}.{@link com.github.aliteralmind.codelet.TagletTextUtil#getExamplePackageName(CodeletInstance) getExamplePackageName}(<i>[the-instance]</i>).{@link java.lang.String#replace(CharSequence, CharSequence) replace}(&quot;.&quot;, &quot;/&quot;)</pre></blockquote>
223
224    * @see  <a href="#codelet_tmpl_gaps_url"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a>
225    * @see  #GAP_PACKAGE
226    */
227   public static final CodeletGap GAP_PACKAGE_URL = new PackageUrlGap();
228   /**
229      <p>The example's package name, with dots {@code '.'} replaced by file-separators--Gap name is {@code "package_dir"}.</p>
230
231      <p>Example input:<ol>
232         <li>The example code's {@linkplain com.github.aliteralmind.codelet.TagletTextUtil#getExampleClassFQName(CodeletInstance) fully-qualified class name}: {@code "fully.qualified.examples.AnExample"}</li>
233      </ol></p>
234
235      <p>{@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) Output} (assuming Microsoft Windows):</p>
236
237      <p>{@code "fully\qualified\examples"}</p>
238
239      <p>Gap is {@linkplain com.github.aliteralmind.codelet.CodeletGap#getFillText(CodeletInstance) filled} with</p>
240
241<blockquote><pre>{@link com.github.aliteralmind.codelet.TagletTextUtil TagletTextUtil}.{@link com.github.aliteralmind.codelet.TagletTextUtil#getExamplePackageName(CodeletInstance) getExamplePackageName}(<i>[the-instance]</i>).{@link java.lang.String#replace(CharSequence, CharSequence) replace}(&quot;.&quot;, {@link com.github.xbn.lang.XbnConstants#FILE_SEP FILE_SEP}*)</pre></blockquote>
242
243    * @see  <a href="#codelet_tmpl_gaps_dir"><IMG SRC="{@docRoot}/resources/up_arrow.gif"/></a>
244    * @see  #GAP_PACKAGE
245    */
246   public static final CodeletGap GAP_PACKAGE_DIR = new PackageDirGap();
247
248   /**
249      <p>Create the first instance.</p>
250
251    * <p>Equal to</p>
252
253<blockquote><pre>
254{@link com.github.aliteralmind.codelet.type.OnlyOneBodyGapTemplateBase#OnlyOneBodyGapTemplateBase(CodeletType, FeatherTemplate, String, CodeletGap[], UserExtraGapGetter) super}({@link com.github.aliteralmind.codelet.CodeletType CodeletType}.{@link com.github.aliteralmind.codelet.CodeletType#SOURCE_CODE SOURCE_CODE}, template, tmpl_path,
255   new CodeletGap[] {
256      {@link #GAP_SRC_PATH},
257      {@link #GAP_SRC_BASE_DIR},
258      {@link #GAP_SIMPLE_CLASS_NAME},
259      {@link #GAP_FQ_CLASS_NAME},
260      {@link #GAP_FQ_CLASS_NAME_URL},
261      {@link #GAP_FQ_CLASS_NAME_DIR},
262      {@link #GAP_SOURCE_URL},
263      {@link #GAP_JAVADOC_URL},
264      {@link #GAP_PACKAGE},
265      {@link #GAP_PACKAGE_URL},
266      {@link #GAP_PACKAGE_DIR}},
267   userExtra_getter)
268</pre></blockquote>
269    * @see  #SourceCodeTemplate(SourceCodeTemplate, FeatherTemplate, String)
270    */
271   public SourceCodeTemplate(FeatherTemplate template, String tmpl_path, UserExtraGapGetter userExtra_getter)  {
272      super(CodeletType.SOURCE_CODE, template, tmpl_path,
273         new CodeletGap[] {
274            GAP_SRC_PATH,
275            GAP_SRC_BASE_DIR,
276            GAP_SIMPLE_CLASS_NAME,
277            GAP_FQ_CLASS_NAME,
278            GAP_FQ_CLASS_NAME_URL,
279            GAP_FQ_CLASS_NAME_DIR,
280            GAP_SOURCE_URL,
281            GAP_JAVADOC_URL,
282            GAP_PACKAGE,
283            GAP_PACKAGE_URL,
284            GAP_PACKAGE_DIR},
285         userExtra_getter);
286   }
287   /**
288      <p>Create the second or subsequent instance.</p>
289
290    * <p>Equal to</p>
291
292<blockquote><pre>{@link com.github.aliteralmind.codelet.type.OnlyOneBodyGapTemplateBase#OnlyOneBodyGapTemplateBase(OnlyOneBodyGapTemplateBase, FeatherTemplate, String) super}(to_copy, template, tmpl_path)</pre></blockquote>
293
294    * @see  #SourceCodeTemplate(FeatherTemplate, String, UserExtraGapGetter)
295    */
296   public SourceCodeTemplate(SourceCodeTemplate to_copy, FeatherTemplate template, String tmpl_path)  {
297      super(to_copy, template, tmpl_path);
298   }
299   public SourceCodeTemplate(SourceCodeTemplate to_copy, Appendable debugDest_ifNonNull)  {
300      super(to_copy, debugDest_ifNonNull);
301   }
302   public SourceCodeTemplate fillBody(String fully_processed)  {
303      fillBodyGap(fully_processed);
304      return  this;
305   }
306   public static final SourceCodeTemplate newFromPathAndUserExtraGaps(String path, String path_name, UserExtraGapGetter userExtra_getter)  {
307      return  (new SourceCodeTemplate(newTemplateFromPath(path, path_name), path, userExtra_getter));
308   }
309   /**
310      <p>Duplicate this template.</p>
311
312    * @return  <code>(new {@link #SourceCodeTemplate(SourceCodeTemplate, Appendable) SourceCodeTemplate}(this, debugDest_ifNonNull))</code>
313    */
314   public SourceCodeTemplate getObjectCopy(Appendable debugDest_ifNonNull)  {
315      return  (new SourceCodeTemplate(this, debugDest_ifNonNull));
316   }
317}
318class SourcePathGap extends CodeletGap  {
319   public SourcePathGap()  {
320      super("source_path");
321   }
322   public String getFillText(CodeletInstance instance)  {
323      return  TagletTextUtil.getJavaSourceFilePath(instance);
324   }
325}
326class SourceBaseDirGap extends CodeletGap  {
327   public SourceBaseDirGap()  {
328      super("source_base_dir");
329   }
330   public String getFillText(CodeletInstance ignored)  {
331      return  CodeletBaseConfig.getExampleSourceBaseDir();
332   }
333}
334class ClassNameGap extends CodeletGap  {
335   public ClassNameGap()  {
336      super("simple_class_name");
337   }
338   public String getFillText(CodeletInstance instance)  {
339      return  TagletTextUtil.getExampleSimpleClassName(instance);
340   }
341}
342class FQClassNameGap extends CodeletGap  {
343   public FQClassNameGap()  {
344      super("fq_class_name");
345   }
346   public String getFillText(CodeletInstance instance)  {
347      return  TagletTextUtil.getExampleClassFQName(instance);
348   }
349}
350class FQClassNameUrlGap extends CodeletGap  {
351   public FQClassNameUrlGap()  {
352      super("fq_class_name_url");
353   }
354   public String getFillText(CodeletInstance instance)  {
355      return  TagletTextUtil.getExampleClassFQName(instance).replace(".", "/");
356   }
357}
358class FQClassNameDirGap extends CodeletGap  {
359   public FQClassNameDirGap()  {
360      super("fq_class_name_dir");
361   }
362   public String getFillText(CodeletInstance instance)  {
363      return  TagletTextUtil.getExampleClassFQName(instance).replace(".", FILE_SEP);
364   }
365}
366class JavadocUrlGap extends CodeletGap  {
367   public JavadocUrlGap()  {
368      super("javadoc_url");
369   }
370   public String getFillText(CodeletInstance instance)  {
371      return  TagletTextUtil.getJavaDocUrl(instance);
372   }
373}
374class SourceUrlGap extends CodeletGap  {
375   public SourceUrlGap()  {
376      super("source_url");
377   }
378   public String getFillText(CodeletInstance instance)  {
379      return  TagletTextUtil.getJavaDocSourceUrl(instance);
380   }
381}
382class PackageGap extends CodeletGap  {
383   public PackageGap()  {
384      super("package");
385   }
386   public String getFillText(CodeletInstance instance)  {
387      return  TagletTextUtil.getExamplePackageName(instance);
388   }
389}
390class PackageUrlGap extends CodeletGap  {
391   public PackageUrlGap()  {
392      super("package_url");
393   }
394   public String getFillText(CodeletInstance instance)  {
395      return  TagletTextUtil.getExamplePackageName(instance).replace(".", "/");
396   }
397}
398class PackageDirGap extends CodeletGap  {
399   public PackageDirGap()  {
400      super("package_dir");
401   }
402   public String getFillText(CodeletInstance instance)  {
403      return  TagletTextUtil.getExamplePackageName(instance).replace(".", FILE_SEP);
404   }
405}