Record Class RegistrationData
java.lang.Object
java.lang.Record
org.ek9lang.compiler.symbols.RegistrationData
- Record Components:
implementationSymbol- The concrete component/service symbol (from call)interfaceSymbol- The abstract component symbol (from identifierReference), null for servicesaspectSymbols- Aspect symbols from aspect declaration (empty if no aspects)sourceToken- Location of the register statement for error reporting
public record RegistrationData(ISymbol implementationSymbol, ISymbol interfaceSymbol, List<ISymbol> aspectSymbols, IToken sourceToken)
extends Record
Holds the data from a 'register' statement within an application block.
Two forms exist:
- Component registration:
register ConcreteComp() as AbstractComp - Service registration:
register ServiceType()
with aspect of clause is used.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaspectSymbolsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theimplementationSymbolrecord component.Returns the value of theinterfaceSymbolrecord component.booleanCheck if this is a component registration (has an interface mapping).booleanCheck if this is a service registration (no interface mapping).Returns the value of thesourceTokenrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RegistrationData
public RegistrationData(ISymbol implementationSymbol, ISymbol interfaceSymbol, List<ISymbol> aspectSymbols, IToken sourceToken) Creates an instance of aRegistrationDatarecord class.- Parameters:
implementationSymbol- the value for theimplementationSymbolrecord componentinterfaceSymbol- the value for theinterfaceSymbolrecord componentaspectSymbols- the value for theaspectSymbolsrecord componentsourceToken- the value for thesourceTokenrecord component
-
-
Method Details
-
isComponentRegistration
public boolean isComponentRegistration()Check if this is a component registration (has an interface mapping). -
isServiceRegistration
public boolean isServiceRegistration()Check if this is a service registration (no interface mapping). -
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). -
implementationSymbol
Returns the value of theimplementationSymbolrecord component.- Returns:
- the value of the
implementationSymbolrecord component
-
interfaceSymbol
Returns the value of theinterfaceSymbolrecord component.- Returns:
- the value of the
interfaceSymbolrecord component
-
aspectSymbols
Returns the value of theaspectSymbolsrecord component.- Returns:
- the value of the
aspectSymbolsrecord component
-
sourceToken
Returns the value of thesourceTokenrecord component.- Returns:
- the value of the
sourceTokenrecord component
-