public static Object createKey(Object obj) { if (obj == null) { return NULL; } if (!obj.getClass().isArray()) { return obj; } if (obj instanceof Object[]) { return createKey((Object[])obj); } else if (obj instanceof int[]) { return createKey((int[])obj); } else if (obj instanceof float[]) { return createKey((float[])obj); } else if (obj instanceof long[]) { return createKey((long[])obj); } else if (obj instanceof double[]) { return createKey((double[])obj); } else if (obj instanceof byte[]) { return createKey((byte[])obj); } else if (obj instanceof char[]) { return createKey((char[])obj); } else if (obj instanceof boolean[]) { return createKey((boolean[])obj); } else if (obj instanceof short[]) { return createKey((short[])obj); } else { return obj; } }
public int compareTo(Object obj) { return compare(mArray, ((ByteArrayKey) obj).mArray); } }
public boolean equals(Object obj) { return this == obj ? true : (obj instanceof ObjectArrayKey ? KeyFactory.equals(mArray, ((ObjectArrayKey) obj).mArray) : false); }
static int hashCode(Object[] a) { int hash = 0; for (int i = a.length; --i >= 0; ) { hash = hash * 31 + hashCode(a[i]); } return hash == 0 ? -1 : hash; }
public int hashCode() { int hash = mHash; return hash == 0 ? mHash = KeyFactory.hashCode(mArray) : hash; }
mKey = KeyFactory.createKey(keys);
public int hashCode() { int hash = mHash; return hash == 0 ? mHash = KeyFactory.hashCode(mArray) : hash; }
public int compareTo(Object obj) { return compare(mArray, ((FloatArrayKey) obj).mArray); } }
static boolean equals(Object[] a, Object[] b) { if (a == b) { return true; } if (a == null || b == null) { return false; } int i; if ((i = a.length) != b.length) { return false; } while (--i >= 0) { if (!equals(a[i], b[i])) { return false; } } return true; }
return KeyFactory.createKey(new Object[] { parentLoader, packageName, domainKey, csKey, permsKey, principalsKey });
public int hashCode() { int hash = mHash; return hash == 0 ? mHash = KeyFactory.hashCode(mArray) : hash; }
public int compareTo(Object obj) { return compare(mArray, ((LongArrayKey) obj).mArray); } }
return equals((Object[])a, (Object[])b); } else if (a instanceof int[]) { return Arrays.equals((int[])a, (int[])b);
public static Object createKey(Object obj) { if (obj == null) { return NULL; } if (!obj.getClass().isArray()) { return obj; } if (obj instanceof Object[]) { return createKey((Object[])obj); } else if (obj instanceof int[]) { return createKey((int[])obj); } else if (obj instanceof float[]) { return createKey((float[])obj); } else if (obj instanceof long[]) { return createKey((long[])obj); } else if (obj instanceof double[]) { return createKey((double[])obj); } else if (obj instanceof byte[]) { return createKey((byte[])obj); } else if (obj instanceof char[]) { return createKey((char[])obj); } else if (obj instanceof boolean[]) { return createKey((boolean[])obj); } else if (obj instanceof short[]) { return createKey((short[])obj); } else { return obj; } }
public int hashCode() { int hash = mHash; return hash == 0 ? mHash = KeyFactory.hashCode(mArray) : hash; }
public int compareTo(Object obj) { return compare(mArray, ((ShortArrayKey) obj).mArray); } }
public boolean equals(Object obj) { return this == obj ? true : (obj instanceof ObjectArrayKey ? KeyFactory.equals(mArray, ((ObjectArrayKey) obj).mArray) : false); }
private static void gatherAbstractMethods(Class<?> clazz, Set<Class> seen, Map<Object, Method> allMethods, Map<Object, Method> abstractMethods) { if (clazz == null || !seen.add(clazz)) { return; } for (Method method : clazz.getDeclaredMethods()) { Object key = KeyFactory.createKey(new Object[] { method.getName(), method.getReturnType(), method.getParameterTypes() }); if (!allMethods.containsKey(key)) { allMethods.put(key, method); if (Modifier.isAbstract(method.getModifiers())) { checkMemberAccess(method); checkParameterAccess(method, method.getParameterTypes()); if (!abstractMethods.containsKey(key)) { abstractMethods.put(key, method); } } } } gatherAbstractMethods(clazz.getSuperclass(), seen, allMethods, abstractMethods); for (Class iface : clazz.getInterfaces()) { gatherAbstractMethods(iface, seen, allMethods, abstractMethods); } }
public int hashCode() { int hash = mHash; return hash == 0 ? mHash = KeyFactory.hashCode(mArray) : hash; }
public int compareTo(Object obj) { return compare(mArray, ((BooleanArrayKey) obj).mArray); } }