mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-07 02:28:25 +00:00
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 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 IOException if there is a problem writing
|
||||
* @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 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 IOException if there is a problem writing
|
||||
* @see #escapeXml(String)
|
||||
|
@ -587,6 +587,12 @@ public int compareTo(Object other) {
|
||||
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) {
|
||||
try {
|
||||
Method mth = other.getClass().getMethod("getName", null);
|
||||
|
@ -584,6 +584,12 @@ public int compareTo(Object other) {
|
||||
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) {
|
||||
try {
|
||||
Method mth = other.getClass().getMethod("getName", null);
|
||||
|
@ -2187,16 +2187,17 @@ class StrBuilderReader extends Reader {
|
||||
/** The last mark position. */
|
||||
private int mark;
|
||||
|
||||
/** {@inheritDoc} */
|
||||
StrBuilderReader() {
|
||||
super();
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public void close() {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public int read() {
|
||||
if (ready() == false) {
|
||||
return -1;
|
||||
@ -2204,7 +2205,7 @@ public int read() {
|
||||
return charAt(pos++);
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public int read(char b[], int off, int len) {
|
||||
if (off < 0 || len < 0 || off > b.length ||
|
||||
(off + len) > b.length || (off + len) < 0) {
|
||||
@ -2224,6 +2225,7 @@ public int read(char b[], int off, int len) {
|
||||
return len;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public long skip(long n) {
|
||||
if (pos + n > size()) {
|
||||
n = size() - pos;
|
||||
@ -2235,22 +2237,22 @@ public long skip(long n) {
|
||||
return n;
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public boolean ready() {
|
||||
return pos < size();
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public boolean markSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public void mark(int readAheadLimit) {
|
||||
mark = pos;
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public void reset() {
|
||||
pos = mark;
|
||||
}
|
||||
@ -2261,41 +2263,43 @@ public void reset() {
|
||||
* Inner class to allow StrBuilder to operate as a writer.
|
||||
*/
|
||||
class StrBuilderWriter extends Writer {
|
||||
|
||||
/** {@inheritDoc} */
|
||||
StrBuilderWriter() {
|
||||
super();
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public void close() {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public void flush() {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public void write(int c) {
|
||||
StrBuilder.this.append((char) c);
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public void write(char[] cbuf) {
|
||||
StrBuilder.this.append(cbuf);
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public void write(char[] cbuf, int off, int len) {
|
||||
StrBuilder.this.append(cbuf, off, len);
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public void write(String str) {
|
||||
StrBuilder.this.append(str);
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
/** {@inheritDoc} */
|
||||
public void write(String str, int off, int 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
FieldPosition fp = new FieldPosition(type);
|
||||
fp.setBeginIndex(beginIndex);
|
||||
|
@ -622,6 +622,8 @@ public boolean equals(Object obj2) {
|
||||
* Returns a hashcode for the token equal to the
|
||||
* hashcode for the token's value. Thus 'TT' and 'TTTT'
|
||||
* will have the same hashcode.
|
||||
*
|
||||
* @return The hashcode for the token
|
||||
*/
|
||||
public int hashCode() {
|
||||
return this.value.hashCode();
|
||||
|
Loading…
x
Reference in New Issue
Block a user