Class Metadata.MetadataBuilder

java.lang.Object
com.avrix.plugin.Metadata.MetadataBuilder
Enclosing class:
Metadata

public static final class Metadata.MetadataBuilder extends Object
Builder class for constructing Metadata instances.
  • Constructor Details

    • MetadataBuilder

      public MetadataBuilder()
      Creates a new builder instance.
  • Method Details

    • name

      public Metadata.MetadataBuilder name(String name)
      Sets the name of the plugin.
      Parameters:
      name - the name of the plugin
      Returns:
      the builder instance
    • id

      Sets the ID of the plugin.
      Parameters:
      id - the ID of the plugin
      Returns:
      the builder instance
    • pluginFile

      public Metadata.MetadataBuilder pluginFile(File file)
      Sets the file of the plugin.
      Parameters:
      file - plugin archive Jar object
      Returns:
      the builder instance
    • description

      public Metadata.MetadataBuilder description(String description)
      Sets the description of the plugin.
      Parameters:
      description - the description of the plugin
      Returns:
      the builder instance
    • author

      public Metadata.MetadataBuilder author(String author)
      Sets the author of the plugin.
      Parameters:
      author - the author of the plugin
      Returns:
      the builder instance
    • environment

      public Metadata.MetadataBuilder environment(String environment)
      Sets the environment of the plugin.
      Parameters:
      environment - the environment of the plugin
      Returns:
      the builder instance
    • version

      public Metadata.MetadataBuilder version(String version)
      Sets the version of the plugin.
      Parameters:
      version - the version of the plugin
      Returns:
      the builder instance
    • license

      public Metadata.MetadataBuilder license(String license)
      Sets the license of the plugin.
      Parameters:
      license - the license of the plugin
      Returns:
      the builder instance
    • contacts

      public Metadata.MetadataBuilder contacts(String contacts)
      Sets the contact information for the plugin author.
      Parameters:
      contacts - the contact information for the plugin author
      Returns:
      the builder instance
    • entryPointsList

      public Metadata.MetadataBuilder entryPointsList(List<String> entryPointsList)
      Sets the List of entry points for the plugin.
      Parameters:
      entryPointsList - the list of entry points for the plugin
      Returns:
      the builder instance
    • patchList

      public Metadata.MetadataBuilder patchList(List<String> patchList)
      Sets the List of patches for the plugin.
      Parameters:
      patchList - the list of patches for the plugin
      Returns:
      the builder instance
    • dependencies

      public Metadata.MetadataBuilder dependencies(Map<String,String> dependencies)
      Sets the Map of dependencies for the plugin.
      Parameters:
      dependencies - the map of dependencies for the plugin
      Returns:
      the builder instance
    • build

      public Metadata build()
      Builds and returns the Metadata instance. Ensures that all required fields are set.
      Returns:
      the constructed Metadata instance
      Throws:
      NullPointerException - if any required field is not set