File: java_comments_html.java

package info (click to toggle)
vim 2%3A9.1.2103-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 93,456 kB
  • sloc: ansic: 433,730; cpp: 6,399; makefile: 4,597; sh: 2,397; java: 2,312; xml: 2,099; python: 1,595; perl: 1,419; awk: 730; lisp: 501; cs: 458; objc: 369; sed: 8; csh: 6; haskell: 1
file content (131 lines) | stat: -rw-r--r-- 4,775 bytes parent folder | download
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// VIM_TEST_SETUP unlet! g:java_no_tab_space_error g:java_ignore_javadoc
// VIM_TEST_SETUP unlet! g:java_no_trail_space_error
// VIM_TEST_SETUP unlet! g:java_consent_to_html_syntax_folding
// VIM_TEST_SETUP let[g:java_space_errors,g:java_comment_strings]=[1,1]
// VIM_TEST_SETUP let[g:java_ignore_markdown,g:html_syntax_folding]=[1,1]
// VIM_TEST_SETUP let g:markdown_fenced_languages = ["java"]




// VIM_TEST_SETUP setlocal spell fdc=2 fdl=64 fdm=syntax fen
// VIM_TEST_SETUP highlight link javaCommentStart Todo
// VIM_TEST_SETUP highlight link javaCommentTitle Underlined







/**/ /*/ */ /* /*/ /*/*/ /*//*/ /** HTML comment tests.
 * <p>There is no entry point method {@code main}:
 * {@snippet file = HTMLSnippets.java region = main id = _01}
 * <p>There is no textual representation:
 * {@snippet class = HTMLSnippets region = toString id = _02} */
class HTMLCommentsTests implements Comparable<HTMLCommentsTests>
{	// JDK 21+.
	private HTMLCommentsTests() { }

	/** No-op, i. e. no operation.
	* ({@literal@literal} may be used with {@code .} for contraction.)
	* @return {@code null} */
	Void noOp1() { return null; }

	/** No-op, i.e. no operation.
	* ({@literal<!-- -->} may be used after {@code .} for contraction.)
	* @return {@code null} */
	Void noOp2() { return null; }

	/** No-op, i.e\u002e no operation.
	* ({@literal\u005cu002e} is processed early, use alternatives.)
	* @return {@code null} */
	Void noOp3() { return null; }

	/** No-op, i.e{@literal .} no operation.
	* @return {@code null} */
	Void noOp4() { return null; }

	/** No-op, i.e.<!-- --> no operation.
	* @return {@code null} */
	Void noOp5() { return null; }

	/** No-op, i.e.&nbsp;no operation.
	* @return {@code null} */
	Void noOp6() { return null; }

	/** {@return {@code null}, with no-op, i.e. no operation} */
	Void noOp7() { return null; }

	/** {@return {@code null}, with no-op, i.e. no operation}.. */
	Void noOp8() { return null; }

	/** {@return {@code null}, with no-op, i.e. no operation} . . */
	Void noOp9() { return null; }

	/** {@return the major Java version}
	 * @hidden */
	protected int majorVersion() { return 21; }

	/** {@summary Compares this instance with the passed {@code that}
	 * instance for order by invoking {@link Integer#compare(int, int)
	 * compare} and passing it {@code this.majorVersion()} and
	 * {@code that.majorVersion()} as respective @arguments.}
	 * {@inheritDoc} */
	@Override public int compareTo(HTMLCommentsTests that)
	{
		java.util.Objects.requireNonNull(that, "that");
		return Integer.compare(this.majorVersion(),
						that.majorVersion());
	}

	/// Returns an empty string for an @Override annotated method
	/// (see Chapter 9.6.4.4 {@literal @Override} in a Java Language
	/// Specification) overridden from `java.lang.Object`
	///
	/// @return an empty string /// No period for the above summary!
	private String asString() { return ""; }

	/** Returns an empty string for an @Override annotated method
	* (see Chapter 9.6.4.4 {@literal @Override} in a Java Language
	* Specification) overridden from <code>java.lang.Object</code>
	*
	* @return an empty string */// No period for the above summary!
	@Override public String toString() { return asString(); }
}

// javadoc --snippet-path . --source-path . -d /tmp/html_docs/ -package \
// 	-tag 'jls:a:See Java Language Specification:' HTMLSnippets.java
/** Snippets for HTML comment tests. */
class HTMLSnippets
{	/* 	TRAILING BLANKS AND MESSPILLINGS ARE SIGNIFICANT! */
	private HTMLSnippets() { }

	/** The method {@code main} must be declared {@code public}, {@code
	 * static}, and {@code void}.  It must specify a formal parameter
	 * whose declared type is array of {@link String}.  Therefore,
	 * <em>either</em> of the following declarations is acceptable:
	 * 	{@snippet lang="java":
	 * // @highlight substring="main" type="italic":
	 * public static void main(String[] args) { }
	 * }<br /><pre class="snippet">
	 *{@code public static void main(String... args) { }}</pre>
	 *
	 * @param args optional commande-line arguments 
	 * @jls 12.1.4 Invoke {@code Test.main} */
	// @start region = main		
	// @link substring = 'String' target = 'java.lang.String' :
	public static void main(String[] args) { }
	// @end 

	/** {@return an empty string}
	 * @see <a href="https://docs.oracle.com/javase/specs/jls/se21/html/jls-3.html#jls-3.10.5">3.10.5 String Literals</a>
	 * @see
	 * <a href="https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.3.2">4.3.2 The Class Object</a>
	 * @see java.base/java.lang.Object#toString() */
	// @start region = toString	
	// @replace substring = '""' replacement = "\u0022\u0022"
	// @link regex = '\bString' target = java.lang.String type = linkplain :
	@Override public String toString() { return ""; }
	// @end 
}