Package iu.type

Record Class ComponentArchive

java.lang.Object
java.lang.Record
iu.type.ComponentArchive
Record Components:
path - location of temporary file dedicated to this archive
kind - component kind detected via ArchiveSource
version - component version info read from the archive
properties - META-INF/iu-type.properties when IuComponent.Kind.isModular(), else META-INF/iu.properties
nonEnclosedTypeNames - all top-level classes, including those defined with package and protected encapsulation levels
webResources - all static web resources found in a web archive, include those under WEB-INF/
bundledDependencies - archive sources for all dependencies bundled (i.e. WEB-INF/lib/*.jar) with the archive

record ComponentArchive(Path path, IuComponent.Kind kind, ComponentVersion version, Properties properties, Set<String> nonEnclosedTypeNames, Map<String,byte[]> webResources, Collection<ArchiveSource> bundledDependencies) extends Record
Reads a component archive and provides attributes necessary to realizing the component's instance.

An archive represents a single element in the component's path

  • Constructor Details

  • Method Details

    • from

      static ComponentArchive from(ArchiveSource source) throws IOException
      Reads a component archive from its source.
      Parameters:
      source - ArchiveSource
      Returns:
      archive-level component attributes
      Throws:
      IOException - If an I/O error occurs reading from the source
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • path

      public Path path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • kind

      public IuComponent.Kind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • version

      public ComponentVersion version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • properties

      public Properties properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • nonEnclosedTypeNames

      public Set<String> nonEnclosedTypeNames()
      Returns the value of the nonEnclosedTypeNames record component.
      Returns:
      the value of the nonEnclosedTypeNames record component
    • webResources

      public Map<String,byte[]> webResources()
      Returns the value of the webResources record component.
      Returns:
      the value of the webResources record component
    • bundledDependencies

      public Collection<ArchiveSource> bundledDependencies()
      Returns the value of the bundledDependencies record component.
      Returns:
      the value of the bundledDependencies record component