提交 78c40095 authored 作者: Noel Grandin's avatar Noel Grandin

add some javadoc

上级 fc502997
......@@ -6941,7 +6941,7 @@ public class Parser {
}
/**
* Checks the table is the DUAL special table.
* Is this the Oracle DUAL table or the IBM/DB2 SYSIBM table?
*
* @param tableName table name.
* @return {@code true} if the table is DUAL special table. Otherwise returns {@code false}.
......
......@@ -256,7 +256,7 @@ public class Console extends Tool implements ShutdownHandler {
}
/**
* Overriden by GUIConsole to show a window
* Overridden by GUIConsole to show a window
*/
void show() {
}
......
......@@ -172,6 +172,15 @@ public class StringUtils {
return buff.toString();
}
/**
* Convert a string to a Java literal using the correct escape sequences.
* The literal is not enclosed in double quotes. The result can be used in
* properties files or in Java source code.
*
* @param s the text to convert
* @param buff the Java representation to return
* @param forSQL true if we embedding this inside a STRINGDECODE SQL command
*/
public static void javaEncode(String s, StringBuilder buff, boolean forSQL) {
int length = s.length();
for (int i = 0; i < length; i++) {
......
......@@ -132,6 +132,9 @@ public final class ExtTypeInfoEnum extends ExtTypeInfo {
return enumerators[ordinal];
}
/**
* Get ValueEnum instance for an ordinal.
*/
public ValueEnum getValue(int ordinal) {
if (ordinal < 0 || ordinal >= enumerators.length) {
throw DbException.get(ErrorCode.ENUM_VALUE_NOT_PERMITTED, enumerators.toString(),
......@@ -140,6 +143,9 @@ public final class ExtTypeInfoEnum extends ExtTypeInfo {
return new ValueEnum(this, enumerators[ordinal], ordinal);
}
/**
* Get ValueEnum instance for a label string.
*/
public ValueEnum getValue(String label) {
ValueEnum value = getValueOrNull(label);
if (value == null) {
......
......@@ -82,7 +82,7 @@ public class ValueInterval extends Value {
* @param scale
* fractional seconds precision. Ignored if specified type of
* interval does not have seconds.
* @return displayed size.
* @return display size
*/
public static int getDisplaySize(int type, int precision, int scale) {
switch (type) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论