|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectweb.asm.MethodVisitor
org.datanucleus.enhancer.asm.JdoPropertySetterAdapter
public class JdoPropertySetterAdapter
Adapter for property setter methods in JDO-enabled classes. This adapter processes the setXXX method and
void setZZZ(YYY zzz)
{
if (aaaFlags != 0 && aaaStateManager != null)
aaaStateManager.setStringField(this, 2, aaaGetZZZ(), zzz);
else
{
aaaSetXXX(zzz);
if (aaaIsDetached() == true)
((BitSet) aaaDetachedState[3]).set(2);
}
}
and when not detachable
void setZZZ(YYY zzz)
{
if (aFlags > 0 && aaaStateManager != null)
aaaStateManager.setObjectField(this, 2, aaaGetZZZ(), zzz);
aaaSetXXX(zzz);
}
There are other variants for MEDIATE_WRITE and NORMAL_WRITE
| Field Summary | |
|---|---|
protected ASMClassEnhancer |
enhancer
The enhancer for this class. |
protected static org.datanucleus.util.Localiser |
LOCALISER
Localisation of messages. |
protected String |
methodDescriptor
Descriptor for the method being adapted. |
protected String |
methodName
Name for the method being adapted. |
protected org.datanucleus.metadata.AbstractMemberMetaData |
mmd
MetaData for the property. |
protected org.objectweb.asm.MethodVisitor |
visitor
Visitor for the aaaSetXXX method. |
| Fields inherited from class org.objectweb.asm.MethodVisitor |
|---|
api, mv |
| Constructor Summary | |
|---|---|
JdoPropertySetterAdapter(org.objectweb.asm.MethodVisitor mv,
ASMClassEnhancer enhancer,
String methodName,
String methodDesc,
org.datanucleus.metadata.AbstractMemberMetaData mmd,
org.objectweb.asm.ClassVisitor cv)
Constructor for the method adapter. |
|
| Method Summary | |
|---|---|
static void |
generateSetXXXMethod(org.objectweb.asm.MethodVisitor mv,
org.datanucleus.metadata.AbstractMemberMetaData mmd,
String asmClassName,
String asmClassDesc,
boolean includeFrames)
Convenience method to use the MethodVisitor to generate the code for the method setXXX() for the property with the specified MetaData. |
org.objectweb.asm.AnnotationVisitor |
visitAnnotation(String arg0,
boolean arg1)
|
org.objectweb.asm.AnnotationVisitor |
visitAnnotationDefault()
|
void |
visitAttribute(org.objectweb.asm.Attribute arg0)
|
void |
visitCode()
|
void |
visitEnd()
Method called at the end of visiting the setXXX method. |
void |
visitFieldInsn(int arg0,
String arg1,
String arg2,
String arg3)
|
void |
visitFrame(int arg0,
int arg1,
Object[] arg2,
int arg3,
Object[] arg4)
|
void |
visitIincInsn(int arg0,
int arg1)
|
void |
visitInsn(int arg0)
|
void |
visitIntInsn(int arg0,
int arg1)
|
void |
visitJumpInsn(int arg0,
org.objectweb.asm.Label arg1)
|
void |
visitLabel(org.objectweb.asm.Label arg0)
|
void |
visitLdcInsn(Object arg0)
|
void |
visitLineNumber(int arg0,
org.objectweb.asm.Label arg1)
|
void |
visitLocalVariable(String arg0,
String arg1,
String arg2,
org.objectweb.asm.Label arg3,
org.objectweb.asm.Label arg4,
int arg5)
|
void |
visitLookupSwitchInsn(org.objectweb.asm.Label arg0,
int[] arg1,
org.objectweb.asm.Label[] arg2)
|
void |
visitMaxs(int arg0,
int arg1)
|
void |
visitMethodInsn(int arg0,
String arg1,
String arg2,
String arg3)
|
void |
visitMultiANewArrayInsn(String arg0,
int arg1)
|
org.objectweb.asm.AnnotationVisitor |
visitParameterAnnotation(int arg0,
String arg1,
boolean arg2)
|
void |
visitTableSwitchInsn(int arg0,
int arg1,
org.objectweb.asm.Label arg2,
org.objectweb.asm.Label... arg3)
|
void |
visitTryCatchBlock(org.objectweb.asm.Label arg0,
org.objectweb.asm.Label arg1,
org.objectweb.asm.Label arg2,
String arg3)
|
void |
visitTypeInsn(int arg0,
String arg1)
|
void |
visitVarInsn(int arg0,
int arg1)
|
| Methods inherited from class org.objectweb.asm.MethodVisitor |
|---|
visitInvokeDynamicInsn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.datanucleus.util.Localiser LOCALISER
protected ASMClassEnhancer enhancer
protected String methodName
protected String methodDescriptor
protected org.datanucleus.metadata.AbstractMemberMetaData mmd
protected org.objectweb.asm.MethodVisitor visitor
| Constructor Detail |
|---|
public JdoPropertySetterAdapter(org.objectweb.asm.MethodVisitor mv,
ASMClassEnhancer enhancer,
String methodName,
String methodDesc,
org.datanucleus.metadata.AbstractMemberMetaData mmd,
org.objectweb.asm.ClassVisitor cv)
mv - MethodVisitorenhancer - ClassEnhancer for the class with the methodmethodName - Name of the methodmethodDesc - Method descriptormmd - MetaData for the propertycv - ClassVisitor| Method Detail |
|---|
public void visitEnd()
visitEnd in class org.objectweb.asm.MethodVisitor
public static void generateSetXXXMethod(org.objectweb.asm.MethodVisitor mv,
org.datanucleus.metadata.AbstractMemberMetaData mmd,
String asmClassName,
String asmClassDesc,
boolean includeFrames)
mv - MethodVisitormmd - MetaData for the propertyasmClassName - ASM class name for the owning classasmClassDesc - ASM descriptor for the owning class
public org.objectweb.asm.AnnotationVisitor visitAnnotation(String arg0,
boolean arg1)
visitAnnotation in class org.objectweb.asm.MethodVisitorpublic org.objectweb.asm.AnnotationVisitor visitAnnotationDefault()
visitAnnotationDefault in class org.objectweb.asm.MethodVisitorpublic void visitAttribute(org.objectweb.asm.Attribute arg0)
visitAttribute in class org.objectweb.asm.MethodVisitorpublic void visitCode()
visitCode in class org.objectweb.asm.MethodVisitor
public void visitFieldInsn(int arg0,
String arg1,
String arg2,
String arg3)
visitFieldInsn in class org.objectweb.asm.MethodVisitor
public void visitFrame(int arg0,
int arg1,
Object[] arg2,
int arg3,
Object[] arg4)
visitFrame in class org.objectweb.asm.MethodVisitor
public void visitIincInsn(int arg0,
int arg1)
visitIincInsn in class org.objectweb.asm.MethodVisitorpublic void visitInsn(int arg0)
visitInsn in class org.objectweb.asm.MethodVisitor
public void visitIntInsn(int arg0,
int arg1)
visitIntInsn in class org.objectweb.asm.MethodVisitor
public void visitJumpInsn(int arg0,
org.objectweb.asm.Label arg1)
visitJumpInsn in class org.objectweb.asm.MethodVisitorpublic void visitLabel(org.objectweb.asm.Label arg0)
visitLabel in class org.objectweb.asm.MethodVisitorpublic void visitLdcInsn(Object arg0)
visitLdcInsn in class org.objectweb.asm.MethodVisitor
public void visitLineNumber(int arg0,
org.objectweb.asm.Label arg1)
visitLineNumber in class org.objectweb.asm.MethodVisitor
public void visitLocalVariable(String arg0,
String arg1,
String arg2,
org.objectweb.asm.Label arg3,
org.objectweb.asm.Label arg4,
int arg5)
visitLocalVariable in class org.objectweb.asm.MethodVisitor
public void visitLookupSwitchInsn(org.objectweb.asm.Label arg0,
int[] arg1,
org.objectweb.asm.Label[] arg2)
visitLookupSwitchInsn in class org.objectweb.asm.MethodVisitor
public void visitMaxs(int arg0,
int arg1)
visitMaxs in class org.objectweb.asm.MethodVisitor
public void visitMethodInsn(int arg0,
String arg1,
String arg2,
String arg3)
visitMethodInsn in class org.objectweb.asm.MethodVisitor
public void visitMultiANewArrayInsn(String arg0,
int arg1)
visitMultiANewArrayInsn in class org.objectweb.asm.MethodVisitor
public org.objectweb.asm.AnnotationVisitor visitParameterAnnotation(int arg0,
String arg1,
boolean arg2)
visitParameterAnnotation in class org.objectweb.asm.MethodVisitor
public void visitTableSwitchInsn(int arg0,
int arg1,
org.objectweb.asm.Label arg2,
org.objectweb.asm.Label... arg3)
visitTableSwitchInsn in class org.objectweb.asm.MethodVisitor
public void visitTryCatchBlock(org.objectweb.asm.Label arg0,
org.objectweb.asm.Label arg1,
org.objectweb.asm.Label arg2,
String arg3)
visitTryCatchBlock in class org.objectweb.asm.MethodVisitor
public void visitTypeInsn(int arg0,
String arg1)
visitTypeInsn in class org.objectweb.asm.MethodVisitor
public void visitVarInsn(int arg0,
int arg1)
visitVarInsn in class org.objectweb.asm.MethodVisitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||