|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.classloading.enhancers.Enhancer
public abstract class Enhancer
Enhancer support
Nested Class Summary | |
---|---|
static class |
Enhancer.ApplicationClassesClasspath
Dumb classpath implementation for javassist hacking |
Field Summary | |
---|---|
protected javassist.ClassPool |
classPool
|
Constructor Summary | |
---|---|
Enhancer()
|
Method Summary | |
---|---|
protected static void |
createAnnotation(javassist.bytecode.AnnotationsAttribute attribute,
java.lang.Class annotationType)
Create a new annotation to be dynamically inserted in the byte code. |
protected static void |
createAnnotation(javassist.bytecode.AnnotationsAttribute attribute,
java.lang.Class annotationType,
java.util.Map<java.lang.String,javassist.bytecode.annotation.MemberValue> members)
Create a new annotation to be dynamically inserted in the byte code. |
abstract void |
enhanceThisClass(ApplicationClasses.ApplicationClass applicationClass)
The magic happen here... |
protected static javassist.bytecode.AnnotationsAttribute |
getAnnotations(javassist.CtClass ctClass)
Retrieve all class annotations. |
protected static javassist.bytecode.AnnotationsAttribute |
getAnnotations(javassist.CtField ctField)
Retrieve all field annotations. |
protected static javassist.bytecode.AnnotationsAttribute |
getAnnotations(javassist.CtMethod ctMethod)
Retrieve all method annotations. |
protected boolean |
hasAnnotation(javassist.CtClass ctClass,
java.lang.String annotation)
Test if a class has the provided annotation |
protected boolean |
hasAnnotation(javassist.CtField ctField,
java.lang.String annotation)
Test if a field has the provided annotation |
javassist.CtClass |
makeClass(ApplicationClasses.ApplicationClass applicationClass)
Construct a javassist CtClass from an application class. |
static javassist.ClassPool |
newClassPool()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javassist.ClassPool classPool
Constructor Detail |
---|
public Enhancer()
Method Detail |
---|
public static javassist.ClassPool newClassPool()
public javassist.CtClass makeClass(ApplicationClasses.ApplicationClass applicationClass) throws java.io.IOException
java.io.IOException
public abstract void enhanceThisClass(ApplicationClasses.ApplicationClass applicationClass) throws java.lang.Exception
java.lang.Exception
protected boolean hasAnnotation(javassist.CtClass ctClass, java.lang.String annotation) throws java.lang.ClassNotFoundException
ctClass
- the javassist class representationannotation
- fully qualified name of the annotation class eg."javax.persistence.Entity"
java.lang.ClassNotFoundException
protected boolean hasAnnotation(javassist.CtField ctField, java.lang.String annotation) throws java.lang.ClassNotFoundException
ctField
- the javassist field representationannotation
- fully qualified name of the annotation class eg."javax.persistence.Entity"
java.lang.ClassNotFoundException
protected static void createAnnotation(javassist.bytecode.AnnotationsAttribute attribute, java.lang.Class annotationType, java.util.Map<java.lang.String,javassist.bytecode.annotation.MemberValue> members)
protected static void createAnnotation(javassist.bytecode.AnnotationsAttribute attribute, java.lang.Class annotationType)
protected static javassist.bytecode.AnnotationsAttribute getAnnotations(javassist.CtClass ctClass)
protected static javassist.bytecode.AnnotationsAttribute getAnnotations(javassist.CtField ctField)
protected static javassist.bytecode.AnnotationsAttribute getAnnotations(javassist.CtMethod ctMethod)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |