Package io.micronaut.inject.writer
Class GenUtils
java.lang.Object
io.micronaut.inject.writer.GenUtils
The expressions utils.
- Since:
- 4.8
- Author:
- Denis Stepanov
- 
Method SummaryModifier and TypeMethodDescriptionstatic io.micronaut.sourcegen.model.ExpressionDefThe list of expression.static io.micronaut.sourcegen.model.ExpressionDeflistOfString(List<String> strings) The list of string expression.static io.micronaut.sourcegen.model.ExpressionDefmapEntry(io.micronaut.sourcegen.model.ExpressionDef key, io.micronaut.sourcegen.model.ExpressionDef value) The map entry expression.static <T> io.micronaut.sourcegen.model.ExpressionDefstringMapOf(@NonNull Map<? extends CharSequence, T> map, boolean skipEmpty, T empty, @NonNull Function<T, io.micronaut.sourcegen.model.ExpressionDef> objAsExpression) Create a map of a string key expression.static <T> io.micronaut.sourcegen.model.ExpressionDefstringMapOf(@NonNull Map<? extends CharSequence, T> map, boolean skipEmpty, T empty, @Nullable Predicate<T> valuePredicate, @NonNull Function<T, io.micronaut.sourcegen.model.ExpressionDef> objAsExpression) Create a map of a string key expression.
- 
Method Details- 
stringMapOfpublic static <T> io.micronaut.sourcegen.model.ExpressionDef stringMapOf(@NonNull @NonNull Map<? extends CharSequence, T> map, boolean skipEmpty, @Nullable T empty, @NonNull @NonNull Function<T, io.micronaut.sourcegen.model.ExpressionDef> objAsExpression) Create a map of a string key expression.- Type Parameters:
- T- The value type
- Parameters:
- map- The map
- skipEmpty- Should skip empty value entry
- empty- Replace the empty entry value with
- objAsExpression- The object to expression mapper
- Returns:
- The expression
 
- 
stringMapOfpublic static <T> io.micronaut.sourcegen.model.ExpressionDef stringMapOf(@NonNull @NonNull Map<? extends CharSequence, T> map, boolean skipEmpty, @Nullable T empty, @Nullable @Nullable Predicate<T> valuePredicate, @NonNull @NonNull Function<T, io.micronaut.sourcegen.model.ExpressionDef> objAsExpression) Create a map of a string key expression.- Type Parameters:
- T- The value type
- Parameters:
- map- The map
- skipEmpty- Should skip empty value entry
- empty- Replace the empty entry value with
- valuePredicate- The value predicate
- objAsExpression- The object to expression mapper
- Returns:
- The expression
 
- 
mapEntrypublic static io.micronaut.sourcegen.model.ExpressionDef mapEntry(io.micronaut.sourcegen.model.ExpressionDef key, io.micronaut.sourcegen.model.ExpressionDef value) The map entry expression.- Parameters:
- key- The key
- value- The value
- Returns:
- the expression
 
- 
listOfStringThe list of string expression.- Parameters:
- strings- The strings
- Returns:
- the expression
 
- 
listOfpublic static io.micronaut.sourcegen.model.ExpressionDef listOf(List<io.micronaut.sourcegen.model.ExpressionDef> values) The list of expression.- Parameters:
- values- The values
- Returns:
- the expression
 
 
-