|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectweb.asm.MethodAdapter
org.jpox.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 (jdoFlags != 0 && jdoStateManager != null)
jdoStateManager.setStringField(this, 2, jdoGetZZZ(), zzz);
else
{
jdoSetXXX(zzz);
if (jdoIsDetached() == true)
((BitSet) jdoDetachedState[3]).set(2);
}
}
and when not detachable
void setZZZ(YYY zzz)
{
if (jdoFlags > 0 && jdoStateManager != null)
jdoStateManager.setObjectField(this, 2, jdoGetZZZ(), zzz);
jdoSetXXX(zzz);
}
There are other variants for MEDIATE_WRITE and NORMAL_WRITE
| Field Summary | |
|---|---|
protected ASMClassEnhancer |
enhancer
The enhancer for this class. |
protected org.objectweb.asm.MethodVisitor |
jdoVisitor
Visitor for the jdoSetXXX method. |
protected static org.jpox.util.Localiser |
LOCALISER
Localisation of messages. |
protected java.lang.String |
methodDescriptor
Descriptor for the method being adapted. |
protected java.lang.String |
methodName
Name for the method being adapted. |
protected org.jpox.metadata.AbstractMemberMetaData |
mmd
MetaData for the property. |
| Fields inherited from class org.objectweb.asm.MethodAdapter |
|---|
mv |
| Constructor Summary | |
|---|---|
JdoPropertySetterAdapter(org.objectweb.asm.MethodVisitor mv,
ASMClassEnhancer enhancer,
java.lang.String methodName,
java.lang.String methodDesc,
org.jpox.metadata.AbstractMemberMetaData mmd,
org.objectweb.asm.ClassVisitor cv)
Constructor for the method adapter. |
|
| Method Summary | |
|---|---|
static void |
generateSetXXXMethod(org.objectweb.asm.MethodVisitor mv,
org.jpox.metadata.AbstractMemberMetaData mmd,
java.lang.String asmClassName,
java.lang.String asmClassDesc)
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(java.lang.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,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3)
|
void |
visitFrame(int arg0,
int arg1,
java.lang.Object[] arg2,
int arg3,
java.lang.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(java.lang.Object arg0)
|
void |
visitLineNumber(int arg0,
org.objectweb.asm.Label arg1)
|
void |
visitLocalVariable(java.lang.String arg0,
java.lang.String arg1,
java.lang.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,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3)
|
void |
visitMultiANewArrayInsn(java.lang.String arg0,
int arg1)
|
org.objectweb.asm.AnnotationVisitor |
visitParameterAnnotation(int arg0,
java.lang.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,
java.lang.String arg3)
|
void |
visitTypeInsn(int arg0,
java.lang.String arg1)
|
void |
visitVarInsn(int arg0,
int arg1)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.jpox.util.Localiser LOCALISER
protected ASMClassEnhancer enhancer
protected java.lang.String methodName
protected java.lang.String methodDescriptor
protected org.jpox.metadata.AbstractMemberMetaData mmd
protected org.objectweb.asm.MethodVisitor jdoVisitor
| Constructor Detail |
|---|
public JdoPropertySetterAdapter(org.objectweb.asm.MethodVisitor mv,
ASMClassEnhancer enhancer,
java.lang.String methodName,
java.lang.String methodDesc,
org.jpox.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 interface org.objectweb.asm.MethodVisitorvisitEnd in class org.objectweb.asm.MethodAdapter
public static void generateSetXXXMethod(org.objectweb.asm.MethodVisitor mv,
org.jpox.metadata.AbstractMemberMetaData mmd,
java.lang.String asmClassName,
java.lang.String asmClassDesc)
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(java.lang.String arg0,
boolean arg1)
visitAnnotation in interface org.objectweb.asm.MethodVisitorvisitAnnotation in class org.objectweb.asm.MethodAdapterpublic org.objectweb.asm.AnnotationVisitor visitAnnotationDefault()
visitAnnotationDefault in interface org.objectweb.asm.MethodVisitorvisitAnnotationDefault in class org.objectweb.asm.MethodAdapterpublic void visitAttribute(org.objectweb.asm.Attribute arg0)
visitAttribute in interface org.objectweb.asm.MethodVisitorvisitAttribute in class org.objectweb.asm.MethodAdapterpublic void visitCode()
visitCode in interface org.objectweb.asm.MethodVisitorvisitCode in class org.objectweb.asm.MethodAdapter
public void visitFieldInsn(int arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3)
visitFieldInsn in interface org.objectweb.asm.MethodVisitorvisitFieldInsn in class org.objectweb.asm.MethodAdapter
public void visitFrame(int arg0,
int arg1,
java.lang.Object[] arg2,
int arg3,
java.lang.Object[] arg4)
visitFrame in interface org.objectweb.asm.MethodVisitorvisitFrame in class org.objectweb.asm.MethodAdapter
public void visitIincInsn(int arg0,
int arg1)
visitIincInsn in interface org.objectweb.asm.MethodVisitorvisitIincInsn in class org.objectweb.asm.MethodAdapterpublic void visitInsn(int arg0)
visitInsn in interface org.objectweb.asm.MethodVisitorvisitInsn in class org.objectweb.asm.MethodAdapter
public void visitIntInsn(int arg0,
int arg1)
visitIntInsn in interface org.objectweb.asm.MethodVisitorvisitIntInsn in class org.objectweb.asm.MethodAdapter
public void visitJumpInsn(int arg0,
org.objectweb.asm.Label arg1)
visitJumpInsn in interface org.objectweb.asm.MethodVisitorvisitJumpInsn in class org.objectweb.asm.MethodAdapterpublic void visitLabel(org.objectweb.asm.Label arg0)
visitLabel in interface org.objectweb.asm.MethodVisitorvisitLabel in class org.objectweb.asm.MethodAdapterpublic void visitLdcInsn(java.lang.Object arg0)
visitLdcInsn in interface org.objectweb.asm.MethodVisitorvisitLdcInsn in class org.objectweb.asm.MethodAdapter
public void visitLineNumber(int arg0,
org.objectweb.asm.Label arg1)
visitLineNumber in interface org.objectweb.asm.MethodVisitorvisitLineNumber in class org.objectweb.asm.MethodAdapter
public void visitLocalVariable(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
org.objectweb.asm.Label arg3,
org.objectweb.asm.Label arg4,
int arg5)
visitLocalVariable in interface org.objectweb.asm.MethodVisitorvisitLocalVariable in class org.objectweb.asm.MethodAdapter
public void visitLookupSwitchInsn(org.objectweb.asm.Label arg0,
int[] arg1,
org.objectweb.asm.Label[] arg2)
visitLookupSwitchInsn in interface org.objectweb.asm.MethodVisitorvisitLookupSwitchInsn in class org.objectweb.asm.MethodAdapter
public void visitMaxs(int arg0,
int arg1)
visitMaxs in interface org.objectweb.asm.MethodVisitorvisitMaxs in class org.objectweb.asm.MethodAdapter
public void visitMethodInsn(int arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3)
visitMethodInsn in interface org.objectweb.asm.MethodVisitorvisitMethodInsn in class org.objectweb.asm.MethodAdapter
public void visitMultiANewArrayInsn(java.lang.String arg0,
int arg1)
visitMultiANewArrayInsn in interface org.objectweb.asm.MethodVisitorvisitMultiANewArrayInsn in class org.objectweb.asm.MethodAdapter
public org.objectweb.asm.AnnotationVisitor visitParameterAnnotation(int arg0,
java.lang.String arg1,
boolean arg2)
visitParameterAnnotation in interface org.objectweb.asm.MethodVisitorvisitParameterAnnotation in class org.objectweb.asm.MethodAdapter
public void visitTableSwitchInsn(int arg0,
int arg1,
org.objectweb.asm.Label arg2,
org.objectweb.asm.Label[] arg3)
visitTableSwitchInsn in interface org.objectweb.asm.MethodVisitorvisitTableSwitchInsn in class org.objectweb.asm.MethodAdapter
public void visitTryCatchBlock(org.objectweb.asm.Label arg0,
org.objectweb.asm.Label arg1,
org.objectweb.asm.Label arg2,
java.lang.String arg3)
visitTryCatchBlock in interface org.objectweb.asm.MethodVisitorvisitTryCatchBlock in class org.objectweb.asm.MethodAdapter
public void visitTypeInsn(int arg0,
java.lang.String arg1)
visitTypeInsn in interface org.objectweb.asm.MethodVisitorvisitTypeInsn in class org.objectweb.asm.MethodAdapter
public void visitVarInsn(int arg0,
int arg1)
visitVarInsn in interface org.objectweb.asm.MethodVisitorvisitVarInsn in class org.objectweb.asm.MethodAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||