use of org.apache.xbean.asm6.MethodVisitor in project tomee by apache.
the class Cmp2Generator method createEjbStore.
public void createEjbStore() {
final MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "ejbStore", "()V", null, null);
mv.visitCode();
mv.visitInsn(RETURN);
mv.visitMaxs(0, 1);
mv.visitEnd();
}
use of org.apache.xbean.asm6.MethodVisitor in project tomee by apache.
the class Cmp2Generator method createEjbRemove.
public void createEjbRemove() {
final MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "ejbRemove", "()V", null, null);
mv.visitCode();
mv.visitInsn(RETURN);
mv.visitMaxs(0, 1);
mv.visitEnd();
}
use of org.apache.xbean.asm6.MethodVisitor in project tomee by apache.
the class Cmp2Generator method createGetter.
/**
* Generate a concrete getter field for a CMP field.
* At this point, we're just generating a simple
* accessor for the field, given the type. The
* JPA engine when it makes this implementation class
* a managed class define whatever additional logic
* might be required.
*
* @param cmpField The CMP field backing this getter method.
*/
private void createGetter(final CmpField cmpField) {
final String methodName = cmpField.getGetterMethod().getName();
final MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, methodName, "()" + cmpField.getDescriptor(), null, null);
mv.visitCode();
mv.visitVarInsn(ALOAD, 0);
mv.visitFieldInsn(GETFIELD, implClassName, cmpField.getName(), cmpField.getDescriptor());
mv.visitInsn(cmpField.getType().getOpcode(IRETURN));
mv.visitMaxs(0, 0);
mv.visitEnd();
}
use of org.apache.xbean.asm6.MethodVisitor in project tomee by apache.
the class Cmp2Generator method createSetEntityContext.
public void createSetEntityContext() {
final MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "setEntityContext", "(Ljavax/ejb/EntityContext;)V", null, null);
mv.visitCode();
mv.visitInsn(RETURN);
mv.visitMaxs(0, 2);
mv.visitEnd();
}
use of org.apache.xbean.asm6.MethodVisitor in project tomee by apache.
the class Cmp2Generator method createEjbActivate.
public void createEjbActivate() {
final MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "ejbActivate", "()V", null, null);
mv.visitCode();
mv.visitInsn(RETURN);
mv.visitMaxs(0, 1);
mv.visitEnd();
}
Aggregations