Warning: session_start(): open(/var/lib/php/sessions/sess_ihpq27k99l2kbkn1t71heqdln6, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// return Int.MAX_VALUE if not applicable
// Lower score is better
static int methodApplicabilityScore(Method m, O[] args) {
Class>[] types = m.getParameterTypes();
if (types.length != args.length) ret Int.MAX_VALUE;
int score = 0;
for (int i = 0; i < types.length; i++) {
O a = args[i];
Class c = types[i];
if (a == null) ++score;
else if (c == a.getClass()) {} // perfect match
else if (isInstanceX(c, a)) ++score;
else ret Int.MAX_VALUE;
}
ret score;
}