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

add some javadoc

上级 fc502997
...@@ -6941,7 +6941,7 @@ public class Parser { ...@@ -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. * @param tableName table name.
* @return {@code true} if the table is DUAL special table. Otherwise returns {@code false}. * @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 { ...@@ -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() { void show() {
} }
......
...@@ -172,6 +172,15 @@ public class StringUtils { ...@@ -172,6 +172,15 @@ public class StringUtils {
return buff.toString(); 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) { public static void javaEncode(String s, StringBuilder buff, boolean forSQL) {
int length = s.length(); int length = s.length();
for (int i = 0; i < length; i++) { for (int i = 0; i < length; i++) {
......
...@@ -132,6 +132,9 @@ public final class ExtTypeInfoEnum extends ExtTypeInfo { ...@@ -132,6 +132,9 @@ public final class ExtTypeInfoEnum extends ExtTypeInfo {
return enumerators[ordinal]; return enumerators[ordinal];
} }
/**
* Get ValueEnum instance for an ordinal.
*/
public ValueEnum getValue(int ordinal) { public ValueEnum getValue(int ordinal) {
if (ordinal < 0 || ordinal >= enumerators.length) { if (ordinal < 0 || ordinal >= enumerators.length) {
throw DbException.get(ErrorCode.ENUM_VALUE_NOT_PERMITTED, enumerators.toString(), throw DbException.get(ErrorCode.ENUM_VALUE_NOT_PERMITTED, enumerators.toString(),
...@@ -140,6 +143,9 @@ public final class ExtTypeInfoEnum extends ExtTypeInfo { ...@@ -140,6 +143,9 @@ public final class ExtTypeInfoEnum extends ExtTypeInfo {
return new ValueEnum(this, enumerators[ordinal], ordinal); return new ValueEnum(this, enumerators[ordinal], ordinal);
} }
/**
* Get ValueEnum instance for a label string.
*/
public ValueEnum getValue(String label) { public ValueEnum getValue(String label) {
ValueEnum value = getValueOrNull(label); ValueEnum value = getValueOrNull(label);
if (value == null) { if (value == null) {
......
...@@ -82,7 +82,7 @@ public class ValueInterval extends Value { ...@@ -82,7 +82,7 @@ public class ValueInterval extends Value {
* @param scale * @param scale
* fractional seconds precision. Ignored if specified type of * fractional seconds precision. Ignored if specified type of
* interval does not have seconds. * interval does not have seconds.
* @return displayed size. * @return display size
*/ */
public static int getDisplaySize(int type, int precision, int scale) { public static int getDisplaySize(int type, int precision, int scale) {
switch (type) { switch (type) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论