Class JarMetadata
java.lang.Object
uno.anahata.asi.toolkit.java.classpath.JarMetadata
Represents the extracted metadata of a JAR file.
This DTO is used by the VeryPrettyClassPathPrinter
to represent libraries in a token-efficient manner.
- Author:
- anahata
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe logical ID of the JAR (usually the artifactId).Additional properties discovered during inspection.private StringThe vendor or provider of the library (e.g., "Apache NetBeans", "Google").private StringThe version of the library, recovered from the filename, Manifest, or Maven properties. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisBetterThan(JarMetadata other) Determines if this metadata is "better" than another (more informative).static StringsanitizeVersion(String version) Sanitizes a version string by removing build metadata, timestamps, and trailing spaces.toToon()Converts the metadata into a TOON (Token Optimized Object Notation) string.
-
Field Details
-
id
The logical ID of the JAR (usually the artifactId). -
version
The version of the library, recovered from the filename, Manifest, or Maven properties. -
vendor
The vendor or provider of the library (e.g., "Apache NetBeans", "Google"). -
properties
-
-
Constructor Details
-
JarMetadata
public JarMetadata()
-
-
Method Details
-
sanitizeVersion
-
isBetterThan
Determines if this metadata is "better" than another (more informative).- Parameters:
other- The other metadata to compare with.- Returns:
- true if this is more informative.
-
toToon
Converts the metadata into a TOON (Token Optimized Object Notation) string.- Returns:
- A compact string representation.
-

