jaxx.compiler
Class CompiledObjectDecorator
java.lang.Object
jaxx.compiler.CompiledObjectDecorator
- Direct Known Subclasses:
- DefaultCompiledObjectDecorator
public abstract class CompiledObjectDecorator
- extends java.lang.Object
A class to decorate a compiled object at generation time.
Contains also a cache of decorator in a dictonnary indexed by fqn of decorator.
Use the getDecorator(java.lang.String) to obtain the cached decorator.
Note : The implementation of this class must be stateless.
- Since:
- 1.2
- Author:
- tony
|
Method Summary |
abstract java.lang.String |
createCompleteSetupMethod(JAXXCompiler compiler,
CompiledObject object,
JavaFile javaFile,
java.lang.StringBuffer initDataBindings)
|
abstract boolean |
createInitializer(JAXXCompiler compiler,
CompiledObject root,
CompiledObject object,
java.lang.StringBuffer code,
boolean lastWasMethodCall)
|
abstract void |
finalizeCompiler(JAXXCompiler compiler,
CompiledObject root,
CompiledObject object,
JavaFile javaFile,
java.lang.String packageName,
java.lang.String className,
java.lang.String fullClassName)
|
protected static java.util.Map<java.lang.String,CompiledObjectDecorator> |
getCache()
|
abstract java.lang.String |
getCreationCode(JAXXCompiler compiler,
CompiledObject object)
|
static CompiledObjectDecorator |
getDecorator(java.lang.Class<?> type)
|
static CompiledObjectDecorator |
getDecorator(java.lang.String name)
|
static void |
registerDecorator(java.lang.String key,
java.lang.Class<? extends CompiledObjectDecorator> klass)
|
static void |
reset()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cache
protected static java.util.Map<java.lang.String,CompiledObjectDecorator> cache
CompiledObjectDecorator
public CompiledObjectDecorator()
registerDecorator
public static void registerDecorator(java.lang.String key,
java.lang.Class<? extends CompiledObjectDecorator> klass)
getDecorator
public static CompiledObjectDecorator getDecorator(java.lang.String name)
getDecorator
public static CompiledObjectDecorator getDecorator(java.lang.Class<?> type)
getCache
protected static java.util.Map<java.lang.String,CompiledObjectDecorator> getCache()
reset
public static void reset()
finalizeCompiler
public abstract void finalizeCompiler(JAXXCompiler compiler,
CompiledObject root,
CompiledObject object,
JavaFile javaFile,
java.lang.String packageName,
java.lang.String className,
java.lang.String fullClassName)
getCreationCode
public abstract java.lang.String getCreationCode(JAXXCompiler compiler,
CompiledObject object)
throws CompilerException
- Throws:
CompilerException
createInitializer
public abstract boolean createInitializer(JAXXCompiler compiler,
CompiledObject root,
CompiledObject object,
java.lang.StringBuffer code,
boolean lastWasMethodCall)
createCompleteSetupMethod
public abstract java.lang.String createCompleteSetupMethod(JAXXCompiler compiler,
CompiledObject object,
JavaFile javaFile,
java.lang.StringBuffer initDataBindings)
Copyright © 2008-2009 CodeLutin. All Rights Reserved.