|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--stomp.enhance.AbstractEnhancer
Common code that enhancer which use proxy-delegate pairs might want to reuse.
Constructor Summary | |
AbstractEnhancer(serp.bytecode.BCClass source)
|
Method Summary | |
protected abstract void |
addGetSetMethods(serp.bytecode.BCField field,
serp.bytecode.BCClass delegate)
|
boolean |
alreadyEnhanced()
|
protected void |
changeDelegateMethodInvocations(serp.bytecode.BCClass delegate)
|
protected serp.bytecode.BCClass |
createCommonInterface()
Creates the common interface class and stores it internally. |
protected serp.bytecode.BCClass |
createDelegate()
|
serp.bytecode.BCClass |
createInterface(java.lang.String name)
Helper method to create an interface declaring all the public and protected methods of the source class. |
protected serp.bytecode.BCClass |
createProxy()
|
static void |
debug(serp.bytecode.Code code,
java.lang.String debug)
adds opcodes to the given code block to print out the requested debug string at runtime. |
void |
enhance()
Creates all the necessary classes (proxy, interface, and delegate objects), and stores them internally. |
protected abstract java.lang.Class |
getDelegateBaseClass()
|
protected abstract java.lang.Class |
getDelegateProxyConstructorType()
|
abstract java.lang.String |
getEnhancerAttribute()
|
static java.lang.String |
getFieldGetMethodName(java.lang.String fieldName,
EnhancedServiceMetaData meta)
|
static java.lang.String |
getFieldSetMethodName(java.lang.String fieldName,
EnhancedServiceMetaData meta)
|
EnhancedServiceMetaData |
getMetaData()
|
static serp.bytecode.Project |
getProject()
|
protected abstract java.lang.Class |
getProxyBaseClass()
|
static java.util.Collection |
getServiceClasses(java.lang.String[] args)
utility method that parses command line args and produces a list of requested BCClass objects to attempt to enhance. |
serp.bytecode.BCClass |
getSource()
|
protected abstract void |
makeProxyConstructor(serp.bytecode.BCMethod copy,
serp.bytecode.BCClass proxy)
|
protected abstract void |
makeProxyMethod(serp.bytecode.BCMethod method)
|
void |
writeClass(serp.bytecode.BCClass theClass)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractEnhancer(serp.bytecode.BCClass source)
Method Detail |
public serp.bytecode.BCClass getSource()
public EnhancedServiceMetaData getMetaData()
public static serp.bytecode.Project getProject()
public void enhance()
public boolean alreadyEnhanced()
protected serp.bytecode.BCClass createCommonInterface() throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundException
java.io.IOException
public serp.bytecode.BCClass createInterface(java.lang.String name) throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundException
java.io.IOException
protected serp.bytecode.BCClass createProxy() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected serp.bytecode.BCClass createDelegate() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public static java.lang.String getFieldGetMethodName(java.lang.String fieldName, EnhancedServiceMetaData meta)
public static java.lang.String getFieldSetMethodName(java.lang.String fieldName, EnhancedServiceMetaData meta)
public void writeClass(serp.bytecode.BCClass theClass) throws java.io.IOException
java.io.IOException
public static void debug(serp.bytecode.Code code, java.lang.String debug)
protected void changeDelegateMethodInvocations(serp.bytecode.BCClass delegate) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public abstract java.lang.String getEnhancerAttribute()
protected abstract void makeProxyMethod(serp.bytecode.BCMethod method) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected abstract void addGetSetMethods(serp.bytecode.BCField field, serp.bytecode.BCClass delegate) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected abstract java.lang.Class getProxyBaseClass()
protected abstract java.lang.Class getDelegateBaseClass()
protected abstract java.lang.Class getDelegateProxyConstructorType()
protected abstract void makeProxyConstructor(serp.bytecode.BCMethod copy, serp.bytecode.BCClass proxy) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public static java.util.Collection getServiceClasses(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |