Package org.ek9lang.compiler.directives
Record Class DirectiveSpec
java.lang.Object
java.lang.Record
org.ek9lang.compiler.directives.DirectiveSpec
public record DirectiveSpec(IToken token, CompilationPhase phase, ISymbol.SymbolCategory symbolCategory, String symbolName, String additionalName, int lineNumber)
extends Record
Specification of a directive, all the common details used in a range of directives.
-
Constructor Summary
ConstructorDescriptionDirectiveSpec
(IToken token, CompilationPhase phase, ISymbol.SymbolCategory symbolCategory, String symbolName, String additionalName, int lineNumber) Creates an instance of aDirectiveSpec
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadditionalName
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of thelineNumber
record component.phase()
Returns the value of thephase
record component.Returns the value of thesymbolCategory
record component.Returns the value of thesymbolName
record component.token()
Returns the value of thetoken
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
DirectiveSpec
public DirectiveSpec(IToken token, CompilationPhase phase, ISymbol.SymbolCategory symbolCategory, String symbolName, String additionalName, int lineNumber) Creates an instance of aDirectiveSpec
record class.- Parameters:
token
- the value for thetoken
record componentphase
- the value for thephase
record componentsymbolCategory
- the value for thesymbolCategory
record componentsymbolName
- the value for thesymbolName
record componentadditionalName
- the value for theadditionalName
record componentlineNumber
- the value for thelineNumber
record component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
token
Returns the value of thetoken
record component.- Returns:
- the value of the
token
record component
-
phase
Returns the value of thephase
record component.- Returns:
- the value of the
phase
record component
-
symbolCategory
Returns the value of thesymbolCategory
record component.- Returns:
- the value of the
symbolCategory
record component
-
symbolName
Returns the value of thesymbolName
record component.- Returns:
- the value of the
symbolName
record component
-
additionalName
Returns the value of theadditionalName
record component.- Returns:
- the value of the
additionalName
record component
-
lineNumber
public int lineNumber()Returns the value of thelineNumber
record component.- Returns:
- the value of the
lineNumber
record component
-