Fix for LANG-272 - Minor JavaDoc changes to clean up checkstyle issues
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@420491 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
33c8a32830
commit
b9b6b027db
|
@ -571,7 +571,6 @@ public static void unescapeHtml(Writer writer, String string) throws IOException
|
||||||
*
|
*
|
||||||
* @param writer the writer receiving the unescaped string, not null
|
* @param writer the writer receiving the unescaped string, not null
|
||||||
* @param str the <code>String</code> to escape, may be null
|
* @param str the <code>String</code> to escape, may be null
|
||||||
* @return a new escaped <code>String</code>, <code>null</code> if null string input
|
|
||||||
* @throws IllegalArgumentException if the writer is null
|
* @throws IllegalArgumentException if the writer is null
|
||||||
* @throws IOException if there is a problem writing
|
* @throws IOException if there is a problem writing
|
||||||
* @see #unescapeXml(java.lang.String)
|
* @see #unescapeXml(java.lang.String)
|
||||||
|
@ -624,7 +623,6 @@ public static String escapeXml(String str) {
|
||||||
*
|
*
|
||||||
* @param writer the writer receiving the unescaped string, not null
|
* @param writer the writer receiving the unescaped string, not null
|
||||||
* @param str the <code>String</code> to unescape, may be null
|
* @param str the <code>String</code> to unescape, may be null
|
||||||
* @return a new unescaped <code>String</code>, <code>null</code> if null string input
|
|
||||||
* @throws IllegalArgumentException if the writer is null
|
* @throws IllegalArgumentException if the writer is null
|
||||||
* @throws IOException if there is a problem writing
|
* @throws IOException if there is a problem writing
|
||||||
* @see #escapeXml(String)
|
* @see #escapeXml(String)
|
||||||
|
|
|
@ -587,6 +587,12 @@ public int compareTo(Object other) {
|
||||||
return iName.compareTo(((Enum) other).iName);
|
return iName.compareTo(((Enum) other).iName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Use reflection to return an objects class name.</p>
|
||||||
|
*
|
||||||
|
* @param other The object to determine the class name for
|
||||||
|
* @return The class name
|
||||||
|
*/
|
||||||
private String getNameInOtherClassLoader(Object other) {
|
private String getNameInOtherClassLoader(Object other) {
|
||||||
try {
|
try {
|
||||||
Method mth = other.getClass().getMethod("getName", null);
|
Method mth = other.getClass().getMethod("getName", null);
|
||||||
|
|
|
@ -584,6 +584,12 @@ public int compareTo(Object other) {
|
||||||
return iName.compareTo(((Enum) other).iName);
|
return iName.compareTo(((Enum) other).iName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Use reflection to return an objects class name.</p>
|
||||||
|
*
|
||||||
|
* @param other The object to determine the class name for
|
||||||
|
* @return The class name
|
||||||
|
*/
|
||||||
private String getNameInOtherClassLoader(Object other) {
|
private String getNameInOtherClassLoader(Object other) {
|
||||||
try {
|
try {
|
||||||
Method mth = other.getClass().getMethod("getName", null);
|
Method mth = other.getClass().getMethod("getName", null);
|
||||||
|
|
|
@ -2187,16 +2187,17 @@ class StrBuilderReader extends Reader {
|
||||||
/** The last mark position. */
|
/** The last mark position. */
|
||||||
private int mark;
|
private int mark;
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
StrBuilderReader() {
|
StrBuilderReader() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public void close() {
|
public void close() {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public int read() {
|
public int read() {
|
||||||
if (ready() == false) {
|
if (ready() == false) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -2204,7 +2205,7 @@ public int read() {
|
||||||
return charAt(pos++);
|
return charAt(pos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public int read(char b[], int off, int len) {
|
public int read(char b[], int off, int len) {
|
||||||
if (off < 0 || len < 0 || off > b.length ||
|
if (off < 0 || len < 0 || off > b.length ||
|
||||||
(off + len) > b.length || (off + len) < 0) {
|
(off + len) > b.length || (off + len) < 0) {
|
||||||
|
@ -2224,6 +2225,7 @@ public int read(char b[], int off, int len) {
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
public long skip(long n) {
|
public long skip(long n) {
|
||||||
if (pos + n > size()) {
|
if (pos + n > size()) {
|
||||||
n = size() - pos;
|
n = size() - pos;
|
||||||
|
@ -2235,22 +2237,22 @@ public long skip(long n) {
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public boolean ready() {
|
public boolean ready() {
|
||||||
return pos < size();
|
return pos < size();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public boolean markSupported() {
|
public boolean markSupported() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public void mark(int readAheadLimit) {
|
public void mark(int readAheadLimit) {
|
||||||
mark = pos;
|
mark = pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public void reset() {
|
public void reset() {
|
||||||
pos = mark;
|
pos = mark;
|
||||||
}
|
}
|
||||||
|
@ -2261,41 +2263,43 @@ public void reset() {
|
||||||
* Inner class to allow StrBuilder to operate as a writer.
|
* Inner class to allow StrBuilder to operate as a writer.
|
||||||
*/
|
*/
|
||||||
class StrBuilderWriter extends Writer {
|
class StrBuilderWriter extends Writer {
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
StrBuilderWriter() {
|
StrBuilderWriter() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public void close() {
|
public void close() {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public void flush() {
|
public void flush() {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public void write(int c) {
|
public void write(int c) {
|
||||||
StrBuilder.this.append((char) c);
|
StrBuilder.this.append((char) c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public void write(char[] cbuf) {
|
public void write(char[] cbuf) {
|
||||||
StrBuilder.this.append(cbuf);
|
StrBuilder.this.append(cbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public void write(char[] cbuf, int off, int len) {
|
public void write(char[] cbuf, int off, int len) {
|
||||||
StrBuilder.this.append(cbuf, off, len);
|
StrBuilder.this.append(cbuf, off, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public void write(String str) {
|
public void write(String str) {
|
||||||
StrBuilder.this.append(str);
|
StrBuilder.this.append(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** {@inheritDoc} */
|
||||||
public void write(String str, int off, int len) {
|
public void write(String str, int off, int len) {
|
||||||
StrBuilder.this.append(str, off, len);
|
StrBuilder.this.append(str, off, len);
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,6 +205,17 @@ protected static FieldPosition newTextToken(int aStartIndex, int aLength) {
|
||||||
return newToken(VariableParser.TEXT_TOKEN, aStartIndex, aLength);
|
return newToken(VariableParser.TEXT_TOKEN, aStartIndex, aLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new token of the specified type.
|
||||||
|
*
|
||||||
|
* @param type
|
||||||
|
* The token type
|
||||||
|
* @param beginIndex
|
||||||
|
* The token starting index
|
||||||
|
* @param length
|
||||||
|
* The token length
|
||||||
|
* @return a new token
|
||||||
|
*/
|
||||||
private static FieldPosition newToken(int type, int beginIndex, int length) {
|
private static FieldPosition newToken(int type, int beginIndex, int length) {
|
||||||
FieldPosition fp = new FieldPosition(type);
|
FieldPosition fp = new FieldPosition(type);
|
||||||
fp.setBeginIndex(beginIndex);
|
fp.setBeginIndex(beginIndex);
|
||||||
|
|
|
@ -622,6 +622,8 @@ public boolean equals(Object obj2) {
|
||||||
* Returns a hashcode for the token equal to the
|
* Returns a hashcode for the token equal to the
|
||||||
* hashcode for the token's value. Thus 'TT' and 'TTTT'
|
* hashcode for the token's value. Thus 'TT' and 'TTTT'
|
||||||
* will have the same hashcode.
|
* will have the same hashcode.
|
||||||
|
*
|
||||||
|
* @return The hashcode for the token
|
||||||
*/
|
*/
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return this.value.hashCode();
|
return this.value.hashCode();
|
||||||
|
|
Loading…
Reference in New Issue