Record Class GradlePluginCoordinate
java.lang.Object
java.lang.Record
io.github.duckasteroid.agentdocs.resolve.task.model.GradlePluginCoordinate
- Record Components:
pluginId- the plugin's id, e.g.io.github.duckasteroid.agent-docs.publish
- All Implemented Interfaces:
SkillSource
Identifies a Gradle plugin applied via the
plugins {} block, discovered by walking
applied plugin classes and reading each one's jar via its classloader — there is no Maven GAV
to key off, since plugin jars aren't resolved as normal project dependencies.-
Constructor Summary
ConstructorsConstructorDescriptionGradlePluginCoordinate(String pluginId) Creates an instance of aGradlePluginCoordinaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionUntruncated, normalized candidate skill name using only the last dot-separated segment of the plugin id (e.g.describe()Human-readable identity for logging (a GAV string, orplugin:<id>).final booleanIndicates whether some other object is "equal to" this one.finalizeSkillName(String normalizedKey) Applies the length-limit and deterministic hash-suffix rule to an already-normalized candidate key.Untruncated, normalized candidate skill name using the full plugin id — the fallback tier whenartifactNameKey()collides with another source in the same run.final inthashCode()Returns a hash code value for this object.pluginId()Returns the value of thepluginIdrecord component.Final, maximally-qualified skill name.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GradlePluginCoordinate
Creates an instance of aGradlePluginCoordinaterecord class.- Parameters:
pluginId- the value for thepluginIdrecord component
-
-
Method Details
-
describe
Human-readable identity for logging (a GAV string, orplugin:<id>).- Specified by:
describein interfaceSkillSource- Returns:
- display string
-
artifactNameKey
Untruncated, normalized candidate skill name using only the last dot-separated segment of the plugin id (e.g.publishfromio.github.duckasteroid.agent-docs.publish) — the shortest and most readable tier.- Specified by:
artifactNameKeyin interfaceSkillSource- Returns:
- normalized candidate key
-
groupArtifactNameKey
Untruncated, normalized candidate skill name using the full plugin id — the fallback tier whenartifactNameKey()collides with another source in the same run. Since plugin ids are already globally unique, this tier is effectively unique on its own.- Specified by:
groupArtifactNameKeyin interfaceSkillSource- Returns:
- normalized candidate key
-
skillName
Final, maximally-qualified skill name. Identical togroupArtifactNameKey()(there's no further-qualifying detail beyond the plugin id itself), finalized with the length-limit and hash-suffix rule.- Specified by:
skillNamein interfaceSkillSource- Returns:
- skill-folder-compatible name
-
finalizeSkillName
Applies the length-limit and deterministic hash-suffix rule to an already-normalized candidate key.- Specified by:
finalizeSkillNamein interfaceSkillSource- Parameters:
normalizedKey- a normalized candidate key- Returns:
- skill-folder-compatible name, truncated with a hash suffix if needed
-
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). -
pluginId
Returns the value of thepluginIdrecord component.- Returns:
- the value of the
pluginIdrecord component
-