提交 c1439dd0 authored 作者: Thomas Mueller's avatar Thomas Mueller

improved javadocs

上级 03d917b3
......@@ -520,8 +520,8 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Gets the current catalog name.
*
* @throws SQLException
* if the connection is closed
* @return the catalog name
* @throws SQLException if the connection is closed
*/
public String getCatalog() throws SQLException {
try {
......
......@@ -509,7 +509,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
* (procedureNoResult or procedureReturnsResult) </li>
* </ul>
*
* @return the procedures.
* @return the procedures
* @throws SQLException if the connection is closed
*/
public ResultSet getProcedures(String catalog, String schemaPattern,
......@@ -569,6 +569,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
* <li>15 POS (int) the parameter index </li>
* </ul>
*
* @return the procedure columns
* @throws SQLException if the connection is closed
*/
public ResultSet getProcedureColumns(String catalog, String schemaPattern,
......
......@@ -695,7 +695,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
*
* @deprecated
*
* @param columnName
* @param columnName the column name
* @return the value
* @throws SQLException if the column is not found or if the result set is
* closed
......@@ -3358,7 +3358,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
/**
* Returns the value of the specified column as a String.
*
* @param columnName
* @param columnName the column name
* @return the value
* @throws SQLException if the column is not found or if the result set is
* closed
......
......@@ -659,12 +659,28 @@ public class JdbcStatement extends TraceObject implements Statement {
}
/**
* [Not supported]
* Move to the next result set.
* This method always returns false.
*
* @param current Statement.CLOSE_CURRENT_RESULT, Statement.KEEP_CURRENT_RESULT
* or Statement.CLOSE_ALL_RESULTS
* @return false
*/
public boolean getMoreResults(int current) throws SQLException {
try {
debugCodeCall("getMoreResults");
throw Message.getUnsupportedException();
debugCodeCall("getMoreResults", current);
switch (current) {
case Statement.CLOSE_CURRENT_RESULT:
case Statement.CLOSE_ALL_RESULTS:
resultSet.close();
break;
case Statement.KEEP_CURRENT_RESULT:
// nothing to do
break;
default:
throw Message.getInvalidValueException(""+current, "current");
}
return false;
} catch (Exception e) {
throw logAndConvert(e);
}
......
......@@ -255,6 +255,7 @@ implements XAConnection, XAResource, JdbcConnectionListener
* Prepare a transaction.
*
* @param xid the transaction id
* @return XA_OK
* @throws XAException
*/
//## Java 1.4 begin ##
......
......@@ -374,7 +374,7 @@ public class Server implements Runnable, ShutdownHandler {
* new String[] { &quot;-trace&quot; }).start();
* </pre>
*
* @param args
* @param args the argument list
* @return the server
*/
public static Server createWebServer(String[] args) throws SQLException {
......@@ -392,7 +392,7 @@ public class Server implements Runnable, ShutdownHandler {
* new String[] { &quot;-trace&quot; }).start();
* </pre>
*
* @param args
* @param args the argument list
* @return the server
*/
public static Server createFtpServer(String[] args) throws SQLException {
......@@ -407,7 +407,7 @@ public class Server implements Runnable, ShutdownHandler {
* new String[] { &quot;-tcpAllowOthers&quot; }).start();
* </pre>
*
* @param args
* @param args the argument list
* @return the server
*/
public static Server createTcpServer(String[] args) throws SQLException {
......@@ -423,7 +423,7 @@ public class Server implements Runnable, ShutdownHandler {
* "-pgAllowOthers"}).start();
* </pre>
*
* @param args
* @param args the argument list
* @return the server
*/
public static Server createPgServer(String[] args) throws SQLException {
......
......@@ -231,23 +231,42 @@ public class Doclet {
writer.println("<br /><br />");
space = true;
}
String p = paramTags[j].parameterName() + " - " + paramTags[j].parameterComment();
String paramName = paramTags[j].parameterName();
String comment = paramTags[j].parameterComment();
if (comment.trim().length() == 0) {
addError("Undocumented parameter (" +
clazz.name() + ".java:" + method.position().line() + ") " + name + " " + paramName);
}
String p = paramName + " - " + comment;
if (j == 0) {
writer.println("<div class=\"itemTitle\">Parameters:</div>");
}
writer.println("<div class=\"item\">" + p + "</div>");
}
Tag[] returnTags = method.tags("return");
ThrowsTag[] throwsTags = method.throwsTags();
boolean hasThrowsTag = throwsTags != null && throwsTags.length > 0;
if (returnTags != null && returnTags.length > 0) {
if (!space) {
writer.println("<br /><br />");
space = true;
}
writer.println("<div class=\"itemTitle\">Returns:</div>");
writer.println("<div class=\"item\">" + returnTags[0].text() + "</div>");
String returnComment = returnTags[0].text();
if (returnComment.trim().length() == 0) {
addError("Undocumented return value (" +
clazz.name() + ".java:" + method.position().line() + ") " + name);
}
ThrowsTag[] throwsTags = method.throwsTags();
if (throwsTags != null && throwsTags.length > 0) {
writer.println("<div class=\"item\">" + returnComment + "</div>");
} else if (!method.returnType().toString().equals("void")) {
if (!method.commentText().startsWith("[") && !hasThrowsTag) {
// [Not supported] and such are not problematic
// also not problematic are methods that always throw an exception
addError("Undocumented return value (" +
clazz.name() + ".java:" + method.position().line() + ") " + name + " " + method.returnType());
}
}
if (hasThrowsTag) {
if (!space) {
writer.println("<br /><br />");
space = true;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论