Class ImmutableMavenProtocPlugin

java.lang.Object
io.github.ascopes.protobufmavenplugin.plugins.ImmutableMavenProtocPlugin
All Implemented Interfaces:
MavenArtifact, MavenProtocPlugin, ProtocPlugin

@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableMavenProtocPlugin extends Object implements MavenProtocPlugin
Immutable implementation of MavenProtocPlugin.

Use the builder to create immutable instances: ImmutableMavenProtocPlugin.builder().

  • Method Details

    • getGroupId

      public String getGroupId()
      Get the group ID.
      Specified by:
      getGroupId in interface MavenArtifact
      Returns:
      the group ID.
    • getArtifactId

      public String getArtifactId()
      Get the artifact ID.
      Specified by:
      getArtifactId in interface MavenArtifact
      Returns:
      the artifact ID.
    • getType

      public @Nullable String getType()
      Get the artifact type.

      May be null if the default should be used.

      Specified by:
      getType in interface MavenArtifact
      Returns:
      the artifact type.
    • getClassifier

      public @Nullable String getClassifier()
      Get the artifact classifier.

      May be null if no classifier is set.

      Specified by:
      getClassifier in interface MavenArtifact
      Returns:
      the artifact classifier.
    • getOptions

      public @Nullable String getOptions()
      Specified by:
      getOptions in interface ProtocPlugin
      Returns:
      The value of the options attribute
    • getOutputDirectory

      public @Nullable Path getOutputDirectory()
      Specified by:
      getOutputDirectory in interface ProtocPlugin
      Returns:
      The value of the outputDirectory attribute
    • isRegisterAsCompilationRoot

      public @Nullable Boolean isRegisterAsCompilationRoot()
      Specified by:
      isRegisterAsCompilationRoot in interface ProtocPlugin
      Returns:
      The value of the registerAsCompilationRoot attribute
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface ProtocPlugin
      Returns:
      The value of the order attribute
    • isSkip

      public boolean isSkip()
      Specified by:
      isSkip in interface ProtocPlugin
      Returns:
      The value of the skip attribute
    • getVersion

      public @NonNull String getVersion()
      Get the version of the protoc plugin.

      This must be specified for plugins. The use of <dependencyManagement/> is ignored here.

      Specified by:
      getVersion in interface MavenArtifact
      Specified by:
      getVersion in interface MavenProtocPlugin
      Returns:
      the protoc plugin version to use.
    • getJvmArgs

      public @Nullable List<String> getJvmArgs()
      Get the command line arguments to pass to the JVM.

      This defaults to an empty list.

      Specified by:
      getJvmArgs in interface MavenProtocPlugin
      Returns:
      the list of command line arguments to pass to the JVM.
      Since:
      2.6.0
    • getJvmConfigArgs

      public @Nullable List<String> getJvmConfigArgs()
      Get the arguments to pass to the JVM to configure it.

      Users can use this to control concerns such as heap memory controls, GC and JIT settings, and specifying additional JVM options.

      Specified by:
      getJvmConfigArgs in interface MavenProtocPlugin
      Returns:
      the list of command line arguments to pass to the JVM.
      Since:
      2.6.0
    • getMainClass

      public @Nullable String getMainClass()
      The main class entrypoint to use if the plugin is not an assembled JAR.

      Ignored in all other cases.

      Specified by:
      getMainClass in interface MavenProtocPlugin
      Returns:
      the main class name.
      Since:
      2.5.0
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableMavenProtocPlugin that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: groupId, artifactId, type, classifier, options, outputDirectory, registerAsCompilationRoot, order, skip, version, jvmArgs, jvmConfigArgs, mainClass.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value MavenProtocPlugin with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • builder

      public static ImmutableMavenProtocPlugin.Builder builder()
      Creates a builder for ImmutableMavenProtocPlugin.
       ImmutableMavenProtocPlugin.builder()
          .groupId(String | null) // nullable groupId
          .artifactId(String | null) // nullable artifactId
          .type(@org.jspecify.annotations.Nullable String | null) // nullable type
          .classifier(@org.jspecify.annotations.Nullable String | null) // nullable classifier
          .options(@org.jspecify.annotations.Nullable String | null) // nullable options
          .outputDirectory(java.nio.file.@org.jspecify.annotations.Nullable Path | null) // nullable outputDirectory
          .registerAsCompilationRoot(@org.jspecify.annotations.Nullable Boolean | null) // nullable registerAsCompilationRoot
          .order(int) // optional order
          .skip(boolean) // optional skip
          .version(@org.jspecify.annotations.NonNull String | null) // nullable version
          .jvmArgs(@org.jspecify.annotations.Nullable List&lt;String&gt; | null) // nullable jvmArgs
          .jvmConfigArgs(@org.jspecify.annotations.Nullable List&lt;String&gt; | null) // nullable jvmConfigArgs
          .mainClass(@org.jspecify.annotations.Nullable String | null) // nullable mainClass
          .build();
       
      Returns:
      A new ImmutableMavenProtocPlugin builder