- java.lang.Object
-
- org.scijava.types.extract.SubTypeExtractor<T>
-
- Type Parameters:
T- the superTypethat implementations cover
- All Implemented Interfaces:
Comparable<TypeExtractor>,Prioritized<TypeExtractor>,TypeExtractor
- Direct Known Subclasses:
IterableTypeExtractor,MapTypeExtractor
public abstract class SubTypeExtractor<T> extends Object implements TypeExtractor
A partialTypeExtractorimplementation that specializes in recovering subTypes based on a defined superType.- Author:
- Gabriel Selzer
-
-
Constructor Summary
Constructors Constructor Description SubTypeExtractor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Type[]getTypeParameters(TypeReifier r, T object)Returns aTypearray, where theithTypein the array is theith type parameter of theClassreturned byTypeExtractor.baseClass().Typereify(TypeReifier r, Object object)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.scijava.priority.Prioritized
compareTo
-
Methods inherited from interface org.scijava.types.extract.TypeExtractor
baseClass, priority
-
-
-
-
Method Detail
-
getTypeParameters
protected abstract Type[] getTypeParameters(TypeReifier r, T object)
Returns aTypearray, where theithTypein the array is theith type parameter of theClassreturned byTypeExtractor.baseClass(). Similar toParameterizedType.getActualTypeArguments(), but works onObjects instead ofParameterizedTypes.- Parameters:
r- theTypeReifierused to reify the type parameters.object- theObjectto extract type parameters from.- Returns:
- the actual type arguments of
Object, with respect to theTypereturned byTypeExtractor.baseClass() - See Also:
ParameterizedType.getActualTypeArguments()
-
reify
public Type reify(TypeReifier r, Object object)
- Specified by:
reifyin interfaceTypeExtractor
-
-