OwnerNameAnalyzerAdapter

class OwnerNameAnalyzerAdapter : MethodVisitor

ASM method visitor adapter that tracks owner names (access paths) for values on the operand stack and in local variables during bytecode analysis.

This adapter simulates JVM execution to maintain detailed ownership chains for:

  • local variable accesses;

  • field accesses (static and instance);

  • array operations (element access and length);

  • stack manipulations.

The owner names are used by Lincheck to assign meaningful names to receiver objects on field and method accesses.

The implementation is based on org.objectweb.asm.commons.AnalyzerAdapter.

Parameters

owner

the owner class name being analyzed.

access

method access flags (see Opcodes).

name

method name.

descriptor

method signature descriptor (see Type).

methodVisitor

optional delegate method visitor.

methodVariables

provides active variable information.

See also

AnalyzerAdapter

Constructors

Link copied to clipboard
constructor(owner: String?, access: Int, name: String?, descriptor: String, methodVisitor: MethodVisitor?, methodVariables: MethodVariables)

Constructs a new OwnerNameAnalyzerAdapter. Subclasses must not use this constructor. Instead, they must use the .AnalyzerAdapter version.

Properties

Link copied to clipboard
var locals: MutableList<<Error class: unknown class>?>?

Tracks OwnerName-s for objects stored in local variables.

Link copied to clipboard
Link copied to clipboard
var stack: MutableList<<Error class: unknown class>?>?

Tracks OwnerName-s for objects stored on the stack.

Functions

Link copied to clipboard
open fun getDelegate(): MethodVisitor
Link copied to clipboard
Link copied to clipboard
open fun visitAnnotation(p0: String, p1: Boolean): AnnotationVisitor
Link copied to clipboard
open fun visitAnnotationDefault(): AnnotationVisitor
Link copied to clipboard
open fun visitAttribute(p0: Attribute)
Link copied to clipboard
open fun visitCode()
Link copied to clipboard
open fun visitEnd()
Link copied to clipboard
open override fun visitFieldInsn(opcode: Int, owner: String?, name: String?, descriptor: String)
Link copied to clipboard
open override fun visitFrame(type: Int, numLocal: Int, local: Array<Any?>, numStack: Int, stack: Array<Any?>)
Link copied to clipboard
open override fun visitIincInsn(varIndex: Int, increment: Int)
Link copied to clipboard
open override fun visitInsn(opcode: Int)
Link copied to clipboard
open fun visitInsnAnnotation(p0: Int, p1: TypePath, p2: String, p3: Boolean): AnnotationVisitor
Link copied to clipboard
open override fun visitIntInsn(opcode: Int, operand: Int)
Link copied to clipboard
open override fun visitInvokeDynamicInsn(name: String?, descriptor: String, bootstrapMethodHandle: Handle?, vararg bootstrapMethodArguments: Any?)
Link copied to clipboard
open override fun visitJumpInsn(opcode: Int, label: Label?)
Link copied to clipboard
open override fun visitLabel(label: Label?)
Link copied to clipboard
open override fun visitLdcInsn(value: Any?)
Link copied to clipboard
open fun visitLineNumber(p0: Int, p1: Label)
Link copied to clipboard
open override fun visitLocalVariable(name: String?, descriptor: String, signature: String?, start: Label?, end: Label?, index: Int)
Link copied to clipboard
open fun visitLocalVariableAnnotation(p0: Int, p1: TypePath, p2: Array<Label>, p3: Array<Label>, p4: IntArray, p5: String, p6: Boolean): AnnotationVisitor
Link copied to clipboard
open override fun visitLookupSwitchInsn(dflt: Label?, keys: IntArray?, labels: Array<Label?>?)
Link copied to clipboard
open override fun visitMaxs(maxStack: Int, maxLocals: Int)
Link copied to clipboard
open override fun visitMethodInsn(opcodeAndSource: Int, owner: String?, name: String, descriptor: String, isInterface: Boolean)
open fun visitMethodInsn(p0: Int, p1: String, p2: String, p3: String)
Link copied to clipboard
open override fun visitMultiANewArrayInsn(descriptor: String, numDimensions: Int)
Link copied to clipboard
open fun visitParameter(p0: String, p1: Int)
Link copied to clipboard
open fun visitParameterAnnotation(p0: Int, p1: String, p2: Boolean): AnnotationVisitor
Link copied to clipboard
open override fun visitTableSwitchInsn(min: Int, max: Int, dflt: Label?, vararg labels: Label?)
Link copied to clipboard
open fun visitTryCatchAnnotation(p0: Int, p1: TypePath, p2: String, p3: Boolean): AnnotationVisitor
Link copied to clipboard
open fun visitTryCatchBlock(p0: Label, p1: Label, p2: Label, p3: String)
Link copied to clipboard
open fun visitTypeAnnotation(p0: Int, p1: TypePath, p2: String, p3: Boolean): AnnotationVisitor
Link copied to clipboard
open override fun visitTypeInsn(opcode: Int, type: String)
Link copied to clipboard
open override fun visitVarInsn(opcode: Int, varIndex: Int)