@Test void arrayComponentTypeThrowsIfNotArray() { TypeInfo sut = TypeInfo.ofParameter(randomMethod(), MAP_PARAMETER); calling(sut::arrayComponentType) .shouldThrow(NoSuchElementException.class) .withMessage("Map<Short,BigDecimal> is not an array type."); }
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);  }