Class ImmutableDescriptorListing

java.lang.Object
io.github.ascopes.protobufmavenplugin.sources.ImmutableDescriptorListing
All Implemented Interfaces:
DescriptorListing

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

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

  • Field Details

    • descriptorFilePath

      private final Path descriptorFilePath
    • sourceFiles

      private final Set<String> sourceFiles
  • Constructor Details

  • Method Details

    • getDescriptorFilePath

      public Path getDescriptorFilePath()
      Specified by:
      getDescriptorFilePath in interface DescriptorListing
      Returns:
      The value of the descriptorFilePath attribute
    • getSourceFiles

      public Set<String> getSourceFiles()
      Specified by:
      getSourceFiles in interface DescriptorListing
      Returns:
      The value of the sourceFiles attribute
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableDescriptorListing 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, ImmutableDescriptorListing another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: descriptorFilePath, sourceFiles.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableDescriptorListing.Builder builder()
      Creates a builder for ImmutableDescriptorListing.
       ImmutableDescriptorListing.builder()
          .descriptorFilePath(java.nio.file.Path | null) // nullable descriptorFilePath
          .addSourceFiles|addAllSourceFiles(String) // sourceFiles elements
          .build();
       
      Returns:
      A new ImmutableDescriptorListing builder
    • createSafeList

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

      private static <T> Set<T> createUnmodifiableSet(List<T> list)
      Unmodifiable set constructed from list to avoid rehashing.