@Test void ofParameter() { Method randomMethod = randomMethod(); TypeInfo result = TypeInfo.ofParameter(randomMethod, OPTIONAL_PARAMETER); assertThat(result.rawClass(), equalTo(Optional.class)); assertThat(result.actualTypeArgument(0).rawClass(), equalTo(String.class)); }
public static TypeInfo ofParameter(Method method, int parameter) { return new TypeInfo(method.getGenericParameterTypes()[parameter]); }
TypeInfo { public static TypeInfo ofParameter(Method method, int parameter) { return new TypeInfo(method.getGenericParameterTypes()[parameter]); } }
TypeInfo { public static TypeInfo ofParameter(Method method, int parameter) { return new TypeInfo(method.getGenericParameterTypes()[parameter]); } private  TypeInfo(Type type); }
TypeInfo { public static TypeInfo ofParameter(Method method, int parameter) { return new TypeInfo(method.getGenericParameterTypes()[parameter]); } private  TypeInfo(Type type); @Override String toString(); TypeInfo arrayComponentType(); TypeInfo actualTypeArgument(int index); Class<?> rawClass(); static TypeInfo ofParameter(Method method, int parameter); }
TypeInfo { public static TypeInfo ofParameter(Method method, int parameter) { return new TypeInfo(method.getGenericParameterTypes()[parameter]); } private  TypeInfo(Type type); @Override String toString(); TypeInfo arrayComponentType(); TypeInfo actualTypeArgument(int index); Class<?> rawClass(); static TypeInfo ofParameter(Method method, int parameter);  }