Class ImmutableProtocInvocation

java.lang.Object
io.github.ascopes.protobufmavenplugin.protoc.ImmutableProtocInvocation
All Implemented Interfaces:
ProtocInvocation

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

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

  • Field Details

    • protocPath

      private final Path protocPath
    • isFatalWarnings

      private final boolean isFatalWarnings
    • importPaths

      private final List<Path> importPaths
    • inputDescriptorFiles

      private final List<Path> inputDescriptorFiles
    • descriptorSourceFiles

      private final List<String> descriptorSourceFiles
    • sourcePaths

      private final List<Path> sourcePaths
    • targets

      private final SortedSet<ProtocTarget> targets
  • Constructor Details

  • Method Details

    • getProtocPath

      public Path getProtocPath()
      Specified by:
      getProtocPath in interface ProtocInvocation
      Returns:
      The value of the protocPath attribute
    • isFatalWarnings

      public boolean isFatalWarnings()
      Specified by:
      isFatalWarnings in interface ProtocInvocation
      Returns:
      The value of the isFatalWarnings attribute
    • getImportPaths

      public List<Path> getImportPaths()
      Specified by:
      getImportPaths in interface ProtocInvocation
      Returns:
      The value of the importPaths attribute
    • getInputDescriptorFiles

      public List<Path> getInputDescriptorFiles()
      Specified by:
      getInputDescriptorFiles in interface ProtocInvocation
      Returns:
      The value of the inputDescriptorFiles attribute
    • getDescriptorSourceFiles

      public List<String> getDescriptorSourceFiles()
      Specified by:
      getDescriptorSourceFiles in interface ProtocInvocation
      Returns:
      The value of the descriptorSourceFiles attribute
    • getSourcePaths

      public List<Path> getSourcePaths()
      Specified by:
      getSourcePaths in interface ProtocInvocation
      Returns:
      The value of the sourcePaths attribute
    • getTargets

      public SortedSet<ProtocTarget> getTargets()
      Specified by:
      getTargets in interface ProtocInvocation
      Returns:
      The value of the targets attribute
    • equals

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

      private boolean equalTo(int synthetic, ImmutableProtocInvocation another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: protocPath, isFatalWarnings, importPaths, inputDescriptorFiles, descriptorSourceFiles, sourcePaths, targets.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableProtocInvocation.Builder builder()
      Creates a builder for ImmutableProtocInvocation.
       ImmutableProtocInvocation.builder()
          .protocPath(java.nio.file.Path | null) // nullable protocPath
          .isFatalWarnings(boolean) // required isFatalWarnings
          .addImportPaths|addAllImportPaths(java.nio.file.Path) // importPaths elements
          .addInputDescriptorFiles|addAllInputDescriptorFiles(java.nio.file.Path) // inputDescriptorFiles elements
          .addDescriptorSourceFiles|addAllDescriptorSourceFiles(String) // descriptorSourceFiles elements
          .addSourcePaths|addAllSourcePaths(java.nio.file.Path) // sourcePaths elements
          .targets(SortedSet&lt;io.github.ascopes.protobufmavenplugin.protoc.targets.ProtocTarget&gt; | null) // nullable targets
          .build();
       
      Returns:
      A new ImmutableProtocInvocation builder
    • createSafeList

      private static <T> List<T> createSafeList(Iterable<? extends T> iterable, boolean checkNulls, boolean skipNulls)
    • createUnmodifiableList

      private static <T> List<T> createUnmodifiableList(boolean clone, List<T> list)