- java.lang.Object
-
- org.scijava.types.extract.SubTypeExtractor<Map<?,?>>
-
- org.scijava.types.extract.MapTypeExtractor
-
- All Implemented Interfaces:
Comparable<TypeExtractor>,Prioritized<TypeExtractor>,TypeExtractor
public class MapTypeExtractor extends SubTypeExtractor<Map<?,?>>
TypeExtractorplugin which operates onMapobjects.For performance reasons, we examine only one entry of the map, which may be more specifically typed than later entries. Hence the generic types given by this extraction may be overly constrained.
- Author:
- Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description MapTypeExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>baseClass()protected Type[]getTypeParameters(TypeReifier r, Map<?,?> object)Returns aTypearray, where theithTypein the array is theith type parameter of theClassreturned byTypeExtractor.baseClass().doublepriority()-
Methods inherited from class org.scijava.types.extract.SubTypeExtractor
reify
-
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
-
-
-
-
Method Detail
-
priority
public double priority()
-
baseClass
public Class<?> baseClass()
-
getTypeParameters
protected Type[] getTypeParameters(TypeReifier r, Map<?,?> object)
Description copied from class:SubTypeExtractorReturns aTypearray, where theithTypein the array is theith type parameter of theClassreturned byTypeExtractor.baseClass(). Similar toParameterizedType.getActualTypeArguments(), but works onObjects instead ofParameterizedTypes.- Specified by:
getTypeParametersin classSubTypeExtractor<Map<?,?>>- 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()
-
-