public abstract class GenericsUtils extends Object
| Constructor and Description |
|---|
GenericsUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Class<?> |
getParameterType(Class<?> evaluatedClass,
Class<?> interfaceClass,
int position)
For a specific class that implements or extends a parametrized type returns the
parameter of that interface at a given position.
|
public static Class<?> getParameterType(Class<?> evaluatedClass, Class<?> interfaceClass, int position)
class MessageChannelBinder implements Binder<MessageChannel, ?, ?>getParameterType(MessageChannelBinder.class, Binder.class, 0);will returnBinder
evaluatedClass - the evaluated classinterfaceClass - the parametrized interfaceposition - the positionIllegalStateException - if the evaluated class does not implement the
interface orCopyright © 2019 Pivotal Software, Inc.. All rights reserved.