我正在查看Hive Opensource Code并遇到一个奇怪的构造函数调用:
public ResultSet getUDTs(String catalog, String schemaPattern,
String typeNamePattern, int[] types) throws SQLException {
return new HiveMetaDataResultSet(
Arrays.asList("TYPE_CAT", "TYPE_SCHEM", "TYPE_NAME", "CLASS_NAME", "DATA_TYPE"
, "REMARKS", "BASE_TYPE")
, Arrays.asList("STRING", "STRING", "STRING", "STRING", "INT", "STRING", "INT")
, null) {
public boolean next() throws SQLException {
return false;
}
};
Run Code Online (Sandbox Code Playgroud)
}
HiveMetaDataResultSet的构造函数定义是将三个List作为参数.
我的问题是:
public boolean next() throws SQLException {
return false;
}
Run Code Online (Sandbox Code Playgroud)
在这种情况下做部分吗?它不是一个匿名调用作为参数,因为3个参数由它自己完成,而这个参数在构造函数调用的主体中.