|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.digitalis.dif.codegen.util.ClassEnhancements
public class ClassEnhancements
Defines a class enhancement object.
Constructor Summary | |
---|---|
ClassEnhancements(pt.digitalis.utils.bytecode.holders.ClassHolder clazz)
Builds a class enhancements object from the class name. |
Method Summary | |
---|---|
void |
addEnhancement(ClassMethodEnhancement enhancement)
Adds a processed enhancement to the class. |
void |
addSource(String methodName,
String methodSource)
Adds a source to a given method. |
void |
commitEnhancements()
Commits all the enhancements to a class file. |
String |
getClassName()
Returns the class name. |
pt.digitalis.utils.bytecode.holders.ClassHolder |
getClassObject()
Returns the class object. |
Map<String,ClassMethodEnhancement> |
getMethodEnhancements()
Returns the method enhancements map. |
void |
registerMethodAsIncremental(String methodName)
Adds a method name to the list of incremental methods. |
void |
setTerminator(String methodName,
String terminator)
Adds a source to a given method. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClassEnhancements(pt.digitalis.utils.bytecode.holders.ClassHolder clazz)
clazz
- the class to be enhancedMethod Detail |
---|
public void addEnhancement(ClassMethodEnhancement enhancement)
enhancement
- the enhancement to addpublic void addSource(String methodName, String methodSource)
methodName
- the method namemethodSource
- the method sourcepublic void commitEnhancements() throws pt.digitalis.utils.inspection.exception.ResourceNotFoundException, pt.digitalis.utils.bytecode.exceptions.CodeGenerationException
pt.digitalis.utils.inspection.exception.ResourceNotFoundException
- if the class can't be found
pt.digitalis.utils.bytecode.exceptions.CodeGenerationException
- if the code can't be compiledpublic String getClassName()
public pt.digitalis.utils.bytecode.holders.ClassHolder getClassObject()
public Map<String,ClassMethodEnhancement> getMethodEnhancements()
public void registerMethodAsIncremental(String methodName)
methodName
- the name of the method to registerpublic void setTerminator(String methodName, String terminator)
methodName
- the method nameterminator
- the finalize code for the methodpublic String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |