SignalReplayMethod
final class SignalReplayMethod
Package: dev.joid.internal.signal.replay · Module: core · Source: SignalReplayMethod.java
Analysis of one method of the bytecode: frames, instructions, local variables and the expressions that define them.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
SignalReplayMethod | of(SignalReplayClass replayClass, MethodNode method) factory | Analyses method of replayClass; throws the AnalyzerException of ASM when the bytecode is invalid. |
Methods
Section titled “Methods”Queries
Section titled “Queries”| Returns | Signature | Summary |
|---|---|---|
boolean | isSignal(String owner) | If true, the class owner is a Signal. |
boolean | isParameter(int variable) | If true, the local variable variable is a parameter of the method. |
boolean | isStatic() | If true, the method is static and has no this. |
MethodNode | getMethod() | Returns the method of the bytecode. |
Frame<SourceValue>[] | getFrames() | Returns the stack frames before each instruction. |
AbstractInsnNode[] | getInstructions() | Returns the instructions in their order. |
Map<AbstractInsnNode,SignalReplaySlice> | getDefinitionMap() | Returns, for each store of a local variable, the slice that computes the stored value. |
Actions
Section titled “Actions”| Returns | Signature | Summary |
|---|---|---|
int | indexOf(AbstractInsnNode instruction) | Returns the position of instruction in the method. |
String | localName(int variable, int index) | Returns the name of the local variable variable at the instruction index, or null without debug information. |
String | describeLocal(int variable, int index) | Returns how a warning names the local variable: this, the local variable name or a local variable. |
String | signalName(int index) | Returns the name of the field, variable or method that gives the signal read by the instruction index, or null. |
Object | member(AbstractInsnNode instruction) | Returns the field or method that instruction names, resolved once with the ISignalReplayBridge. |
Class<?> | type(Type type) | Returns the class of type, loaded through the class loader of the class and mapped by the ISignalReplayBridge. |
int | expressionStart(Collection | Returns the position of the first instruction of the expression whose values come from sourceList and which ends at end. |
Creation details
Section titled “Creation details”SignalReplayMethod of(SignalReplayClass replayClass, MethodNode method) factory
Analyses method of replayClass; throws the AnalyzerException of ASM when the bytecode is invalid.
Method details
Section titled “Method details”isSignal
Section titled “isSignal”boolean isSignal(String owner)
If true, the class owner is a Signal.
isParameter
Section titled “isParameter”boolean isParameter(int variable)
If true, the local variable variable is a parameter of the method.
isStatic
Section titled “isStatic”boolean isStatic()
If true, the method is static and has no this.
getMethod
Section titled “getMethod”MethodNode getMethod()
Returns the method of the bytecode.
getFrames
Section titled “getFrames”Frame<SourceValue>[] getFrames()
Returns the stack frames before each instruction.
getInstructions
Section titled “getInstructions”AbstractInsnNode[] getInstructions()
Returns the instructions in their order.
getDefinitionMap
Section titled “getDefinitionMap”Map<AbstractInsnNode,SignalReplaySlice> getDefinitionMap()
Returns, for each store of a local variable, the slice that computes the stored value.
indexOf
Section titled “indexOf”int indexOf(AbstractInsnNode instruction)
Returns the position of instruction in the method.
localName
Section titled “localName”String localName(int variable, int index)
Returns the name of the local variable variable at the instruction index, or null without debug information.
describeLocal
Section titled “describeLocal”String describeLocal(int variable, int index)
Returns how a warning names the local variable: this, the local variable name or a local variable.
signalName
Section titled “signalName”String signalName(int index)
Returns the name of the field, variable or method that gives the signal read by the instruction index, or null.
member
Section titled “member”Object member(AbstractInsnNode instruction)
Returns the field or method that instruction names, resolved once with the ISignalReplayBridge.
Class<?> type(Type type)
Returns the class of type, loaded through the class loader of the class and mapped by the ISignalReplayBridge.
expressionStart
Section titled “expressionStart”int expressionStart(Collection<AbstractInsnNode> sourceList, int end)
Returns the position of the first instruction of the expression whose values come from sourceList and which ends at end.
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
