Class SchemaUtils


  • public final class SchemaUtils
    extends java.lang.Object
    TODO.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  SchemaUtils.ThrowingFunction<T,​R>
      Function that may throw an exception.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T,​R>
      java.util.function.Function<T,​java.util.stream.Stream<R>>
      applyOrEmpty​(SchemaUtils.ThrowingFunction<T,​java.util.stream.Stream<R>> func)
      Apply a throwing function, and if it throws, log it and let it return an empty Stream.
      static <T,​R>
      java.util.function.Function<T,​java.util.stream.Stream<R>>
      applyOrIllegalException​(SchemaUtils.ThrowingFunction<T,​java.util.stream.Stream<R>> func)
      Apply a throwing function, and if it throws, log it and let it return an empty Stream.
      static java.lang.String expandClass​(java.lang.String classShorthand)
      Expand a class name with the group name if it starts with a dot.
      static java.lang.String getProjectGroup()
      TODO.
      static java.lang.String snakeToCamelCase​(java.lang.String value)
      Converts given file name from snake_case to CamelCase.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getProjectGroup

        public static java.lang.String getProjectGroup()
        TODO.
        Returns:
        TODO
      • expandClass

        public static java.lang.String expandClass​(java.lang.String classShorthand)
        Expand a class name with the group name if it starts with a dot.
        Parameters:
        classShorthand - class name, possibly starting with a dot as a shorthand.
        Returns:
        class name or null if null or empty.
      • snakeToCamelCase

        public static java.lang.String snakeToCamelCase​(java.lang.String value)
        Converts given file name from snake_case to CamelCase. This will cause underscores to be removed, and the next character to be uppercase. This only converts the value up to the first dot encountered.
        Parameters:
        value - file name in snake_case
        Returns:
        main part of file name in CamelCase.
      • applyOrEmpty

        public static <T,​R> java.util.function.Function<T,​java.util.stream.Stream<R>> applyOrEmpty​(SchemaUtils.ThrowingFunction<T,​java.util.stream.Stream<R>> func)
        Apply a throwing function, and if it throws, log it and let it return an empty Stream.
      • applyOrIllegalException

        public static <T,​R> java.util.function.Function<T,​java.util.stream.Stream<R>> applyOrIllegalException​(SchemaUtils.ThrowingFunction<T,​java.util.stream.Stream<R>> func)
        Apply a throwing function, and if it throws, log it and let it return an empty Stream.