1 8 package org.codehaus.aspectwerkz.transform.inlining.spi; 9 10 import org.codehaus.aspectwerkz.reflect.ClassInfo; 11 import org.codehaus.aspectwerkz.definition.AspectDefinition; 12 import org.codehaus.aspectwerkz.transform.inlining.AdviceMethodInfo; 13 import org.codehaus.aspectwerkz.transform.inlining.AspectInfo; 14 import org.objectweb.asm.CodeVisitor; 15 import org.objectweb.asm.ClassWriter; 16 17 22 public interface AspectModel { 23 29 String getAspectModelType(); 30 31 38 void defineAspect(ClassInfo aspectClassInfo, AspectDefinition aspectDef, ClassLoader loader); 39 40 45 AroundClosureClassInfo getAroundClosureClassInfo(); 46 47 53 void createMandatoryMethods(ClassWriter cw, String className); 54 55 64 void createInvocationOfAroundClosureSuperClass(CodeVisitor cv); 65 66 73 void createAspectReferenceField(ClassWriter cw, AspectInfo aspectInfo, String joinPointClassName); 74 75 82 void createAspectInstantiation(CodeVisitor cv, AspectInfo aspectInfo, String joinPointClassName); 83 84 90 void createAroundAdviceArgumentHandling(CodeVisitor cv, AdviceMethodInfo adviceMethodInfo); 91 92 98 void createBeforeAdviceArgumentHandling(CodeVisitor cv, AdviceMethodInfo adviceMethodInfo); 99 100 106 void createAfterAdviceArgumentHandling(CodeVisitor cv, AdviceMethodInfo adviceMethodInfo); 107 108 114 boolean requiresReflectiveInfo(); 115 116 121 public static class AroundClosureClassInfo { 122 private final String m_superClassName; 123 private final String [] m_interfaceNames; 124 public AroundClosureClassInfo(final String superClassName, final String [] interfaceNames) { 125 m_superClassName = superClassName; 126 m_interfaceNames = interfaceNames; 127 } 128 129 public String getSuperClassName() { 130 return m_superClassName; 131 } 132 133 public String [] getInterfaceNames() { 134 return m_interfaceNames; 135 } 136 137 140 public static class Type { 141 public static final Type INTERFACE = new Type("INTERFACE"); 142 public static final Type CLASS = new Type("CLASS"); 143 private final String m_name; 144 private Type(String name) { 145 m_name = name; 146 } 147 public String toString() { 148 return m_name; 149 } 150 } 151 152 } 153 } 154 | Popular Tags |