Class GeneratorUtils

java.lang.Object
net.fabricmc.loom.util.fmj.gen.GeneratorUtils

public final class GeneratorUtils extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static <V> void
    add(com.google.gson.JsonObject json, String key, org.gradle.api.provider.ListProperty<V> property, Function<List<V>,com.google.gson.JsonElement> converter)
     
    static void
    add(com.google.gson.JsonObject json, String key, org.gradle.api.provider.MapProperty<String,String> property)
     
    static <K, V> void
    add(com.google.gson.JsonObject json, String key, org.gradle.api.provider.MapProperty<K,V> property, Function<Map<K,V>,com.google.gson.JsonElement> converter)
     
    static void
    add(com.google.gson.JsonObject json, String key, org.gradle.api.provider.Property<String> property)
     
    static <V, P extends org.gradle.api.provider.Property<V>>
    void
    add(com.google.gson.JsonObject json, String key, P property, Function<V,com.google.gson.JsonElement> converter)
     
    static <V> void
    addArray(com.google.gson.JsonObject json, String key, org.gradle.api.provider.ListProperty<V> property, Function<V,com.google.gson.JsonElement> converter)
     
    static void
    addRequired(com.google.gson.JsonObject json, String key, org.gradle.api.provider.Property<String> property)
     
    static <V, P extends org.gradle.api.provider.Property<V>>
    void
    addRequired(com.google.gson.JsonObject json, String key, P property, Function<V,com.google.gson.JsonElement> converter)
     
    static <V> void
    addSingleOrArray(com.google.gson.JsonObject json, String key, org.gradle.api.provider.ListProperty<V> property, Function<V,com.google.gson.JsonElement> converter)
     
    static void
    addStringOrArray(com.google.gson.JsonObject json, String key, org.gradle.api.provider.ListProperty<String> property)
     
    static <V> com.google.gson.JsonElement
    array(List<V> entries, Function<V,com.google.gson.JsonElement> converter)
     
    static com.google.gson.JsonObject
     
    static <V> com.google.gson.JsonElement
    singleOrArray(List<V> entries, Function<V,com.google.gson.JsonElement> converter)
     
    static com.google.gson.JsonElement
     

    Methods inherited from class java.lang.Object

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

    • add

      public static void add(com.google.gson.JsonObject json, String key, org.gradle.api.provider.Property<String> property)
    • addRequired

      public static void addRequired(com.google.gson.JsonObject json, String key, org.gradle.api.provider.Property<String> property)
    • addStringOrArray

      public static void addStringOrArray(com.google.gson.JsonObject json, String key, org.gradle.api.provider.ListProperty<String> property)
    • addSingleOrArray

      public static <V> void addSingleOrArray(com.google.gson.JsonObject json, String key, org.gradle.api.provider.ListProperty<V> property, Function<V,com.google.gson.JsonElement> converter)
    • addArray

      public static <V> void addArray(com.google.gson.JsonObject json, String key, org.gradle.api.provider.ListProperty<V> property, Function<V,com.google.gson.JsonElement> converter)
    • add

      public static <V, P extends org.gradle.api.provider.Property<V>> void add(com.google.gson.JsonObject json, String key, P property, Function<V,com.google.gson.JsonElement> converter)
    • addRequired

      public static <V, P extends org.gradle.api.provider.Property<V>> void addRequired(com.google.gson.JsonObject json, String key, P property, Function<V,com.google.gson.JsonElement> converter)
    • add

      public static <V> void add(com.google.gson.JsonObject json, String key, org.gradle.api.provider.ListProperty<V> property, Function<List<V>,com.google.gson.JsonElement> converter)
    • add

      public static <K, V> void add(com.google.gson.JsonObject json, String key, org.gradle.api.provider.MapProperty<K,V> property, Function<Map<K,V>,com.google.gson.JsonElement> converter)
    • add

      public static void add(com.google.gson.JsonObject json, String key, org.gradle.api.provider.MapProperty<String,String> property)
    • stringOrArray

      public static com.google.gson.JsonElement stringOrArray(List<String> strings)
    • singleOrArray

      public static <V> com.google.gson.JsonElement singleOrArray(List<V> entries, Function<V,com.google.gson.JsonElement> converter)
    • array

      public static <V> com.google.gson.JsonElement array(List<V> entries, Function<V,com.google.gson.JsonElement> converter)
    • map

      public static com.google.gson.JsonObject map(Map<String,String> map)