private static int getPrimitiveDistance(Class from, Class to) { // we know here that from!=to, so a distance of 0 is never valid // get primitive type indexes int fromIndex = getPrimitiveIndex(from); int toIndex = getPrimitiveIndex(to); if (fromIndex == -1 || toIndex == -1) return -1; return PRIMITIVE_DISTANCE_TABLE[toIndex][fromIndex]; }
private static int getPrimitiveDistance(Class from, Class to) { // we know here that from!=to, so a distance of 0 is never valid // get primitive type indexes int fromIndex = getPrimitiveIndex(from); int toIndex = getPrimitiveIndex(to); if (fromIndex == -1 || toIndex == -1) return -1; return PRIMITIVE_DISTANCE_TABLE[toIndex][fromIndex]; }
private static int getPrimitiveDistance(Class from, Class to) { // we know here that from!=to, so a distance of 0 is never valid // get primitive type indexes int fromIndex = getPrimitiveIndex(from); int toIndex = getPrimitiveIndex(to); if (fromIndex == -1 || toIndex == -1) return -1; return PRIMITIVE_DISTANCE_TABLE[toIndex][fromIndex]; }
private static int getPrimitiveDistance(Class from, Class to) { // we know here that from!=to, so a distance of 0 is never valid // get primitive type indexes int fromIndex = getPrimitiveIndex(from); int toIndex = getPrimitiveIndex(to); if (fromIndex == -1 || toIndex == -1) return -1; return PRIMITIVE_DISTANCE_TABLE[toIndex][fromIndex]; }
private static int getPrimitiveDistance(Class from, Class to) { // we know here that from!=to, so a distance of 0 is never valid // get primitive type indexes int fromIndex = getPrimitiveIndex(from); int toIndex = getPrimitiveIndex(to); if (fromIndex == -1 || toIndex == -1) return -1; return PRIMITIVE_DISTANCE_TABLE[toIndex][fromIndex]; }