Class BuilderFactory<T>

java.lang.Object
com.hypixel.hytale.server.npc.asset.builder.BuilderFactory<T>
All Implemented Interfaces:
NamedSchema, SchemaConvertable<Void>

public class BuilderFactory<T> extends Object implements SchemaConvertable<Void>, NamedSchema
  • Field Details

  • Constructor Details

  • Method Details

    • add

      @Nonnull public BuilderFactory<T> add(String name, Supplier<Builder<T>> builder)
    • getCategory

      public Class<T> getCategory()
    • createBuilder

      public Builder<T> createBuilder(@Nonnull com.google.gson.JsonElement config)
    • getKeyName

      public String getKeyName(@Nonnull com.google.gson.JsonElement config)
    • createBuilder

      @Nonnull public Builder<T> createBuilder(String name)
    • tryCreateDefaultBuilder

      @Nullable public Builder<T> tryCreateDefaultBuilder()
    • getBuilderNames

      @Nonnull public List<String> getBuilderNames()
    • getSchemaName

      @Nonnull public String getSchemaName()
      Specified by:
      getSchemaName in interface NamedSchema
      Returns:
      the name of this schema
    • toSchema

      @Nonnull public Schema toSchema(@Nonnull SchemaContext context)
      Description copied from interface: SchemaConvertable
      Returns a schema object that represents this codec as JSON Schema.
      Specified by:
      toSchema in interface SchemaConvertable<T>
      Parameters:
      context - A context to use to assist with creating the schema.
      Returns:
      the generated schema.
    • toSchema

      @Nonnull public Schema toSchema(@Nonnull SchemaContext context, boolean isRoot)
    • toSchema

      @Nonnull public Schema toSchema(@Nonnull SchemaContext context, boolean isRoot, @Nullable BuilderFactory.ClassKey classKey)
      Parameters:
      isRoot - whether this schema describes a whole asset file, which also accepts the test and parameter keys
      classKey - the Class key files of this category declare, or null to leave it out