@AutoService(value=CompiledObjectDecorator.class) public class DefaultCompiledObjectDecorator extends Object implements CompiledObjectDecorator
|
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.logging.log4j.Logger |
log
Logger
|
| Constructor and Description |
|---|
DefaultCompiledObjectDecorator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addClientProperties(CompiledObject object,
StringBuilder code,
String eol) |
String |
createCompleteSetupMethod(JAXXCompiler compiler,
CompiledObject object,
JavaFile javaFile)
Obtain the setup code of the given
object from the
compiler to be inject in the generated method
$completeSetup. |
boolean |
createInitializer(JAXXCompiler compiler,
CompiledObject root,
CompiledObject object,
StringBuilder code,
boolean lastWasMethodCall)
Create the initializer code for the given compiled
object and
inject it in the code. |
void |
finalizeCompiler(JAXXCompiler compiler,
CompiledObject root,
CompiledObject object,
JavaFile javaFile,
String packageName,
String className,
String fullClassName)
Finalize the given compiled object before any generation in the
file. |
String |
getCreationCode(JAXXCompiler compiler,
CompiledObject object)
Obtain the creation code of the given
object from the compiler to inject in generate method
$initialize or createXXX in not inline. |
String |
getName() |
public String getName()
getName in interface CompiledObjectDecoratorpublic void finalizeCompiler(JAXXCompiler compiler, CompiledObject root, CompiledObject object, JavaFile javaFile, String packageName, String className, String fullClassName) throws ClassNotFoundException
CompiledObjectDecoratorfile.finalizeCompiler in interface CompiledObjectDecoratorcompiler - the compiler to useroot - the root compiled object of the jaxx fileobject - the compiled object to treatejavaFile - the file to treatepackageName - the package nameclassName - the (simple ?) class namefullClassName - the fully class nameClassNotFoundException - if a class is not foundpublic String getCreationCode(JAXXCompiler compiler, CompiledObject object) throws CompilerException
CompiledObjectDecoratorobject from the compiler to inject in generate method
$initialize or createXXX in not inline.getCreationCode in interface CompiledObjectDecoratorcompiler - the compiler to useobject - the compiled object to treateCompilerException - if any pbpublic String createCompleteSetupMethod(JAXXCompiler compiler, CompiledObject object, JavaFile javaFile)
CompiledObjectDecoratorobject from the
compiler to be inject in the generated method
$completeSetup.createCompleteSetupMethod in interface CompiledObjectDecoratorcompiler - the compiler to useobject - the compiled object to treatejavaFile - the file to treatepublic boolean createInitializer(JAXXCompiler compiler, CompiledObject root, CompiledObject object, StringBuilder code, boolean lastWasMethodCall)
CompiledObjectDecoratorobject and
inject it in the code.createInitializer in interface CompiledObjectDecoratorcompiler - the compiler to useroot - the root compiled object of the jaxx fileobject - the compiled object to treatecode - where to store code to injectlastWasMethodCall - true if last instruction call was a method calltrue if the last instruction was a method callprotected void addClientProperties(CompiledObject object, StringBuilder code, String eol)
Copyright © 2008–2018 Ultreia.io. All rights reserved.