Package io.microsphere.util
Class TypeFinder<T>
- java.lang.Object
-
- io.microsphere.util.TypeFinder<T>
-
- Type Parameters:
T- the type
public class TypeFinder<T> extends java.lang.ObjectThe finder class for Type- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
Type
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypeFinder.IncludeThe enumeration for the type finder includes
-
Constructor Summary
Constructors Constructor Description TypeFinder(T type, java.util.function.Function<T,T> getSuperClassFunction, java.util.function.Function<T,T[]> getInterfacesFunction, boolean includeSelf, boolean includeHierarchicalTypes, boolean includeSuperclass, boolean includeInterfaces)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddSuperTypes(java.util.List<T> allTypes, T type, boolean includeHierarchicalTypes, boolean includeSuperclass, boolean includeInterfaces)static TypeFinder<java.lang.Class<?>>classFinder(java.lang.Class type, boolean includeSelf, boolean includeHierarchicalTypes, boolean includeSuperclass, boolean includeInterfaces)static TypeFinder<java.lang.Class<?>>classFinder(java.lang.Class type, TypeFinder.Include... includes)protected java.util.List<T>doFindTypes(java.util.function.Predicate<? super T>[] typeFilters)java.util.List<T>findTypes(java.util.function.Predicate<? super T>... typeFilters)static TypeFinder<java.lang.reflect.Type>genericTypeFinder(java.lang.reflect.Type type, boolean includeSelf, boolean includeHierarchicalTypes, boolean includeSuperclass, boolean includeInterfaces)static TypeFinder<java.lang.reflect.Type>genericTypeFinder(java.lang.reflect.Type type, TypeFinder.Include... includes)protected T[]getInterfaces(T type)protected TgetSuperClass(T type)protected java.util.List<T>getSuperTypes(T type, boolean includeSuperclass, boolean includedGenericInterfaces)java.util.List<T>getTypes()
-
-
-
Method Detail
-
getTypes
public java.util.List<T> getTypes()
-
findTypes
public java.util.List<T> findTypes(java.util.function.Predicate<? super T>... typeFilters)
-
doFindTypes
protected java.util.List<T> doFindTypes(java.util.function.Predicate<? super T>[] typeFilters)
-
getSuperTypes
protected java.util.List<T> getSuperTypes(T type, boolean includeSuperclass, boolean includedGenericInterfaces)
-
addSuperTypes
protected void addSuperTypes(java.util.List<T> allTypes, T type, boolean includeHierarchicalTypes, boolean includeSuperclass, boolean includeInterfaces)
-
classFinder
public static TypeFinder<java.lang.Class<?>> classFinder(java.lang.Class type, TypeFinder.Include... includes)
-
classFinder
public static TypeFinder<java.lang.Class<?>> classFinder(java.lang.Class type, boolean includeSelf, boolean includeHierarchicalTypes, boolean includeSuperclass, boolean includeInterfaces)
-
genericTypeFinder
public static TypeFinder<java.lang.reflect.Type> genericTypeFinder(java.lang.reflect.Type type, TypeFinder.Include... includes)
-
genericTypeFinder
public static TypeFinder<java.lang.reflect.Type> genericTypeFinder(java.lang.reflect.Type type, boolean includeSelf, boolean includeHierarchicalTypes, boolean includeSuperclass, boolean includeInterfaces)
-
-