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

improved javadocs

上级 03d917b3
...@@ -520,8 +520,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -520,8 +520,8 @@ public class JdbcConnection extends TraceObject implements Connection {
/** /**
* Gets the current catalog name. * Gets the current catalog name.
* *
* @throws SQLException * @return the catalog name
* if the connection is closed * @throws SQLException if the connection is closed
*/ */
public String getCatalog() throws SQLException { public String getCatalog() throws SQLException {
try { try {
......
...@@ -509,7 +509,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -509,7 +509,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
* (procedureNoResult or procedureReturnsResult) </li> * (procedureNoResult or procedureReturnsResult) </li>
* </ul> * </ul>
* *
* @return the procedures. * @return the procedures
* @throws SQLException if the connection is closed * @throws SQLException if the connection is closed
*/ */
public ResultSet getProcedures(String catalog, String schemaPattern, public ResultSet getProcedures(String catalog, String schemaPattern,
...@@ -569,6 +569,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -569,6 +569,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
* <li>15 POS (int) the parameter index </li> * <li>15 POS (int) the parameter index </li>
* </ul> * </ul>
* *
* @return the procedure columns
* @throws SQLException if the connection is closed * @throws SQLException if the connection is closed
*/ */
public ResultSet getProcedureColumns(String catalog, String schemaPattern, public ResultSet getProcedureColumns(String catalog, String schemaPattern,
......
...@@ -695,7 +695,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -695,7 +695,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* *
* @deprecated * @deprecated
* *
* @param columnName * @param columnName the column name
* @return the value * @return the value
* @throws SQLException if the column is not found or if the result set is * @throws SQLException if the column is not found or if the result set is
* closed * closed
...@@ -3358,7 +3358,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3358,7 +3358,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
/** /**
* Returns the value of the specified column as a String. * Returns the value of the specified column as a String.
* *
* @param columnName * @param columnName the column name
* @return the value * @return the value
* @throws SQLException if the column is not found or if the result set is * @throws SQLException if the column is not found or if the result set is
* closed * closed
......
...@@ -659,12 +659,28 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -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 { public boolean getMoreResults(int current) throws SQLException {
try { try {
debugCodeCall("getMoreResults"); debugCodeCall("getMoreResults", current);
throw Message.getUnsupportedException(); 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) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
......
...@@ -255,6 +255,7 @@ implements XAConnection, XAResource, JdbcConnectionListener ...@@ -255,6 +255,7 @@ implements XAConnection, XAResource, JdbcConnectionListener
* Prepare a transaction. * Prepare a transaction.
* *
* @param xid the transaction id * @param xid the transaction id
* @return XA_OK
* @throws XAException * @throws XAException
*/ */
//## Java 1.4 begin ## //## Java 1.4 begin ##
......
...@@ -374,7 +374,7 @@ public class Server implements Runnable, ShutdownHandler { ...@@ -374,7 +374,7 @@ public class Server implements Runnable, ShutdownHandler {
* new String[] { &quot;-trace&quot; }).start(); * new String[] { &quot;-trace&quot; }).start();
* </pre> * </pre>
* *
* @param args * @param args the argument list
* @return the server * @return the server
*/ */
public static Server createWebServer(String[] args) throws SQLException { public static Server createWebServer(String[] args) throws SQLException {
...@@ -392,7 +392,7 @@ public class Server implements Runnable, ShutdownHandler { ...@@ -392,7 +392,7 @@ public class Server implements Runnable, ShutdownHandler {
* new String[] { &quot;-trace&quot; }).start(); * new String[] { &quot;-trace&quot; }).start();
* </pre> * </pre>
* *
* @param args * @param args the argument list
* @return the server * @return the server
*/ */
public static Server createFtpServer(String[] args) throws SQLException { public static Server createFtpServer(String[] args) throws SQLException {
...@@ -407,7 +407,7 @@ public class Server implements Runnable, ShutdownHandler { ...@@ -407,7 +407,7 @@ public class Server implements Runnable, ShutdownHandler {
* new String[] { &quot;-tcpAllowOthers&quot; }).start(); * new String[] { &quot;-tcpAllowOthers&quot; }).start();
* </pre> * </pre>
* *
* @param args * @param args the argument list
* @return the server * @return the server
*/ */
public static Server createTcpServer(String[] args) throws SQLException { public static Server createTcpServer(String[] args) throws SQLException {
...@@ -423,7 +423,7 @@ public class Server implements Runnable, ShutdownHandler { ...@@ -423,7 +423,7 @@ public class Server implements Runnable, ShutdownHandler {
* "-pgAllowOthers"}).start(); * "-pgAllowOthers"}).start();
* </pre> * </pre>
* *
* @param args * @param args the argument list
* @return the server * @return the server
*/ */
public static Server createPgServer(String[] args) throws SQLException { public static Server createPgServer(String[] args) throws SQLException {
......
...@@ -231,23 +231,42 @@ public class Doclet { ...@@ -231,23 +231,42 @@ public class Doclet {
writer.println("<br /><br />"); writer.println("<br /><br />");
space = true; 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) { if (j == 0) {
writer.println("<div class=\"itemTitle\">Parameters:</div>"); writer.println("<div class=\"itemTitle\">Parameters:</div>");
} }
writer.println("<div class=\"item\">" + p + "</div>"); writer.println("<div class=\"item\">" + p + "</div>");
} }
Tag[] returnTags = method.tags("return"); Tag[] returnTags = method.tags("return");
ThrowsTag[] throwsTags = method.throwsTags();
boolean hasThrowsTag = throwsTags != null && throwsTags.length > 0;
if (returnTags != null && returnTags.length > 0) { if (returnTags != null && returnTags.length > 0) {
if (!space) { if (!space) {
writer.println("<br /><br />"); writer.println("<br /><br />");
space = true; space = true;
} }
writer.println("<div class=\"itemTitle\">Returns:</div>"); 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(); writer.println("<div class=\"item\">" + returnComment + "</div>");
if (throwsTags != null && throwsTags.length > 0) { } 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) { if (!space) {
writer.println("<br /><br />"); writer.println("<br /><br />");
space = true; space = true;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论