@Test void superclassOfObjectIsEmpty() { Optional<Class<?>> result = ClassUtil.superclass(Object.class); assertThat(result, is(Optional.empty())); }
public static Optional<Class<?>> superclass(Class<?> aClass) { return Optional.ofNullable(aClass.getSuperclass()); }
ClassUtil extends UtilityClass { public static Optional<Class<?>> superclass(Class<?> aClass) { return Optional.ofNullable(aClass.getSuperclass()); } }
ClassUtil extends UtilityClass { public static Optional<Class<?>> superclass(Class<?> aClass) { return Optional.ofNullable(aClass.getSuperclass()); }  }
ClassUtil extends UtilityClass { public static Optional<Class<?>> superclass(Class<?> aClass) { return Optional.ofNullable(aClass.getSuperclass()); }  @SuppressWarnings("unchecked") static Class<T> forObject(T value); static Optional<Class<?>> forName(String className); static Optional<Class<?>> forArrayOf(Class<?> componentClass); static Method getDeclaredMethod(Class<?> aClass, String name, Class<?>... parameterTypes); static Optional<Method> declaredMethod(Class<?> aClass, String name, Class<?>... parameterTypes); static Stream<Method> declaredMethods(Class<?> aClass); static Field getDeclaredField(Class<?> aClass, String fieldName); static Optional<Field> declaredField(Class<?> aClass, String fieldName); static Optional<Field> findField(Class<?> aClass, String fieldName); static Optional<Class<?>> superclass(Class<?> aClass); static Stream<Class<?>> superclasses(Class<?> aClass); static boolean hasAnnotation(Class<?> aClass, Class<A> annotationClass); static Optional<A> annotation(Class<T> aClass, Class<A> annotationClass); static Stream<A> annotations(Class<T> aClass, Class<A> annotationClass); static Optional<Constructor<T>> constructor(Class<T> aClass, Class<?>... parameterTypes); }
ClassUtil extends UtilityClass { public static Optional<Class<?>> superclass(Class<?> aClass) { return Optional.ofNullable(aClass.getSuperclass()); }  @SuppressWarnings("unchecked") static Class<T> forObject(T value); static Optional<Class<?>> forName(String className); static Optional<Class<?>> forArrayOf(Class<?> componentClass); static Method getDeclaredMethod(Class<?> aClass, String name, Class<?>... parameterTypes); static Optional<Method> declaredMethod(Class<?> aClass, String name, Class<?>... parameterTypes); static Stream<Method> declaredMethods(Class<?> aClass); static Field getDeclaredField(Class<?> aClass, String fieldName); static Optional<Field> declaredField(Class<?> aClass, String fieldName); static Optional<Field> findField(Class<?> aClass, String fieldName); static Optional<Class<?>> superclass(Class<?> aClass); static Stream<Class<?>> superclasses(Class<?> aClass); static boolean hasAnnotation(Class<?> aClass, Class<A> annotationClass); static Optional<A> annotation(Class<T> aClass, Class<A> annotationClass); static Stream<A> annotations(Class<T> aClass, Class<A> annotationClass); static Optional<Constructor<T>> constructor(Class<T> aClass, Class<?>... parameterTypes);  }