Record Class LockIdentityDescriptor
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase5.lockanalysis.LockIdentityDescriptor
- Record Components:
stableId- wire-form identifier — derived from origin (field FQN, allocation sitefile:line:col, parameter or capture name). Used as the foreign-key value in other records and as the JSON projection for MCP/IDE consumers.origin- where the identity originates — seeIdentityOrigin.originSymbol- theISymbolthat owns the identity (field symbol, allocation-site call symbol, parameter symbol, or capture symbol). Navigation target for "jump to where the lock lives."originLocation- source token for the origin — file/line/col for IDE navigation whenoriginSymboldoesn't carry the precise position.displayName- human-readable rendering, e.g."Repository.cache","MutexLock at Foo.ek9:42:8".
public record LockIdentityDescriptor(String stableId, IdentityOrigin origin, ISymbol originSymbol, IToken originLocation, String displayName)
extends Record
Catalogue entry for a single lock identity tracked by the slice-2 deadlock analysis.
A lock identity is the static notion of "which physical MutexLock object" a reference
points to. Each distinct identity gets exactly one descriptor in
LockAnalysis.identitiesById(). References that statically refer to the same
lock (a field on the same instance, an alias chain rooted at one allocation site)
share a descriptor.
-
Constructor Summary
ConstructorsConstructorDescriptionLockIdentityDescriptor(String stableId, IdentityOrigin origin, ISymbol originSymbol, IToken originLocation, String displayName) Creates an instance of aLockIdentityDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.origin()Returns the value of theoriginrecord component.Returns the value of theoriginLocationrecord component.Returns the value of theoriginSymbolrecord component.stableId()Returns the value of thestableIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LockIdentityDescriptor
public LockIdentityDescriptor(String stableId, IdentityOrigin origin, ISymbol originSymbol, IToken originLocation, String displayName) Creates an instance of aLockIdentityDescriptorrecord class.- Parameters:
stableId- the value for thestableIdrecord componentorigin- the value for theoriginrecord componentoriginSymbol- the value for theoriginSymbolrecord componentoriginLocation- the value for theoriginLocationrecord componentdisplayName- the value for thedisplayNamerecord component
-
-
Method Details
-
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). -
stableId
-
origin
-
originSymbol
Returns the value of theoriginSymbolrecord component.- Returns:
- the value of the
originSymbolrecord component
-
originLocation
Returns the value of theoriginLocationrecord component.- Returns:
- the value of the
originLocationrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-