Class InitializedTokenFactory

java.lang.Object
com.minecolonies.api.colony.requestsystem.token.AbstractTokenFactory<FactoryVoidInput>
com.minecolonies.api.colony.requestsystem.token.InitializedTokenFactory
All Implemented Interfaces:
IFactory<FactoryVoidInput,StandardToken>, ITokenFactory<FactoryVoidInput,StandardToken>

public class InitializedTokenFactory extends AbstractTokenFactory<FactoryVoidInput>
IToken factory that produces an IToken from a random UUID
  • Constructor Details

    • InitializedTokenFactory

      public InitializedTokenFactory()
  • Method Details

    • getNewInstance

      @NotNull public @NotNull StandardToken getNewInstance(@NotNull @NotNull FactoryVoidInput input)
      Description copied from interface: ITokenFactory
      Method to get a new instance of a token given the input and token.
      Parameters:
      input - The input to build a new token for.
      Returns:
      The new output instance for a given input.
    • getFactoryInputType

      @NotNull public @NotNull com.google.common.reflect.TypeToken<? extends FactoryVoidInput> getFactoryInputType()
      Description copied from interface: IFactory
      Used to determine which type this can produce.
      Returns:
      The class that represents the Type of Request this can produce.
    • getSerializationId

      public short getSerializationId()
      Description copied from interface: IFactory
      Get a serialization id for the factory.
      Returns:
      the short id.