public static Stream<Class<?>> classesIn(Class<?> entityClass) {
        if (entityClass == null) {
            return Stream.empty();
        } else {
            return Stream.concat(Stream.concat(Stream.of(entityClass.getDeclaredClasses()),
                Stream.of(entityClass.getSuperclass())
                    .flatMap(EnumGeneratorUtil::classesIn)
            ), Stream.of(entityClass.getInterfaces())
                .flatMap(EnumGeneratorUtil::classesIn)
            );
        }
    }
Returns a stream of classes located inside the specified class. If the
specified class is {@code null}, then an empty stream is returned.

@param entityClass  the class to look in (can be {code null})
@return             stream of classes
plugin-parent/enum-generator/src/main/java/com/speedment/plugins/enums/internal/EnumGeneratorUtil.java