Package name.jurgenei.gradle.antlr
Record Class LanguageTaskDefaults
java.lang.Object
java.lang.Record
name.jurgenei.gradle.antlr.LanguageTaskDefaults
public record LanguageTaskDefaults(String grammar, String parserClassName, String lexerClassName, String startRule, List<String> includes, String targetExtension, String sexprFormat)
extends Record
Shared conventions for language-specific XmlAst task variants.
Language plugin modules use this type to reduce constructor boilerplate and keep task defaults consistent when adding new language integrations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(XmlAstGradleTask task) Applies defaults to a language-specific XmlAst task.final booleanIndicates whether some other object is "equal to" this one.grammar()Returns the value of thegrammarrecord component.final inthashCode()Returns a hash code value for this object.includes()Returns the value of theincludesrecord component.Returns the value of thelexerClassNamerecord component.static LanguageTaskDefaultsof(String grammar, String parserClassName, String lexerClassName, String startRule, List<String> includes) Creates language defaults with XML output and compact S-expression rendering defaults.static LanguageTaskDefaultsof(String grammar, String parserClassName, String lexerClassName, String startRule, List<String> includes, String targetExtension, String sexprFormat) Creates language defaults with explicit output extension and S-expression format.Returns the value of theparserClassNamerecord component.Returns the value of thesexprFormatrecord component.Returns the value of thestartRulerecord component.Returns the value of thetargetExtensionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LanguageTaskDefaults
public LanguageTaskDefaults(String grammar, String parserClassName, String lexerClassName, String startRule, List<String> includes, String targetExtension, String sexprFormat) Creates an instance of aLanguageTaskDefaultsrecord class.- Parameters:
grammar- the value for thegrammarrecord componentparserClassName- the value for theparserClassNamerecord componentlexerClassName- the value for thelexerClassNamerecord componentstartRule- the value for thestartRulerecord componentincludes- the value for theincludesrecord componenttargetExtension- the value for thetargetExtensionrecord componentsexprFormat- the value for thesexprFormatrecord component
-
-
Method Details
-
of
public static LanguageTaskDefaults of(String grammar, String parserClassName, String lexerClassName, String startRule, List<String> includes) Creates language defaults with XML output and compact S-expression rendering defaults. -
of
public static LanguageTaskDefaults of(String grammar, String parserClassName, String lexerClassName, String startRule, List<String> includes, String targetExtension, String sexprFormat) Creates language defaults with explicit output extension and S-expression format. -
applyTo
Applies defaults to a language-specific XmlAst task. -
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). -
grammar
Returns the value of thegrammarrecord component.- Returns:
- the value of the
grammarrecord component
-
parserClassName
Returns the value of theparserClassNamerecord component.- Returns:
- the value of the
parserClassNamerecord component
-
lexerClassName
Returns the value of thelexerClassNamerecord component.- Returns:
- the value of the
lexerClassNamerecord component
-
startRule
Returns the value of thestartRulerecord component.- Returns:
- the value of the
startRulerecord component
-
includes
Returns the value of theincludesrecord component.- Returns:
- the value of the
includesrecord component
-
targetExtension
Returns the value of thetargetExtensionrecord component.- Returns:
- the value of the
targetExtensionrecord component
-
sexprFormat
Returns the value of thesexprFormatrecord component.- Returns:
- the value of the
sexprFormatrecord component
-