Record Class FragmentTemplateEngine.TemplateInfo
java.lang.Object
java.lang.Record
aQute.bnd.wstemplates.FragmentTemplateEngine.TemplateInfo
- All Implemented Interfaces:
Comparable<FragmentTemplateEngine.TemplateInfo>
- Enclosing class:
FragmentTemplateEngine
public static record FragmentTemplateEngine.TemplateInfo(TemplateID id, String name, String description, String[] require, String[] tag)
extends Record
implements Comparable<FragmentTemplateEngine.TemplateInfo>
Info about a template, comes from the index files.
-
Constructor Summary
ConstructorsConstructorDescriptionTemplateInfo(TemplateID id, String name, String description, String[] require, String... tag) Creates an instance of aTemplateInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanCheck if the id points to a specific commit SHA e.g.booleanname()Returns the value of thenamerecord component.String[]require()Returns the value of therequirerecord component.String[]tag()Returns the value of thetagrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TemplateInfo
public TemplateInfo(TemplateID id, String name, String description, String[] require, String... tag) Creates an instance of aTemplateInforecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentrequire- the value for therequirerecord componenttag- the value for thetagrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<FragmentTemplateEngine.TemplateInfo>
-
isOfficial
public boolean isOfficial()- Returns:
trueif this template is from the github bndtools organisation, which we consider "officially provided by us".
-
isCommitSHA
public boolean isCommitSHA()Check if the id points to a specific commit SHA e.g. githuborg/myrepo/subfolder/workspace-template#b96e0a8877bad1c68cdc050d5854829253ef63bb In this case b96e0a8877bad1c68cdc050d5854829253ef63bb would be the SHA.- Returns:
trueif the repoUrl points to a specific commit SHA.
-
toString
-
hashCode
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
require
Returns the value of therequirerecord component.- Returns:
- the value of the
requirerecord component
-
tag
Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-