SignalReplayMatch
final class SignalReplayMatch
Package: dev.joid.internal.signal.replay · Module: core · Source: SignalReplayMatch.java
Result of matching one slice of bytecode against the value a setter received and the signals read before it.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
SignalReplayMatch | of(SignalReplaySlice slice, SignalReplayRun run, Map<String,String> holeMap, boolean[] consumed, boolean followed) factory | Returns the match of slice found by run, with the text of the local variables in holeMap, the reads it used in consumed, and followed when the reads only matched together with those of the arguments that the call evaluates after this one. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
List<Signal<?>> | getReadList(List<Signal<?>> readList) | Returns the reads of readList that the expression used. |
SignalReplaySlice | getSlice() | Returns the matched slice. |
Object | getSelf() | Returns the object that the bytecode calls this, or null in a static method. |
boolean | isDefinitions() | If true, the match runs the definitions of the local variables again. |
Map<String,String> | getHoleMap() | Returns the text deduced for each local variable that a concatenation uses. |
Map<Object,Signal<?>> | getPositionalMap() | Returns the signals matched by their position in the reads. |
boolean[] | getConsumed() | Returns, for each read, whether the expression used it. |
boolean | isFollowed() | If true, the match needed the reads of the arguments evaluated after the slice; the replay keeps it only when no other match does without them. |
Creation details
Section titled “Creation details”SignalReplayMatch of(SignalReplaySlice slice, SignalReplayRun run, Map<String,String> holeMap, boolean[] consumed, boolean followed) factory
Returns the match of slice found by run, with the text of the local variables in holeMap, the reads it used in consumed, and followed when the reads only matched together with those of the arguments that the call evaluates after this one.
Method details
Section titled “Method details”getReadList
Section titled “getReadList”List<Signal<?>> getReadList(List<Signal<?>> readList)
Returns the reads of readList that the expression used.
getSlice
Section titled “getSlice”SignalReplaySlice getSlice()
Returns the matched slice.
getSelf
Section titled “getSelf”Object getSelf()
Returns the object that the bytecode calls this, or null in a static method.
isDefinitions
Section titled “isDefinitions”boolean isDefinitions()
If true, the match runs the definitions of the local variables again.
getHoleMap
Section titled “getHoleMap”Map<String,String> getHoleMap()
Returns the text deduced for each local variable that a concatenation uses.
getPositionalMap
Section titled “getPositionalMap”Map<Object,Signal<?>> getPositionalMap()
Returns the signals matched by their position in the reads.
getConsumed
Section titled “getConsumed”boolean[] getConsumed()
Returns, for each read, whether the expression used it.
isFollowed
Section titled “isFollowed”boolean isFollowed()
If true, the match needed the reads of the arguments evaluated after the slice; the replay keeps it only when no other match does without them.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
