Class ClojFunctionalUtils

java.lang.Object
io.github.hglabplh_tech.reflect.clojure.api.utils.ClojFunctionalUtils

public class ClojFunctionalUtils extends Object
This s a utility class for conversion from Java Types to clojure vectors or maps representing the content
  • Method Details

    • getArrayAsLazyVector

      public static <T> clojure.lang.IPersistentVector getArrayAsLazyVector(T[] arrayContent)
      Parameters:
      arrayContent - the array to transform
      Returns:
      the persistence vector with the array-content
    • buildFunConsumer

      public static Consumer<clojure.lang.IFn> buildFunConsumer(clojure.lang.IFn clojFun)
      Parameters:
      value -
      Returns:
    • getListAsLazyVector

      public static clojure.lang.IPersistentVector getListAsLazyVector(List<?> listContent)
      transform a java.util.List to a Clojure vector
      Parameters:
      listContent - the list to be transformed
      Returns:
      thevector with the list content
    • retrieveGenericParamTypesAsMeta

      public static clojure.lang.IPersistentMap retrieveGenericParamTypesAsMeta(clojure.lang.IPersistentVector paramVect)
      transform a generic param to a key value
      Parameters:
      paramVect - the vector of parameters
      Returns:
      the key value map (name, type-name)
    • retrieveKeywordForJavaID

      public static clojure.lang.Keyword retrieveKeywordForJavaID(String id, ClojFunctionalUtils.ObjType objectType)
      Make a Clojure keyword out of a Java Name String the name string is converted to Clojure name convention e.g. K gets k- (No CamelCase)
      Parameters:
      id - the id(Java Name) to be converted
      objectType - the type of the object to generate a prefix if wanted (meth-(Method) fld-(Field) cls-(Class) ...
      Returns:
      the K