private void init(boolean force) throws SQLException { try { // at least try to compile the class, otherwise the data type is not // initialized if it could be load(); } catch (SQLException e) { if (!force) { throw e; } } }
/** * Find the Java method that matches the arguments. * * @param args the argument list * @return the Java method * @throws SQLException if no matching method could be found */ public JavaMethod findJavaMethod(Expression[] args) throws SQLException { load(); int parameterCount = args.length; for (JavaMethod m : javaMethods) { int count = m.getParameterCount(); if (count == parameterCount || (m.isVarArgs() && count <= parameterCount + 1)) { return m; } } throw Message.getSQLException( ErrorCode.METHOD_NOT_FOUND_1, methodName + " (" + className + ", parameter count: " + parameterCount + ")"); }
/** * Get the Java methods mapped by this function. * * @return the Java methods. */ public JavaMethod[] getJavaMethods() throws SQLException { load(); return javaMethods; }