org.apache.cayenne.enhancer
Class AccessorVisitor

java.lang.Object
  extended by ClassAdapter
      extended by org.apache.cayenne.enhancer.AccessorVisitor
Direct Known Subclasses:
PersistentAccessorVisitor

public abstract class AccessorVisitor
extends ClassAdapter

An enhancer that adds interceptor code to the getters and setters.

Since:
3.0

Constructor Summary
AccessorVisitor(ClassVisitor cw)
           
 
Method Summary
protected abstract  boolean isEnhancedProperty(String property)
           
protected abstract  boolean isLazyFaulted(String property)
           
static String propertyNameForGetter(String getterName)
           
static String propertyNameForSetter(String setterName)
           
 void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
           
protected  MethodVisitor visitGetter(MethodVisitor mv, String property, Type propertyType)
           
 MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
           
protected  MethodVisitor visitSetter(MethodVisitor mv, String property, Type propertyType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessorVisitor

public AccessorVisitor(ClassVisitor cw)
Method Detail

propertyNameForGetter

public static String propertyNameForGetter(String getterName)

propertyNameForSetter

public static String propertyNameForSetter(String setterName)

isEnhancedProperty

protected abstract boolean isEnhancedProperty(String property)

isLazyFaulted

protected abstract boolean isLazyFaulted(String property)

visit

public void visit(int version,
                  int access,
                  String name,
                  String signature,
                  String superName,
                  String[] interfaces)

visitGetter

protected MethodVisitor visitGetter(MethodVisitor mv,
                                    String property,
                                    Type propertyType)

visitSetter

protected MethodVisitor visitSetter(MethodVisitor mv,
                                    String property,
                                    Type propertyType)

visitMethod

public MethodVisitor visitMethod(int access,
                                 String name,
                                 String desc,
                                 String signature,
                                 String[] exceptions)


Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.