Class HelpRootCompiledObjectDecorator
- java.lang.Object
-
- org.nuiton.jaxx.compiler.decorators.DefaultCompiledObjectDecorator
-
- org.nuiton.jaxx.compiler.decorators.HelpRootCompiledObjectDecorator
-
- All Implemented Interfaces:
CompiledObjectDecorator
@AutoService(CompiledObjectDecorator.class) @Component(hint="help", role=CompiledObjectDecorator.class) public class HelpRootCompiledObjectDecorator extends DefaultCompiledObjectDecorator
A decorator to place on a root compiled object to process javaHelp on the file.- Since:
- 1.2
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Field Summary
Fields Modifier and Type Field Description protected static Set<String>helpIdsthe list of discovered helpId-
Fields inherited from class org.nuiton.jaxx.compiler.decorators.DefaultCompiledObjectDecorator
log
-
-
Constructor Summary
Constructors Constructor Description HelpRootCompiledObjectDecorator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinalizeCompiler(JAXXCompiler compiler, CompiledObject root, CompiledObject object, JavaFile javaFile, String packageName, String className, String fullClassName)Finalize the given compiled object before any generation in thefile.protected StringgetBrokerFQN(JAXXCompiler compiler)protected StringgetHelpId(CompiledObject o)static Set<String>getHelpIds()StringgetName()protected booleanisNeedInterface(JAXXCompiler compiler, Class<?> validatorInterface)Detects if the givencompilerneed the validatorInterface.-
Methods inherited from class org.nuiton.jaxx.compiler.decorators.DefaultCompiledObjectDecorator
addClientProperties, createCompleteSetupMethod, createInitializer, getCreationCode
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceCompiledObjectDecorator- Overrides:
getNamein classDefaultCompiledObjectDecorator- Returns:
- the name of the decorator (match the content of a decorator attribute value in a JAXX file)
-
getBrokerFQN
protected String getBrokerFQN(JAXXCompiler compiler)
-
getHelpId
protected String getHelpId(CompiledObject o)
-
finalizeCompiler
public void finalizeCompiler(JAXXCompiler compiler, CompiledObject root, CompiledObject object, JavaFile javaFile, String packageName, String className, String fullClassName) throws ClassNotFoundException
Description copied from interface:CompiledObjectDecoratorFinalize the given compiled object before any generation in thefile.- Specified by:
finalizeCompilerin interfaceCompiledObjectDecorator- Overrides:
finalizeCompilerin classDefaultCompiledObjectDecorator- Parameters:
compiler- 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 name- Throws:
ClassNotFoundException- if a class is not found
-
isNeedInterface
protected boolean isNeedInterface(JAXXCompiler compiler, Class<?> validatorInterface) throws ClassNotFoundException
Detects if the givencompilerneed the validatorInterface. We need to test it deeply since the interface is added by the decorator and is not present on the symbol table of compiled objects.- Parameters:
compiler- the compiler to testvalidatorInterface- the validator interface to seek for- Returns:
trueif we need to add the interface,falseotherwise- Throws:
ClassNotFoundException- if could not find a class- Since:
- 2.4
-
-