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.Exception
protected boolean isModified(java.lang.Class preloadedClass)
public boolean shouldEnhance(java.lang.String className)
shouldEnhance
in interface ClassEnhancer
protected EntityType loadEntityTypeImpl(java.lang.Class cl, java.lang.ClassLoader rawLoader)
public void preEnhance(JavaClass baseClass) throws java.lang.Exception
preEnhance
in interface ClassEnhancer
java.lang.Exception
public void enhance(GenClass genClass, JClass baseClass, java.lang.String extClassName) throws java.lang.Exception
enhance
in interface ClassEnhancer
java.lang.Exception
public void generate(AbstractEnhancedType type) throws java.lang.Exception
generate
in interface AmberGenerator
java.lang.Exception
public void generateJava(JavaClassGenerator javaGen, AbstractEnhancedType type) throws java.lang.Exception
generateJava
in interface AmberGenerator
java.lang.Exception
public void compile() throws java.lang.Exception
compile
in interface AmberGenerator
java.lang.Exception
public void postEnhance(JavaClass baseClass) throws java.lang.Exception
postEnhance
in interface ClassEnhancer
java.lang.Exception
public void configure(AbstractEnhancedType type) throws ConfigException, java.io.IOException
configure
in interface AmberGenerator
ConfigException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object