java.lang.Object
java.lang.Record
iu.type.ComponentArchive
- Record Components:
path
- location of temporary file dedicated to this archivekind
- component kind detected viaArchiveSource
version
- component version info read from the archiveproperties
-META-INF/iu-type.properties
whenIuComponent.Kind.isModular()
, elseMETA-INF/iu.properties
nonEnclosedTypeNames
- all top-level classes, including those defined with package and protected encapsulation levelswebResources
- all static web resources found in aweb
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 Summary
ConstructorsConstructorDescriptionComponentArchive
(Path path, IuComponent.Kind kind, ComponentVersion version, Properties properties, Set<String> nonEnclosedTypeNames, Map<String, byte[]> webResources, Collection<ArchiveSource> bundledDependencies) Creates an instance of aComponentArchive
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebundledDependencies
record component.final boolean
Indicates whether some other object is "equal to" this one.(package private) static ComponentArchive
from
(ArchiveSource source) Reads a component archive from its source.final int
hashCode()
Returns a hash code value for this object.kind()
Returns the value of thekind
record component.Returns the value of thenonEnclosedTypeNames
record component.path()
Returns the value of thepath
record component.Returns the value of theproperties
record component.final String
toString()
Returns a string representation of this record class.version()
Returns the value of theversion
record component.Returns the value of thewebResources
record component.
-
Constructor Details
-
ComponentArchive
ComponentArchive(Path path, IuComponent.Kind kind, ComponentVersion version, Properties properties, Set<String> nonEnclosedTypeNames, Map<String, byte[]> webResources, Collection<ArchiveSource> bundledDependencies) Creates an instance of aComponentArchive
record class.- Parameters:
path
- the value for thepath
record componentkind
- the value for thekind
record componentversion
- the value for theversion
record componentproperties
- the value for theproperties
record componentnonEnclosedTypeNames
- the value for thenonEnclosedTypeNames
record componentwebResources
- the value for thewebResources
record componentbundledDependencies
- the value for thebundledDependencies
record component
-
-
Method Details
-
from
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
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
path
Returns the value of thepath
record component.- Returns:
- the value of the
path
record component
-
kind
Returns the value of thekind
record component.- Returns:
- the value of the
kind
record component
-
version
Returns the value of theversion
record component.- Returns:
- the value of the
version
record component
-
properties
Returns the value of theproperties
record component.- Returns:
- the value of the
properties
record component
-
nonEnclosedTypeNames
Returns the value of thenonEnclosedTypeNames
record component.- Returns:
- the value of the
nonEnclosedTypeNames
record component
-
webResources
Returns the value of thewebResources
record component.- Returns:
- the value of the
webResources
record component
-
bundledDependencies
Returns the value of thebundledDependencies
record component.- Returns:
- the value of the
bundledDependencies
record component
-