public class AmberEnhancer extends java.lang.Object implements AmberGenerator, ClassEnhancer
| Constructor and Description |
|---|
AmberEnhancer(AmberContainer amberContainer) |
| Modifier and Type | Method and Description |
|---|---|
void |
compile()
Compiles the pending classes.
|
void |
configure(AbstractEnhancedType type)
Parses the configuration file.
|
void |
enhance(GenClass genClass,
JClass baseClass,
java.lang.String extClassName)
Enhances the class.
|
void |
generate(AbstractEnhancedType type)
Generates the type.
|
void |
generateJava(JavaClassGenerator javaGen,
AbstractEnhancedType type)
Generates the type.
|
Path |
getPostWorkDir()
Returns the work directory.
|
Path |
getWorkDir()
Returns the work directory.
|
void |
init()
Initialize the enhancer.
|
protected boolean |
isModified(java.lang.Class preloadedClass)
Checks to see if the preloaded class is modified.
|
protected EntityType |
loadEntityTypeImpl(java.lang.Class cl,
java.lang.ClassLoader rawLoader) |
void |
postEnhance(JavaClass baseClass)
Enhances the class.
|
void |
preEnhance(JavaClass baseClass)
Enhances the class.
|
void |
setConfigDirectory(Path dir)
Sets the config directory.
|
boolean |
shouldEnhance(java.lang.String className)
Returns true if the class should be enhanced.
|
java.lang.String |
toString() |
public AmberEnhancer(AmberContainer amberContainer)
public void setConfigDirectory(Path dir)
public Path getWorkDir()
public Path getPostWorkDir()
public void init()
throws java.lang.Exception
java.lang.Exceptionprotected boolean isModified(java.lang.Class preloadedClass)
public boolean shouldEnhance(java.lang.String className)
shouldEnhance in interface ClassEnhancerprotected EntityType loadEntityTypeImpl(java.lang.Class cl, java.lang.ClassLoader rawLoader)
public void preEnhance(JavaClass baseClass) throws java.lang.Exception
preEnhance in interface ClassEnhancerjava.lang.Exceptionpublic void enhance(GenClass genClass, JClass baseClass, java.lang.String extClassName) throws java.lang.Exception
enhance in interface ClassEnhancerjava.lang.Exceptionpublic void generate(AbstractEnhancedType type) throws java.lang.Exception
generate in interface AmberGeneratorjava.lang.Exceptionpublic void generateJava(JavaClassGenerator javaGen, AbstractEnhancedType type) throws java.lang.Exception
generateJava in interface AmberGeneratorjava.lang.Exceptionpublic void compile()
throws java.lang.Exception
compile in interface AmberGeneratorjava.lang.Exceptionpublic void postEnhance(JavaClass baseClass) throws java.lang.Exception
postEnhance in interface ClassEnhancerjava.lang.Exceptionpublic void configure(AbstractEnhancedType type) throws ConfigException, java.io.IOException
configure in interface AmberGeneratorConfigExceptionjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object