protected HierarchicType _doFindSuperInterfaceChain(HierarchicType current, Class<?> target) { Class<?> raw = current.getRawClass(); Type[] parents = raw.getGenericInterfaces(); // as long as there are superclasses // and unless we have already seen the type (<T extends X<T>>) if (parents != null) { for (Type parent : parents) { HierarchicType sup = _findSuperInterfaceChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } } // and then super-class if any Type parent = raw.getGenericSuperclass(); if (parent != null) { HierarchicType sup = _findSuperInterfaceChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } return null; }
protected HierarchicType _findSuperClassChain(Type currentType, Class<?> target) { HierarchicType current = new HierarchicType(currentType); Class<?> raw = current.getRawClass(); if (raw == target) { return current; } // Otherwise, keep on going down the rat hole... Type parent = raw.getGenericSuperclass(); if (parent != null) { HierarchicType sup = _findSuperClassChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } return null; }
protected synchronized HierarchicType _hashMapSuperInterfaceChain(HierarchicType current) { if (_cachedHashMapType == null) { HierarchicType base = current.deepCloneWithoutSubtype(); _doFindSuperInterfaceChain(base, Map.class); _cachedHashMapType = base.getSuperType(); } HierarchicType t = _cachedHashMapType.deepCloneWithoutSubtype(); current.setSuperType(t); t.setSubType(current); return current; }
protected synchronized HierarchicType _arrayListSuperInterfaceChain(HierarchicType current) { if (_cachedArrayListType == null) { HierarchicType base = current.deepCloneWithoutSubtype(); _doFindSuperInterfaceChain(base, List.class); _cachedArrayListType = base.getSuperType(); } HierarchicType t = _cachedArrayListType.deepCloneWithoutSubtype(); current.setSuperType(t); t.setSubType(current); return current; } }
protected HierarchicType _doFindSuperInterfaceChain(HierarchicType current, Class<?> target) { Class<?> raw = current.getRawClass(); Type[] parents = raw.getGenericInterfaces(); // as long as there are superclasses // and unless we have already seen the type (<T extends X<T>>) if (parents != null) { for (Type parent : parents) { HierarchicType sup = _findSuperInterfaceChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } } // and then super-class if any Type parent = raw.getGenericSuperclass(); if (parent != null) { HierarchicType sup = _findSuperInterfaceChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } return null; }
protected HierarchicType _findSuperClassChain(Type currentType, Class<?> target) { HierarchicType current = new HierarchicType(currentType); Class<?> raw = current.getRawClass(); if (raw == target) { return current; } // Otherwise, keep on going down the rat hole... Type parent = raw.getGenericSuperclass(); if (parent != null) { HierarchicType sup = _findSuperClassChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } return null; }
protected synchronized HierarchicType _arrayListSuperInterfaceChain(HierarchicType current) { if (_cachedArrayListType == null) { HierarchicType base = current.deepCloneWithoutSubtype(); _doFindSuperInterfaceChain(base, List.class); _cachedArrayListType = base.getSuperType(); } HierarchicType t = _cachedArrayListType.deepCloneWithoutSubtype(); current.setSuperType(t); t.setSubType(current); return current; } }
protected synchronized HierarchicType _hashMapSuperInterfaceChain(HierarchicType current) { if (_cachedHashMapType == null) { HierarchicType base = current.deepCloneWithoutSubtype(); _doFindSuperInterfaceChain(base, Map.class); _cachedHashMapType = base.getSuperType(); } HierarchicType t = _cachedHashMapType.deepCloneWithoutSubtype(); current.setSuperType(t); t.setSubType(current); return current; }
protected HierarchicType _doFindSuperInterfaceChain(HierarchicType current, Class<?> target) { Class<?> raw = current.getRawClass(); Type[] parents = raw.getGenericInterfaces(); // as long as there are superclasses // and unless we have already seen the type (<T extends X<T>>) if (parents != null) { for (Type parent : parents) { HierarchicType sup = _findSuperInterfaceChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } } // and then super-class if any Type parent = raw.getGenericSuperclass(); if (parent != null) { HierarchicType sup = _findSuperInterfaceChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } return null; }
protected HierarchicType _doFindSuperInterfaceChain(HierarchicType current, Class<?> target) { Class<?> raw = current.getRawClass(); Type[] parents = raw.getGenericInterfaces(); // as long as there are superclasses // and unless we have already seen the type (<T extends X<T>>) if (parents != null) { for (Type parent : parents) { HierarchicType sup = _findSuperInterfaceChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } } // and then super-class if any Type parent = raw.getGenericSuperclass(); if (parent != null) { HierarchicType sup = _findSuperInterfaceChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } return null; }
protected HierarchicType _findSuperClassChain(Type currentType, Class<?> target) { HierarchicType current = new HierarchicType(currentType); Class<?> raw = current.getRawClass(); if (raw == target) { return current; } // Otherwise, keep on going down the rat hole... Type parent = raw.getGenericSuperclass(); if (parent != null) { HierarchicType sup = _findSuperClassChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } return null; }
if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current;
protected HierarchicType _findSuperClassChain(Type currentType, Class<?> target) { HierarchicType current = new HierarchicType(currentType); Class<?> raw = current.getRawClass(); if (raw == target) { return current; } // Otherwise, keep on going down the rat hole... Type parent = raw.getGenericSuperclass(); if (parent != null) { HierarchicType sup = _findSuperClassChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } return null; }
protected static HierarchicType _findSuperClassChain(Type currentType, Class<?> target) { HierarchicType current = new HierarchicType(currentType); Class<?> raw = current.getRawClass(); if (raw == target) { return current; } // Otherwise, keep on going down the rat hole... Type parent = raw.getGenericSuperclass(); if (parent != null) { HierarchicType sup = _findSuperClassChain(parent, target); if (sup != null) { sup.setSubType(current); current.setSuperType(sup); return current; } } return null; }
protected synchronized HierarchicType _hashMapSuperInterfaceChain(HierarchicType current) { if (_cachedHashMapType == null) { HierarchicType base = current.deepCloneWithoutSubtype(); _doFindSuperInterfaceChain(base, Map.class); _cachedHashMapType = base.getSuperType(); } HierarchicType t = _cachedHashMapType.deepCloneWithoutSubtype(); current.setSuperType(t); t.setSubType(current); return current; }
protected synchronized HierarchicType _hashMapSuperInterfaceChain(HierarchicType current) { if (_cachedHashMapType == null) { HierarchicType base = current.deepCloneWithoutSubtype(); _doFindSuperInterfaceChain(base, Map.class); _cachedHashMapType = base.getSuperType(); } HierarchicType t = _cachedHashMapType.deepCloneWithoutSubtype(); current.setSuperType(t); t.setSubType(current); return current; }
protected synchronized HierarchicType _arrayListSuperInterfaceChain(HierarchicType current) { if (_cachedArrayListType == null) { HierarchicType base = current.deepCloneWithoutSubtype(); _doFindSuperInterfaceChain(base, List.class); _cachedArrayListType = base.getSuperType(); } HierarchicType t = _cachedArrayListType.deepCloneWithoutSubtype(); current.setSuperType(t); t.setSubType(current); return current; } }
protected synchronized HierarchicType _arrayListSuperInterfaceChain(HierarchicType current) { if (_cachedArrayListType == null) { HierarchicType base = current.deepCloneWithoutSubtype(); _doFindSuperInterfaceChain(base, List.class); _cachedArrayListType = base.getSuperType(); } HierarchicType t = _cachedArrayListType.deepCloneWithoutSubtype(); current.setSuperType(t); t.setSubType(current); return current; } }