-
Notifications
You must be signed in to change notification settings - Fork 81
/
SnippetDocs.java
79 lines (75 loc) · 2.14 KB
/
SnippetDocs.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package dev.nipafx.demo.java18.javadoc;
/*
* HOW TO:
* 1. build project with `mvn package`
* 2. launch webserver in `target/site/apidocs`, e.g. with `jwebserver` on port 8000
* 3. visit http://localhost:8000/dev.nipafx.demo.java_x/dev/nipafx/demo/java18/javadoc/SnippetDocs.html
*/
/**
* This class has a constructor and here's how you call it:
* {@snippet class="SnippetDocsDemo" region="constructor"}
*
* <h2>Highlighting</h2>
*
* With highlights (matching by substring):
* {@snippet class="SnippetDocsDemo" region="highlight-substring"}
*
* With highlights (matching by regex):
* {@snippet class="SnippetDocsDemo" region="highlight-regex"}
*
* With highlights (in a single line):
* {@snippet class="SnippetDocsDemo" region="highlight-single"}
*
* With highlights (in the entire region):
* {@snippet class="SnippetDocsDemo" region="highlight-region"}
*
* With highlights (in bold):
* {@snippet class="SnippetDocsDemo" region="highlight-bold"}
*
* With highlights (in italic):
* {@snippet class="SnippetDocsDemo" region="highlight-italic"}
*
* With highlights (highlighted):
* {@snippet class="SnippetDocsDemo" region="highlight-highlighted"}
*
* With highlights (customized highlighted):
* {@snippet class="SnippetDocsDemo" region="highlight-scary"}
*
* <h2>Replacing</h2>
*
* Replacing code (matching by substring):
* {@snippet class="SnippetDocsDemo" region="replace-substring"}
*
* <h2>Linking</h2>
*
* Linking words (matching by regex):
* {@snippet class="SnippetDocsDemo" region="link-regex"}
*
* <h2>Other files</h2>
*
* That CSS from earlier:
* {@snippet file="javadoc-highlight.css"}
*
* <h2>HTML IDs</h2>
*
* That CSS from earlier:
* {@snippet file="javadoc-highlight.css" id="highlighted-style"}
*
* <h2>Inline</h2>
*
* Code in Javadoc:
* {@snippet :
* List<String> yay = List.of("Don't", "have to", "escape <>&");
* }
*
* Code in Javadoc with check
* {@snippet class="SnippetDocsDemo" region="inline-check" :
* List<String> yay = List.of("Don't", "have to", "escape <>&", "!");
* }
*/
public class SnippetDocs {
/**
* The constructor (amazing documentation, I know!)
*/
public SnippetDocs() { }
}