public class ProxettaMethodBuilder extends EmptyMethodVisitor
Modifier and Type | Field and Description |
---|---|
protected java.util.List<jodd.proxetta.asm.ProxyAspectData> |
aspectList |
protected MethodVisitor |
methodVisitor |
protected MethodSignatureVisitor |
msign |
protected boolean |
proxyInfoRequested |
static java.lang.String |
TARGET_CLASS_NAME |
protected jodd.proxetta.asm.TargetMethodData |
tmd |
protected WorkData |
wd |
api, mv
Constructor and Description |
---|
ProxettaMethodBuilder(MethodSignatureVisitor msign,
WorkData wd,
java.util.List<jodd.proxetta.asm.ProxyAspectData> aspectList) |
Modifier and Type | Method and Description |
---|---|
protected void |
createFirstChainDelegate_Continue(jodd.proxetta.asm.TargetMethodData tmd)
Continues the creation of the very first method in calling chain that simply delegates invocation to the first proxy method.
|
protected void |
createFirstChainDelegate_Start()
Starts creation of first chain delegate.
|
void |
createProxyMethod(jodd.proxetta.asm.TargetMethodData td)
Creates proxy methods over target method, For each matched proxy, new proxy method is created
by taking advice bytecode and replaces usages of
ProxyTarget . |
AnnotationVisitor |
visitAnnotation(java.lang.String desc,
boolean visible)
Copies target method annotations.
|
AnnotationVisitor |
visitAnnotationDefault()
Visits the default value of this annotation interface method.
|
void |
visitEnd()
Finally, builds proxy methods if applied to current method.
|
AnnotationVisitor |
visitParameterAnnotation(int parameter,
java.lang.String desc,
boolean visible)
Visits an annotation of a parameter this method.
|
visitAnnotableParameterCount, visitAttribute, visitCode, visitFieldInsn, visitFrame, visitIincInsn, visitInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitLookupSwitchInsn, visitMaxs, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitTableSwitchInsn, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation, visitTypeInsn, visitVarInsn
public static final java.lang.String TARGET_CLASS_NAME
protected final MethodSignatureVisitor msign
protected final WorkData wd
protected final java.util.List<jodd.proxetta.asm.ProxyAspectData> aspectList
protected jodd.proxetta.asm.TargetMethodData tmd
protected MethodVisitor methodVisitor
protected boolean proxyInfoRequested
public ProxettaMethodBuilder(MethodSignatureVisitor msign, WorkData wd, java.util.List<jodd.proxetta.asm.ProxyAspectData> aspectList)
public AnnotationVisitor visitAnnotation(java.lang.String desc, boolean visible)
visitAnnotation
in class MethodVisitor
desc
- the class descriptor of the annotation class.visible
- true if the annotation is visible at runtime.public AnnotationVisitor visitAnnotationDefault()
MethodVisitor
visitAnnotationDefault
in class MethodVisitor
public AnnotationVisitor visitParameterAnnotation(int parameter, java.lang.String desc, boolean visible)
MethodVisitor
visitParameterAnnotation
in class MethodVisitor
parameter
- the parameter index. This index must be strictly smaller than the number of
parameters in the method descriptor, and strictly smaller than the parameter count
specified in MethodVisitor.visitAnnotableParameterCount(int, boolean)
. Important note: a parameter index i
is not required to correspond to the i'th parameter descriptor in the method
descriptor, in particular in case of synthetic parameters (see
https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.18).desc
- the class descriptor of the annotation class.visible
- true if the annotation is visible at runtime.public void visitEnd()
visitEnd
in class MethodVisitor
protected void createFirstChainDelegate_Start()
protected void createFirstChainDelegate_Continue(jodd.proxetta.asm.TargetMethodData tmd)
public void createProxyMethod(jodd.proxetta.asm.TargetMethodData td)
ProxyTarget
.
Invocation chain example: name -> name$p0 -> name$p1 -> name$p4 -> super
.
Copyright © 2003-present Jodd Team