Class ClojFunctionalUtils
java.lang.Object
io.github.hglabplh_tech.reflect.clojure.api.utils.ClojFunctionalUtils
This s a utility class for conversion from Java Types to clojure vectors
or maps representing the content
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe enum class for the different types when translating class names to Clojure keyword convention -
Method Summary
Modifier and TypeMethodDescriptionstatic Consumer<clojure.lang.IFn>buildFunConsumer(clojure.lang.IFn clojFun) static <T> clojure.lang.IPersistentVectorgetArrayAsLazyVector(T[] arrayContent) static clojure.lang.IPersistentVectorgetListAsLazyVector(List<?> listContent) transform a java.util.List to a Clojure vectorstatic clojure.lang.IPersistentMapretrieveGenericParamTypesAsMeta(clojure.lang.IPersistentVector paramVect) transform a generic param to a key valuestatic clojure.lang.KeywordretrieveKeywordForJavaID(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.
-
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
- Parameters:
value-- Returns:
-
getListAsLazyVector
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 convertedobjectType- the type of the object to generate a prefix if wanted (meth-(Method) fld-(Field) cls-(Class) ...- Returns:
- the K
-