java.lang.Object
java.lang.Record
org.aya.concrete.stmt.QualifiedID
- All Implemented Interfaces:
org.aya.util.error.SourceNode
public record QualifiedID(@NotNull org.aya.util.error.SourcePos sourcePos, @NotNull ModuleName component, @NotNull String name)
extends Record
implements org.aya.util.error.SourceNode
-
Constructor Summary
ConstructorsConstructorDescriptionQualifiedID(@NotNull org.aya.util.error.SourcePos sourcePos, @NotNull String id) QualifiedID(@NotNull org.aya.util.error.SourcePos sourcePos, @NotNull kala.collection.immutable.ImmutableSeq<String> ids) QualifiedID(@NotNull org.aya.util.error.SourcePos sourcePos, @NotNull ModuleName component, @NotNull String name) Creates an instance of aQualifiedIDrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull ModuleNameReturns the value of thecomponentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull kala.collection.immutable.ImmutableSeq<String>ids()boolean@NotNull Stringjoin()static @NotNull String@NotNull Stringname()Returns the value of thenamerecord component.@NotNull org.aya.util.error.SourcePosReturns the value of thesourcePosrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
QualifiedID
public QualifiedID(@NotNull @NotNull org.aya.util.error.SourcePos sourcePos, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<String> ids) - Parameters:
ids- not empty
-
QualifiedID
public QualifiedID(@NotNull @NotNull org.aya.util.error.SourcePos sourcePos, @NotNull @NotNull String id) -
QualifiedID
public QualifiedID(@NotNull @NotNull org.aya.util.error.SourcePos sourcePos, @NotNull @NotNull ModuleName component, @NotNull @NotNull String name) Creates an instance of aQualifiedIDrecord class.- Parameters:
sourcePos- the value for thesourcePosrecord componentcomponent- the value for thecomponentrecord componentname- the value for thenamerecord component
-
-
Method Details
-
ids
-
isUnqualified
public boolean isUnqualified() -
join
-
join
-
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). -
sourcePos
@NotNull public @NotNull org.aya.util.error.SourcePos sourcePos()Returns the value of thesourcePosrecord component.- Specified by:
sourcePosin interfaceorg.aya.util.error.SourceNode- Returns:
- the value of the
sourcePosrecord component
-
component
Returns the value of thecomponentrecord component.- Returns:
- the value of the
componentrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-