|
Download Sources | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liguorien.flex.generator.handlers.AbstractGeneratorHandler<Dom4jBuilderHandler>
com.liguorien.flex.generator.handlers.Dom4jBuilderHandler
public class Dom4jBuilderHandler
Generates code which will read and create dom4j element from Java entities.
| Constructor Summary | |
|---|---|
Dom4jBuilderHandler()
Create a new instance of Dom4jBuilderHandler |
|
Dom4jBuilderHandler(java.lang.String builderSuffix)
Create a new instance of Dom4jBuilderHandler |
|
| Method Summary | |
|---|---|
protected void |
appendClassSuffix(java.lang.StringBuilder buffer)
Appends a suffix to name of the generated class. |
protected void |
appendExtension(java.lang.StringBuilder buffer)
Appends the extension of the generated file. |
java.lang.String |
getBuilderSuffix()
Return the suffix to be appended to the name of the generated class. |
java.lang.StringBuilder |
getClassName(java.lang.Class clazz)
Get the name of the generated class. |
ClassType |
getClassType()
Get the ClassType for this handler. |
ClassWriter |
getClassWriter()
Get the ClassWriter of this handler. |
java.io.File |
getOutputDirectory()
Return the output directory of this handler |
protected java.lang.String |
getRelativeFilePath(java.lang.Class clazz)
Returns a file path relative to the output directory. |
void |
handleClassBegin(java.lang.Class<?> clazz)
Invoked when the generator begin a new class. |
void |
writeClassName(java.io.Writer w,
java.lang.Class clazz,
java.lang.String classPrefix,
java.lang.String classSuffix)
Writes the name of the generated class. |
| Methods inherited from class com.liguorien.flex.generator.handlers.AbstractGeneratorHandler |
|---|
addContextMethodWriter, addImport, addMethodWriter, addPropertyWriter, appendClassPrefix, clearImports, getAttributes, getContextMethodWriters, getCurrentClass, getElements, getGenerator, getImports, getMethodWriters, getPropertyWriters, getWriter, handleClassBegin, handleClassEnd, handleClassEnd, handleProperty, initWriter, resetImports, setGenerator, setWriter, writeDocumentation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dom4jBuilderHandler()
public Dom4jBuilderHandler(java.lang.String builderSuffix)
builderSuffix - The suffix to be appended to the name of the generated classes.| Method Detail |
|---|
public ClassType getClassType()
AbstractGeneratorHandlerGet the ClassType for this handler.
getClassType in interface FlexGeneratorHandlergetClassType in class AbstractGeneratorHandler<Dom4jBuilderHandler>ClassType.SERVER_BUILDERSClassTypepublic java.lang.String getBuilderSuffix()
public java.io.File getOutputDirectory()
AbstractGeneratorHandlerReturn the output directory of this handler
getOutputDirectory in class AbstractGeneratorHandler<Dom4jBuilderHandler>public void handleClassBegin(java.lang.Class<?> clazz)
FlexGeneratorHandler
clazz - The class which the generator is parsing.protected void appendClassSuffix(java.lang.StringBuilder buffer)
AbstractGeneratorHandlerAppends a suffix to name of the generated class. The default behavior
is to append (if not null) value of FlexGenerator.getClassSuffix().
appendClassSuffix in class AbstractGeneratorHandler<Dom4jBuilderHandler>buffer - The buffer which the suffix must be appended.protected void appendExtension(java.lang.StringBuilder buffer)
AbstractGeneratorHandlerAppends the extension of the generated file.
appendExtension in class AbstractGeneratorHandler<Dom4jBuilderHandler>buffer - The buffer which the extension must be appended.public ClassWriter getClassWriter()
AbstractGeneratorHandlerGet the ClassWriter of this handler.
getClassWriter in class AbstractGeneratorHandler<Dom4jBuilderHandler>ClassWriter of this handler.ClassWriterpublic java.lang.StringBuilder getClassName(java.lang.Class clazz)
AbstractGeneratorHandlerGet the name of the generated class. It's used by the
MethodWriter who need a reference to the class.
getClassName in class AbstractGeneratorHandler<Dom4jBuilderHandler>clazz - An entity class
protected java.lang.String getRelativeFilePath(java.lang.Class clazz)
AbstractGeneratorHandlerReturns a file path relative to the output directory.
getRelativeFilePath in class AbstractGeneratorHandler<Dom4jBuilderHandler>clazz - An entity class
public void writeClassName(java.io.Writer w,
java.lang.Class clazz,
java.lang.String classPrefix,
java.lang.String classSuffix)
throws java.io.IOException
AbstractGeneratorHandlerWrites the name of the generated class. It's used by the
MethodWriter who need a reference to the class.
writeClassName in class AbstractGeneratorHandler<Dom4jBuilderHandler>w - The writer used to write the classname.clazz - An entity classclassPrefix - The prefix of the classname (can be null)classSuffix - The suffix of the classname (can be null)
java.io.IOException - If an IO error occurs.
|
FlexGenerator | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||