Record Class Symbols.Reference
java.lang.Object
java.lang.Record
org.clafer.frontend.Symbols.Reference
- Record Components:
span- the target as written, or the constant of-> 1isSet- whether it is->, rather than->>target- the target as written; for-> 1, the constantclafer- the clafer it refers to, if its type is a claferprimitive- the primitive it refers to, as written (integerorint), if its type is a primitive
- Enclosing class:
Symbols
public static record Symbols.Reference(SourceSpan span, boolean isSet, Syntax.Exp target, Optional<Symbols.ClaferSymbol> clafer, Optional<String> primitive)
extends Record
The reference of a clafer.
-
Constructor Summary
ConstructorsConstructorDescriptionReference(SourceSpan span, boolean isSet, Syntax.Exp target, Optional<Symbols.ClaferSymbol> clafer, Optional<String> primitive) Creates an instance of aReferencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionclafer()Returns the value of theclaferrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhasType()booleanisSet()Returns the value of theisSetrecord component.Returns the value of theprimitiverecord component.span()Returns the value of thespanrecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.typeName()
-
Constructor Details
-
Reference
public Reference(SourceSpan span, boolean isSet, Syntax.Exp target, Optional<Symbols.ClaferSymbol> clafer, Optional<String> primitive) Creates an instance of aReferencerecord class.
-
-
Method Details
-
hasType
- Returns:
- whether the reference has one type, a clafer or a primitive; a union of unrelated clafers has none
-
typeName
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
span
-
isSet
-
target
-
clafer
-
primitive
-