This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository nuiton-config. See https://gitlab.nuiton.org/nuiton/nuiton-config.git commit 730cf397ef4244dff3582c7b06b9467b4bdf2bff Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Sep 30 15:23:53 2016 +0200 Update license headers, fix javadoc, make doc nearly ok --- nuiton-config-maven-plugin/pom.xml | 38 ++- .../org/nuiton/config/plugin/GenerateMojo.java | 26 +- .../plugin/parser/java/Java8BaseVisitor.java | 237 ------------- nuiton-config-maven-plugin/src/site/apt/index.apt | 10 +- .../java/org/nuiton/config/ApplicationConfig.java | 296 +++++++++++------ .../org/nuiton/config/ApplicationConfigHelper.java | 2 +- .../nuiton/config/ApplicationConfigProvider.java | 2 +- .../config/ApplicationConfigSaveException.java | 2 +- .../nuiton/config/ArgumentsParserException.java | 2 +- .../java/org/nuiton/config/ConfigActionDef.java | 2 +- .../java/org/nuiton/config/ConfigOptionDef.java | 2 +- .../nuiton/config/OverwriteApplicationConfig.java | 2 +- .../org/nuiton/config/SubApplicationConfig.java | 2 +- {src => nuiton-config/src}/site/apt/index.apt | 10 +- {src => nuiton-config/src}/site/site_fr.xml | 29 +- .../org/nuiton/config/ApplicationConfigTest.java | 22 +- .../nuiton/config/ChangeApplicationNameTest.java | 2 +- nuiton-config/src/test/resources/log4j.properties | 2 +- nuiton-config/src/test/resources/wao.properties | 2 +- src/site/apt/index.apt | 370 +-------------------- src/site/apt/versions.apt | 2 +- src/site/site_fr.xml | 4 +- 22 files changed, 277 insertions(+), 789 deletions(-) diff --git a/nuiton-config-maven-plugin/pom.xml b/nuiton-config-maven-plugin/pom.xml index da0c3c5..bd60990 100644 --- a/nuiton-config-maven-plugin/pom.xml +++ b/nuiton-config-maven-plugin/pom.xml @@ -23,8 +23,7 @@ #L% --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> @@ -40,13 +39,6 @@ <description>Maven plugin to use the config library</description> <inceptionYear>2016</inceptionYear> - <properties> - - <!-- Post Release configuration --> - <skipPostRelease>false</skipPostRelease> - - </properties> - <dependencies> <dependency> @@ -176,11 +168,6 @@ </dependency> <dependency> - <groupId>xml-apis</groupId> - <artifactId>xml-apis</artifactId> - </dependency> - - <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <scope>runtime</scope> @@ -233,4 +220,27 @@ </plugins> </build> + <profiles> + + <profile> + <id>reporting</id> + <activation> + <property> + <name>performRelease</name> + <value>true</value> + </property> + </activation> + + <reporting> + <plugins> + <plugin> + <artifactId>maven-plugin-plugin</artifactId> + <version>${pluginPluginVersion}</version> + </plugin> + </plugins> + </reporting> + + </profile> + + </profiles> </project> diff --git a/nuiton-config-maven-plugin/src/main/java/org/nuiton/config/plugin/GenerateMojo.java b/nuiton-config-maven-plugin/src/main/java/org/nuiton/config/plugin/GenerateMojo.java index d6ec93d..0dbf67a 100644 --- a/nuiton-config-maven-plugin/src/main/java/org/nuiton/config/plugin/GenerateMojo.java +++ b/nuiton-config-maven-plugin/src/main/java/org/nuiton/config/plugin/GenerateMojo.java @@ -22,6 +22,8 @@ package org.nuiton.config.plugin; * #L% */ +import com.google.common.base.Joiner; +import com.google.common.collect.Iterables; import org.antlr.v4.runtime.ANTLRInputStream; import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.TokenStream; @@ -54,12 +56,17 @@ import java.io.File; import java.net.URL; import java.sql.Time; import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.LinkedHashMap; +import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Properties; +import static java.util.Arrays.asList; + /** * Generate application config java files from the option definition class. * <p> @@ -75,6 +82,15 @@ public class GenerateMojo extends AbstractPlugin implements PluginWithEncoding { * To set the package fully qualified name of the generated class. * <p> * By default, will use groupId.artifactId (with {@code -} replaced by {@code .}) plus {@code .config}. + * </p> + * <p> + * A special case is designed to remove in artifactId the first component if it is the last one of groupId, for + * example with gav + * <pre>org.nuiton:nuiton-config</pre> + * <p> + * the package name will be {@code org.nuiton.config} and not {@code org.nuiton.nuiton.config}. + * </p> + * */ @Parameter(property = "config.packageName") private String packageName; @@ -149,7 +165,15 @@ public class GenerateMojo extends AbstractPlugin implements PluginWithEncoding { if (packageName == null) { - packageName = getProject().getGroupId() + "." + getProject().getArtifactId().replaceAll("-", "."); + List<String> groupIdPaths = new ArrayList<>(asList(getProject().getGroupId().split("\\."))); + + List<String> artifactIdPaths = new ArrayList<>(Arrays.asList(getProject().getArtifactId().replaceAll("-", ".").split("\\."))); + if (Iterables.getLast(groupIdPaths).equals(Iterables.getFirst(artifactIdPaths, null))) { + artifactIdPaths.remove(0); + } + groupIdPaths.addAll(artifactIdPaths); + + packageName = Joiner.on(".").join(groupIdPaths); getLog().info("Use package name: " + packageName); } diff --git a/nuiton-config-maven-plugin/src/main/java/org/nuiton/config/plugin/parser/java/Java8BaseVisitor.java b/nuiton-config-maven-plugin/src/main/java/org/nuiton/config/plugin/parser/java/Java8BaseVisitor.java index 78e9821..0dbc444 100644 --- a/nuiton-config-maven-plugin/src/main/java/org/nuiton/config/plugin/parser/java/Java8BaseVisitor.java +++ b/nuiton-config-maven-plugin/src/main/java/org/nuiton/config/plugin/parser/java/Java8BaseVisitor.java @@ -37,7 +37,6 @@ import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> implements Java8Visitor<Result> { /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -48,7 +47,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -59,7 +57,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -70,7 +67,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -81,7 +77,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -92,7 +87,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -103,7 +97,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -114,7 +107,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -125,7 +117,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -136,7 +127,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -147,7 +137,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -158,7 +147,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -169,7 +157,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -180,7 +167,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -191,7 +177,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -202,7 +187,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -213,7 +197,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -224,7 +207,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -235,7 +217,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -246,7 +227,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -257,7 +237,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -268,7 +247,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -279,7 +257,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -290,7 +267,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -301,7 +277,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -312,7 +287,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -323,7 +297,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -334,7 +307,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -345,7 +317,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -356,7 +327,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -367,7 +337,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -378,7 +347,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -389,7 +357,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -400,7 +367,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -411,7 +377,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -422,7 +387,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -433,7 +397,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -444,7 +407,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -455,7 +417,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -466,7 +427,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -477,7 +437,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -488,7 +447,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -499,7 +457,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -510,7 +467,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -521,7 +477,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -532,7 +487,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -543,7 +497,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -554,7 +507,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -565,7 +517,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -576,7 +527,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -587,7 +537,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -598,7 +547,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -609,7 +557,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -620,7 +567,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -631,7 +577,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -642,7 +587,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -653,7 +597,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -664,7 +607,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -675,7 +617,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -686,7 +627,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -697,7 +637,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -708,7 +647,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -719,7 +657,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -730,7 +667,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -741,7 +677,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -752,7 +687,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -763,7 +697,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -774,7 +707,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -785,7 +717,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -796,7 +727,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -807,7 +737,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -818,7 +747,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -829,7 +757,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -840,7 +767,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -851,7 +777,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -862,7 +787,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -873,7 +797,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -884,7 +807,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -895,7 +817,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -906,7 +827,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -917,7 +837,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -928,7 +847,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -939,7 +857,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -950,7 +867,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -961,7 +877,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -972,7 +887,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -983,7 +897,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -994,7 +907,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1005,7 +917,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1016,7 +927,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1027,7 +937,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1038,7 +947,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1049,7 +957,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1060,7 +967,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1071,7 +977,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1082,7 +987,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1093,7 +997,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1104,7 +1007,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1115,7 +1017,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1126,7 +1027,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1137,7 +1037,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1148,7 +1047,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1159,7 +1057,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1170,7 +1067,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1181,7 +1077,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1192,7 +1087,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1203,7 +1097,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1214,7 +1107,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1225,7 +1117,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1236,7 +1127,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1247,7 +1137,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1258,7 +1147,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1269,7 +1157,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1280,7 +1167,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1291,7 +1177,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1302,7 +1187,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1313,7 +1197,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1324,7 +1207,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1335,7 +1217,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1346,7 +1227,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1357,7 +1237,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1368,7 +1247,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1379,7 +1257,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1390,7 +1267,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1401,7 +1277,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1412,7 +1287,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1423,7 +1297,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1434,7 +1307,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1445,7 +1317,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1456,7 +1327,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1467,7 +1337,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1478,7 +1347,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1489,7 +1357,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1500,7 +1367,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1511,7 +1377,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1522,7 +1387,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1533,7 +1397,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1544,7 +1407,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1555,7 +1417,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1566,7 +1427,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1577,7 +1437,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1588,7 +1447,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1599,7 +1457,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1610,7 +1467,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1621,7 +1477,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1632,7 +1487,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1643,7 +1497,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1654,7 +1507,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1665,7 +1517,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1676,7 +1527,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1687,7 +1537,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1698,7 +1547,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1709,7 +1557,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1720,7 +1567,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1731,7 +1577,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1742,7 +1587,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1753,7 +1597,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1764,7 +1607,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1775,7 +1617,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1786,7 +1627,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1797,7 +1637,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1808,7 +1647,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1819,7 +1657,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1830,7 +1667,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1841,7 +1677,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1852,7 +1687,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1863,7 +1697,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1874,7 +1707,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1885,7 +1717,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1896,7 +1727,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1907,7 +1737,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1918,7 +1747,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1929,7 +1757,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1940,7 +1767,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1951,7 +1777,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1962,7 +1787,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1973,7 +1797,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1984,7 +1807,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -1995,7 +1817,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2006,7 +1827,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2017,7 +1837,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2028,7 +1847,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2039,7 +1857,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2050,7 +1867,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2061,7 +1877,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2072,7 +1887,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2083,7 +1897,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2094,7 +1907,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2105,7 +1917,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2116,7 +1927,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2127,7 +1937,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2138,7 +1947,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2149,7 +1957,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2160,7 +1967,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2171,7 +1977,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2182,7 +1987,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2193,7 +1997,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2204,7 +2007,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2215,7 +2017,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2226,7 +2027,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2237,7 +2037,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2248,7 +2047,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2259,7 +2057,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2270,7 +2067,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2281,7 +2077,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2292,7 +2087,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2303,7 +2097,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2314,7 +2107,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2325,7 +2117,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2336,7 +2127,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2347,7 +2137,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2358,7 +2147,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2369,7 +2157,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2380,7 +2167,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2391,7 +2177,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2402,7 +2187,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2413,7 +2197,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2424,7 +2207,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2435,7 +2217,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2446,7 +2227,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2457,7 +2237,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2468,7 +2247,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2479,7 +2257,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2490,7 +2267,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2501,7 +2277,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2512,7 +2287,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2523,7 +2297,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2534,7 +2307,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2545,7 +2317,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2556,7 +2327,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2567,7 +2337,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2578,7 +2347,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2589,7 +2357,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2600,7 +2367,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2611,7 +2377,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2622,7 +2387,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ @@ -2633,7 +2397,6 @@ public class Java8BaseVisitor<Result> extends AbstractParseTreeVisitor<Result> i /** * {@inheritDoc} - * <p> * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */ diff --git a/nuiton-config-maven-plugin/src/site/apt/index.apt b/nuiton-config-maven-plugin/src/site/apt/index.apt index 090f760..ab02dbe 100644 --- a/nuiton-config-maven-plugin/src/site/apt/index.apt +++ b/nuiton-config-maven-plugin/src/site/apt/index.apt @@ -1,5 +1,5 @@ -.. - -.. * #%L +~~~ +~~ #%L ~~ Nuiton Config :: Maven plugin ~~ %% ~~ Copyright (C) 2016 Code Lutin, Tony Chemit @@ -18,7 +18,7 @@ ~~ License along with this program. If not, see ~~ <http://www.gnu.org/licenses/lgpl-3.0.html>. ~~ #L% -.. - +~~~ ---- Nuiton Config Maven Plugin @@ -30,7 +30,9 @@ Présentation - TODO + Le plugin permet de générer une configuration à partir de la description de ces options (goal <<generate>>). + + Il permet aussi de générer la documentation d'une configuration (goal <<report>> et <<aggregate-report>>). Utilisation diff --git a/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfig.java b/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfig.java index 9929dbb..bc33434 100644 --- a/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfig.java +++ b/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfig.java @@ -4,7 +4,7 @@ package org.nuiton.config; * #%L * Nuiton Config :: API * %% - * Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + * Copyright (C) 2016 Code Lutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as @@ -29,11 +29,11 @@ import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.nuiton.converter.ConverterUtil; import org.nuiton.util.ObjectUtil; import org.nuiton.util.RecursiveProperties; import org.nuiton.util.SortedProperties; import org.nuiton.version.Version; -import org.nuiton.converter.ConverterUtil; import javax.swing.KeyStroke; import java.awt.Color; @@ -77,7 +77,6 @@ import java.util.Set; /** * Application configuration. - * * <h3>A finir...</h3> * <ul> * <li>Ajout d'annotations sur les methodes @@ -93,11 +92,10 @@ import java.util.Set; * Il est simple de le faire a l'execution mais c trop tard :( * <li>Ajouter de la documentation pour {@link #getOptionAsList(String)} * </ul> - * * <h3>Bonnes pratiques</h3> - * + * <p> * Vous devez créer une factory pour créer les instances d'{@link ApplicationConfig} qui contiendra par exemple une méthode : - * + * </p> * <pre> * * public static ApplicationConfig getConfig( @@ -118,21 +116,19 @@ import java.util.Set; * } * * </pre> - * * <ul> - * <li>MyAppConfigOption doit étendre {@link ConfigOptionDef} et décrir la configuration de l'application. - * <li>MyAppConfigAction doit étendre {@link ConfigActionDef} et décrir la liste des options + * <li>MyAppConfigOption doit étendre {@link ConfigOptionDef} et décrire la configuration de l'application. + * <li>MyAppConfigAction doit étendre {@link ConfigActionDef} et décrire la liste des options * et de leur alias disponible pour l'application. * </ul> - * * <h3>Lecture des fichiers de configuration</h3> - * + * <p> * La lecture des fichiers de configuration se fait durant l'appel de la methode * {@link #parse(String...)} en utilisant la valeur de qui doit être définit * dans les options avec pour clef {@link ApplicationConfig#CONFIG_FILE_NAME} pour * trouver les fichiers (voir Les options de configuration pour l'ordre de * chargement des fichiers) - * + * </p> * <h3>La sauvegarde</h3> * La sauvegarde des options se fait via une des trois methodes disponibles : * <ul> @@ -140,14 +136,14 @@ import java.util.Set; * <li> {@link #saveForSystem(String...)} sauvegarde les donnees dans /etc * <li> {@link #saveForUser(String...)} sauvegarde les donnees dans $HOME * </ul> - * + * <p> * Lors de l'utilisation de la methode {@link #saveForSystem(String...)} ou * {@link #saveForUser(String...)} seules les options lues dans un fichier ou modifiées par * programmation ({@link #setOption(String, String)} seront sauvegardées. Par exemple les * options passees sur la ligne de commande ne seront pas sauvees. - * + * </p> * <h3>Les options de configuration</h3> - * + * <p> * Cette classe permet de lire les fichiers de configuration, utiliser les * variable d'environnement et de parser la ligne de commande. L'ordre de prise * en compte des informations trouvées est le suivant (le premier le plus @@ -163,14 +159,12 @@ import java.util.Set; * <li>fichier de configuration trouve dans le classpath: $CLASSPATH/filename</li> * <li>options ajoutees par programmation: {@link #defaults}.put(key, value)</li> * </ul> - * - * + * <p> * Les options sur la ligne de commande sont de la forme: * <pre> * --option key value * --monOption key value1 value2 * </pre> - * * <ul> * <li>--option key value: est la syntaxe par defaut * <li>--monOption key value1 value2: est la syntaxe si vous avez ajouter une @@ -179,15 +173,14 @@ import java.util.Set; * arguments que vous souhaitez du moment qu'ils soient convertibles de la * representation String vers le type que vous avez mis. * </ul> - * * <h3>Les actions</h3> - * + * <p> * Les actions ne peuvent etre que sur la ligne de commande. Elles sont de la * forme: * <pre> * --le.package.LaClass#laMethode arg1 arg2 arg3 ... argN * </pre> - * + * <p> * Une action est donc defini par le chemin complet vers la methode qui traitera * l'action. Cette methode peut-etre une methode static ou non. Si la methode * n'est pas static lors de l'instanciation de l'objet on essaie de passer en @@ -198,17 +191,21 @@ import java.util.Set; * utilise (il doit etre accessible). Toutes methodes d'actions faisant * parties d'un meme objet utiliseront la meme instance de cette objet lors * de leur execution. - * + * </p> + * <p> * Si la methode utilise les arguments variants alors tous les arguments * jusqu'au prochain -- ou la fin de la ligne de commande sont utilises. Sinon * Le nombre exact d'argument necessaire a la methode sont utilises. - * + * </p> + * <p> * Les arguments sont automatiquement converti dans le bon type reclame par la * methode. - * + * </p> + * <p> * Si l'on veut des arguments optionnels le seul moyen actuellement est * d'utiliser une methode avec des arguments variants - * + * </p> + * <p> * Les actions ne sont pas execute mais seulement parsees. Pour les executer * il faut utiliser la méthode {@link #doAction(int)} qui prend en argument un numero * de 'step' ou {@link #doAllAction()} qui fait les actions dans l'ordre de leur step. @@ -222,10 +219,12 @@ import java.util.Set; * ... do something ... * doAction(1); * </pre> + * <p> * dans cette exemple on fait un traitement entre l'execution des actions * de niveau 0 et les actions de niveau 1. - * + * </p> * <h3>Les arguments non parsées</h3> + * <p> * Tout ce qui n'est pas option ou action est considere comme non parse et peut * etre recupere par la methode {@link #getUnparsed}. Si l'on souhaite forcer * la fin du parsing de la ligne de commande il est possible de mettre --. @@ -233,11 +232,13 @@ import java.util.Set; * <pre> * monProg "mon arg" --option k1 v1 -- --option k2 v2 -- autre * </pre> + * <p> * Dans cet exemple seule la premiere option sera considere comme une option. * On retrouvera dans {@code unparsed}: "mon arg", "--option", "k2", "v2", "--", * "autre" - * + * </p> * <h3>Les alias</h3> + * <p> * On voit qu'aussi bien pour les actions que pour les options, le nom de la * methode doit etre utilise. Pour eviter ceci il est possible de definir * des alias ce qui permet de creer des options courtes par exemple. Pour cela, @@ -254,15 +255,15 @@ import java.util.Set; * addAlias("cl", "Code Lutin"); * addAlias("bp", "Benjamin POUSSIN); * </pre> - * Dans le premier exemple on simplifie une option de flags l'option -v n'attend + * <p>Dans le premier exemple on simplifie une option de flags l'option -v n'attend * donc plus d'argument. Dans le second exemple on simplifie une option qui * attend encore un argment de type File. Enfin dans le troisieme exemple * on simplifie la syntaxe d'une action et on force le premier argument de * l'action a etre "import". - * + * </p> * <h3>Conversion de type</h3> - * Pour la conversion de type nous utilisons common-beans. Les types supportes - * sont: + * <p> + * Pour la conversion de type nous utilisons common-beans. Les types supportes sont: * <ul> * <li> les primitif (byte, short, int, long, float, double, char, boolean) * <li> {@link String} @@ -275,14 +276,16 @@ import java.util.Set; * <li> les tableaux d'un type primitif ou {@link String}. Chaque element doit * etre separe par une virgule. * </ul> - * + * <p> * Pour suporter d'autre type, il vous suffit d'enregistrer de nouveau * converter dans commons-beans. - * + * </p> * <h3>Les substitutions de variable</h3> + * <p> * {@link ApplicationConfig} supporte les substition de variables de la forme * <tt>${xxx}</tt> où {@code xxx} est une autre variable de la configuration. - * + * </p> + * <p> * Exemple (dans un fichier de configuration): * <pre> * firstname = John @@ -297,18 +300,26 @@ import java.util.Set; */ public class ApplicationConfig { - /** Logger. */ + /** + * Logger. + */ private static final Log log = LogFactory.getLog(ApplicationConfig.class); public static final String LIST_SEPARATOR = ","; - /** Configuration file key option. */ + /** + * Configuration file key option. + */ public static final String CONFIG_FILE_NAME = "config.file"; - /** Configuration encoding key option. */ + /** + * Configuration encoding key option. + */ public static final String CONFIG_ENCODING = "config.encoding"; - /** Permet d'associer un nom de contexte pour prefixer les options {@link #CONFIG_PATH} et {@link #CONFIG_FILE_NAME}. */ + /** + * Permet d'associer un nom de contexte pour prefixer les options {@link #CONFIG_PATH} et {@link #CONFIG_FILE_NAME}. + */ public static final String APP_NAME = "app.name"; /** @@ -320,7 +331,7 @@ public class ApplicationConfig { /** * Configuration directory where config path in located. - * + * <p> * Use default system configuration if nothing is defined: * <ul> * <li>Linux : /etc/xxx.properties @@ -330,31 +341,49 @@ public class ApplicationConfig { */ public static final String CONFIG_PATH = "config.path"; - /** System os name. (windows, linux, max os x) */ + /** + * System os name. (windows, linux, max os x) + */ protected String osName; - /** TODO */ + /** + * TODO + */ protected boolean useOnlyAliases; - /** vrai si on est en train de parser les options de la ligne de commande. */ + /** + * vrai si on est en train de parser les options de la ligne de commande. + */ protected boolean inParseOptionPhase; - /** TODO */ + /** + * TODO + */ protected Properties defaults = new Properties(); - /** TODO */ + /** + * TODO + */ protected Properties classpath = new Properties(defaults); - /** TODO */ + /** + * TODO + */ protected Properties etcfile = new Properties(classpath); - /** TODO */ + /** + * TODO + */ protected Properties homefile = new Properties(etcfile); - /** TODO */ + /** + * TODO + */ protected Properties curfile = new Properties(homefile); - /** TODO */ + /** + * TODO + */ protected Properties env = new Properties(curfile) { private static final long serialVersionUID = 1L; @@ -389,37 +418,53 @@ public class ApplicationConfig { }; - /** TODO */ + /** + * TODO + */ protected Properties jvm = new Properties(env); - /** TODO */ + /** + * TODO + */ protected Properties line = new Properties(jvm); - /** TODO */ + /** + * TODO + */ protected Properties options = new Properties(line); - /** TODO */ + /** + * TODO + */ protected Map<String, CacheItem<?>> cacheOption = new HashMap<String, CacheItem<?>>(); - /** TODO */ + /** + * TODO + */ protected Map<Class<?>, Object> cacheAction = new HashMap<Class<?>, Object>(); - /** contient apres l'appel de parse, la liste des arguments non utilises */ + /** + * contient apres l'appel de parse, la liste des arguments non utilises + */ protected List<String> unparsed = new ArrayList<String>(); - /** TODO */ + /** + * TODO + */ protected Map<String, List<String>> aliases = new HashMap<String, List<String>>(); - /** TODO */ + /** + * TODO + */ protected Map<Integer, List<Action>> actions = new HashMap<Integer, List<Action>>(); /** * Internal state to manage with masse operations on option and control * listeners. - * + * <p> * for example, if you want to save options, using javaBeans technology, * can add a listener to save each time the property is modified. - * + * <p> * Says now you have an algorithm to set new values in configuration using * setters but you do NOt want to save each time, add in your saving action * a test to detect if model is adjusting. @@ -429,15 +474,19 @@ public class ApplicationConfig { */ private boolean adjusting; - /** suport of config modification. */ + /** + * suport of config modification. + */ protected PropertyChangeSupport pcs = new PropertyChangeSupport(this); - /** permet de conserver des objets associe avec ce ApplicationConfig */ + /** + * permet de conserver des objets associe avec ce ApplicationConfig + */ protected Map<String, Object> context = new HashMap<String, Object>(); /** * Init ApplicationConfig with current simple class name as config file. - * + * <p> * Also init converters. * * @see ConverterUtil#initConverters() @@ -458,7 +507,7 @@ public class ApplicationConfig { /** * Init ApplicationConfig with current simple class name as config file * and use Properties parameter as defaults - * + * <p> * Also init converters. * * @param defaults properties @@ -518,6 +567,8 @@ public class ApplicationConfig { * All in one, this constructor allow to pass all necessary argument to * initialise ApplicationConfig and parse command line * + * @param <O> option type + * @param <A> action type * @param optionClass class that describe option, can be null * @param actionClass class that describe action, can be null * @param defaults properties that override default value of optionClass, can be null @@ -731,17 +782,17 @@ public class ApplicationConfig { /** * Clean the user configuration file (The one in user home) and save it * in user config file. - * + * <p> * All options with an empty value will be removed from this file. - * + * <p> * Moreover, like {@link #saveForUser(String...)} the given * {@code excludeKeys} will never be saved. - * + * <p> * This method can be useful when migrating some configuration from a * version to another one with deprecated options (otherwise they will stay * for ever in the configuration file with an empty value which is not * acceptable). - * + * <p> * <strong>Important note:</strong> Using this method can have some strange * side effects, since it could then allow to reuse default configurations * from other level (default, env, jvm,...). Use with care only! @@ -881,7 +932,7 @@ public class ApplicationConfig { /** * Get the encoding used to read/write resources. - * + * <p> * This value is stored as an option using the * {@link #getEncodingOption()} key. * @@ -979,7 +1030,7 @@ public class ApplicationConfig { /** * Use appName to add a context in config.file and config.path options. - * + * <p> * Ex for an application named 'pollen' : {@code config.file} option becomes * {@code pollen.config.file} and {@code config.path} becomes * {@code pollen.config.path} @@ -1016,7 +1067,7 @@ public class ApplicationConfig { /** * Get configuration file path to use. - * + * <p> * Use (in order) one of the following definition: * <ul> * <li>{@link #CONFIG_PATH} option</li> @@ -1030,7 +1081,7 @@ public class ApplicationConfig { // Concat appName to configPath option to specify context for // application deployment String appName = getOption(APP_NAME) != null ? - getOption(APP_NAME) + "" : ""; + getOption(APP_NAME) + "" : ""; String result = getOption(appName + CONFIG_PATH); @@ -1045,7 +1096,7 @@ public class ApplicationConfig { /** * Get system configuration path. - * + * <p> * Currently supported: * <ul> * <li>Windows : C:\Windows\System32</li> @@ -1105,14 +1156,14 @@ public class ApplicationConfig { /** * Get user configuration path. - * + * <p> * Currently supported: * <ul> * <li>Windows : ${user.home}\\Application Data\\</li> * <li>Max os x : ${user.home}/Library/Application Support</li> * <li>Unix : ${user.home}/.config</li> * </ul> - * + * <p> * Unix norm is based on freedesktop concept explained here : * http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html * @@ -1147,7 +1198,7 @@ public class ApplicationConfig { } else if (osName.toLowerCase().contains("mac os x")) { // ${userHome}/Library/Application Support/${applicationId} userPath = userHome + File.separator + - "/Library/Application Support"; + "/Library/Application Support"; } else { // ${userHome}/.config/ userPath = userHome + "/.config"; @@ -1186,6 +1237,7 @@ public class ApplicationConfig { /** * ajoute un objet dans le context, la classe de l'objet est utilise comme cle * + * @param o l'objet à ajouter * @since 2.4.2 */ public void putObject(Object o) { @@ -1195,6 +1247,8 @@ public class ApplicationConfig { /** * ajoute un objet dans le context, 'name' est utilise comme cle * + * @param name clef de l'option + * @param o value de l'option * @since 2.4.2 */ public void putObject(String name, Object o) { @@ -1203,10 +1257,13 @@ public class ApplicationConfig { /** * recupere un objet de la class<E>, s'il n'existe pas encore, il est cree - * (il faut donc que class<E> soit instanciable - * + * (il faut donc que class<E> soit instanciable). + * <p> * E peut prendre en argument du contruteur un objet de type ApplicationConfig * + * @param <E> le type de l'option à récupérer + * @param clazz le type de l'option à récupérer (ou créer) + * @return l'objet requis * @since 2.4.2 */ public <E> E getObject(Class<E> clazz) { @@ -1218,9 +1275,13 @@ public class ApplicationConfig { * recupere un objet ayant le nom 'name', s'il n'existe pas encore, il est * cree en utilisant la class<E>, sinon il est simplement caster vers cette * classe. - * + * <p> * E peut prendre en argument du contruteur un objet de type ApplicationConfig * + * @param <E> le type de l'option à récupérer + * @param clazz le type de l'option à récupérer (ou créer) + * @param name le nom de l'option à récupérer (ou créer) + * @return l'objet requis * @since 2.4.2 */ public <E> E getObject(Class<E> clazz, String name) { @@ -1236,8 +1297,10 @@ public class ApplicationConfig { /** * retourne une nouvelle instance d'un objet dont on recupere la la class * dans la configuration via la cle 'key'. Retourne null si la cle n'est pas - * retrouve + * retrouve. * + * @param key le nom de l'option à récupérer + * @return l'objet requis * @since 2.4.2 */ public Object getOptionAsObject(String key) { @@ -1254,9 +1317,13 @@ public class ApplicationConfig { * retourne une nouvelle instance d'un objet dont on recupere la la class * dans la configuration via la cle 'key' et le cast en E. Retourne null * si la cle n'est pas retrouve - * + * <p> * E peut prendre en argument du contruteur un objet de type ApplicationConfig * + * @param <E> le type de l'option à récupérer + * @param clazz le type de l'option à récupérer + * @param key le nom de l'option à récupérer + * @return l'objet requis * @since 2.4.2 */ public <E> E getOptionAsObject(Class<E> clazz, String key) { @@ -1268,9 +1335,11 @@ public class ApplicationConfig { * retourne l'objet instancier via la classe recupere dans la configuration * via la cle 'key'. Une fois instancie, le meme objet est toujours retourne. * On null si key n'est pas retrouve. - * + * <p> * La classe peut avoir un constructeur prenant un ApplicationConfig * + * @param key le nom de l'option à récupérer + * @return l'objet requis * @since 2.4.2 */ public Object getOptionAsSingleton(String key) { @@ -1286,9 +1355,13 @@ public class ApplicationConfig { * retourne l'objet caster en 'E', instancier via la classe recupere dans la * configuration via la cle 'key'. Une fois instancie, le meme objet est * toujours retourne. On null si key n'est pas retrouve - * + * <p> * La classe peut avoir un constructeur prenant un ApplicationConfig * + * @param <E> le type de l'option à récupérer + * @param clazz le type de l'option à récupérer + * @param key le nom de l'option à récupérer + * @return l'objet requis * @since 2.4.2 */ public <E> E getOptionAsSingleton(Class<E> clazz, String key) { @@ -1319,7 +1392,7 @@ public class ApplicationConfig { /** * get option value as string. - * + * <p> * Replace inner ${xxx} value. * * @param key the option's key @@ -1362,7 +1435,7 @@ public class ApplicationConfig { if (value != null) { // Ex : value="Thimel" result = result.substring(0, pos) + value + - result.substring(posEnd + 1); + result.substring(posEnd + 1); // Ex : result="My name is " + "Thimel" + "." pos = result.indexOf("${", pos + value.length()); // Ex : pos=-1 @@ -1379,11 +1452,9 @@ public class ApplicationConfig { } /** - * Return new ApplicationConfig with overwrite use as value for option + * @param overwrite overwrite properties + * @return new ApplicationConfig with overwrite use as value for option * if found in it. Otherwise return value found in this config - * - * @param overwrite - * @return */ public ApplicationConfig getConfig(Map<String, String> overwrite) { return new OverwriteApplicationConfig(this, overwrite); @@ -1451,7 +1522,7 @@ public class ApplicationConfig { /** * Convert value in instance of clazz or List if asList is true - * + * <p> * example: * <ul> * <li> convertOption(Boolean.class, "toto", "true,true", false) → false</li> @@ -1460,6 +1531,7 @@ public class ApplicationConfig { * <li> convertOption(Boolean.class, "toto", null, true) → []</li> * </ul> * + * @param <T> result type expected * @param clazz result type expected * @param key option key * @param value value to convert @@ -1548,7 +1620,7 @@ public class ApplicationConfig { /** * Get option value as {@link Properties}, this property must be a filepath * and file must be a properties. - * + * <p> * Returned Properties is {@link RecursiveProperties}. * * @param key the option's key @@ -1804,7 +1876,7 @@ public class ApplicationConfig { // add a listener if (log.isDebugEnabled()) { log.debug("register saveUserAction on property [" + - propertyKey + ']'); + propertyKey + ']'); } addPropertyChangeListener(propertyKey, saveUserAction); } @@ -1819,7 +1891,7 @@ public class ApplicationConfig { * Get all set method on this object or super object. * * @return map with method name without set and in lower case as key, and - * method as value + * method as value */ protected Map<String, Method> getMethods() { // looking for all methods set on ApplicationConfig @@ -1916,7 +1988,7 @@ public class ApplicationConfig { } catch (NoSuchMethodException eee) { log.debug(String.format( "Use default constructor, because no constructor" + - " with Config parameter on class %s", + " with Config parameter on class %s", clazz.getName())); o = clazz.newInstance(); } @@ -2010,7 +2082,7 @@ public class ApplicationConfig { for (URL inClasspath : urlsInClasspath) { if (log.isInfoEnabled()) { log.info("Loading configuration file (classpath) : " + - inClasspath); + inClasspath); } loadResource(inClasspath.toURI(), classpath); } @@ -2025,7 +2097,7 @@ public class ApplicationConfig { } else { if (log.isDebugEnabled()) { log.debug("No configuration file found in system : " + - etcConfig.getAbsolutePath()); + etcConfig.getAbsolutePath()); } } @@ -2038,13 +2110,13 @@ public class ApplicationConfig { if (homeConfig.exists()) { if (log.isInfoEnabled()) { log.info("Loading configuration file (home) : " + - homeConfig); + homeConfig); } loadResource(homeConfig.toURI(), homefile); } else { if (log.isDebugEnabled()) { log.debug("No configuration file found in user home : " + - homeConfig.getAbsolutePath()); + homeConfig.getAbsolutePath()); } } @@ -2058,7 +2130,7 @@ public class ApplicationConfig { } else { if (log.isDebugEnabled()) { log.debug("No configuration file found in current" + - " directory : " + config.getAbsolutePath()); + " directory : " + config.getAbsolutePath()); } } @@ -2107,7 +2179,7 @@ public class ApplicationConfig { throws IOException { if (log.isInfoEnabled()) { log.info(String.format("Moving old configuration file from %s to %s", - oldHomeConfig.getPath(), homeConfig.getPath())); + oldHomeConfig.getPath(), homeConfig.getPath())); } boolean b = oldHomeConfig.renameTo(homeConfig); @@ -2165,7 +2237,9 @@ public class ApplicationConfig { } } - /** For debugging. */ + /** + * For debugging. + */ public void printConfig() { System.out.println("-------------------Value-------------------------"); printConfig(System.out); @@ -2202,7 +2276,7 @@ public class ApplicationConfig { String msg = "Configuration:\n"; for (String key : getFlatOptions().stringPropertyNames()) { if (includePattern == null || "".equals(includePattern) - || key.matches(includePattern)) { + || key.matches(includePattern)) { String value = getOption(key); msg += String.format("\t%" + padding + "s = %s\n", key, value); } @@ -2255,9 +2329,9 @@ public class ApplicationConfig { /** * Action to save user configuration. - * + * <p> * Add it as a listener of the configuration for a given property. - * + * <p> * <b>Note:</b> Will not save if {@link #isAdjusting()} is {@code true}. * * @since 1.3 @@ -2275,8 +2349,8 @@ public class ApplicationConfig { } if (log.isDebugEnabled()) { log.debug("Saving configuration fired by property [" + - evt.getPropertyName() + "] at " + - new Date()); + evt.getPropertyName() + "] at " + + new Date()); } saveForUser(); } @@ -2324,14 +2398,18 @@ public class ApplicationConfig { /** * Item used for cacheOption * - * @param <T> + * @param <T> type of item */ protected static class CacheItem<T> { - /** typed option value */ + /** + * typed option value + */ public T item; - /** hash of string representation */ + /** + * hash of string representation + */ public int hash; public CacheItem(T item, int hash) { @@ -2356,8 +2434,8 @@ public class ApplicationConfig { protected <T> List<T> convertListOption(Class<T> type) { List<T> result = (List<T>) config.convertOption(type, key, - value, - true + value, + true ); return result; } diff --git a/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfigHelper.java b/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfigHelper.java index bce6906..23dd74e 100644 --- a/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfigHelper.java +++ b/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfigHelper.java @@ -4,7 +4,7 @@ package org.nuiton.config; * #%L * Nuiton Config :: API * %% - * Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + * Copyright (C) 2016 Code Lutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as diff --git a/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfigProvider.java b/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfigProvider.java index 406ca69..ba070fd 100644 --- a/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfigProvider.java +++ b/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfigProvider.java @@ -4,7 +4,7 @@ package org.nuiton.config; * #%L * Nuiton Config :: API * %% - * Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + * Copyright (C) 2016 Code Lutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as diff --git a/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfigSaveException.java b/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfigSaveException.java index 8427fcf..d3dd72a 100644 --- a/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfigSaveException.java +++ b/nuiton-config/src/main/java/org/nuiton/config/ApplicationConfigSaveException.java @@ -4,7 +4,7 @@ package org.nuiton.config; * #%L * Nuiton Config :: API * %% - * Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + * Copyright (C) 2016 Code Lutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as diff --git a/nuiton-config/src/main/java/org/nuiton/config/ArgumentsParserException.java b/nuiton-config/src/main/java/org/nuiton/config/ArgumentsParserException.java index 9cc2780..dbad7ee 100644 --- a/nuiton-config/src/main/java/org/nuiton/config/ArgumentsParserException.java +++ b/nuiton-config/src/main/java/org/nuiton/config/ArgumentsParserException.java @@ -4,7 +4,7 @@ package org.nuiton.config; * #%L * Nuiton Config :: API * %% - * Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + * Copyright (C) 2016 Code Lutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as diff --git a/nuiton-config/src/main/java/org/nuiton/config/ConfigActionDef.java b/nuiton-config/src/main/java/org/nuiton/config/ConfigActionDef.java index 2ce3488..87f2250 100644 --- a/nuiton-config/src/main/java/org/nuiton/config/ConfigActionDef.java +++ b/nuiton-config/src/main/java/org/nuiton/config/ConfigActionDef.java @@ -4,7 +4,7 @@ package org.nuiton.config; * #%L * Nuiton Config :: API * %% - * Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + * Copyright (C) 2016 Code Lutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as diff --git a/nuiton-config/src/main/java/org/nuiton/config/ConfigOptionDef.java b/nuiton-config/src/main/java/org/nuiton/config/ConfigOptionDef.java index e950fec..3c23c7d 100644 --- a/nuiton-config/src/main/java/org/nuiton/config/ConfigOptionDef.java +++ b/nuiton-config/src/main/java/org/nuiton/config/ConfigOptionDef.java @@ -4,7 +4,7 @@ package org.nuiton.config; * #%L * Nuiton Config :: API * %% - * Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + * Copyright (C) 2016 Code Lutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as diff --git a/nuiton-config/src/main/java/org/nuiton/config/OverwriteApplicationConfig.java b/nuiton-config/src/main/java/org/nuiton/config/OverwriteApplicationConfig.java index e6f5a64..11aa139 100644 --- a/nuiton-config/src/main/java/org/nuiton/config/OverwriteApplicationConfig.java +++ b/nuiton-config/src/main/java/org/nuiton/config/OverwriteApplicationConfig.java @@ -4,7 +4,7 @@ package org.nuiton.config; * #%L * Nuiton Config :: API * %% - * Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + * Copyright (C) 2016 Code Lutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as diff --git a/nuiton-config/src/main/java/org/nuiton/config/SubApplicationConfig.java b/nuiton-config/src/main/java/org/nuiton/config/SubApplicationConfig.java index d44f9fc..708c79c 100644 --- a/nuiton-config/src/main/java/org/nuiton/config/SubApplicationConfig.java +++ b/nuiton-config/src/main/java/org/nuiton/config/SubApplicationConfig.java @@ -4,7 +4,7 @@ package org.nuiton.config; * #%L * Nuiton Config :: API * %% - * Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + * Copyright (C) 2016 Code Lutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as diff --git a/src/site/apt/index.apt b/nuiton-config/src/site/apt/index.apt similarity index 98% copy from src/site/apt/index.apt copy to nuiton-config/src/site/apt/index.apt index bc5be79..b27d96f 100644 --- a/src/site/apt/index.apt +++ b/nuiton-config/src/site/apt/index.apt @@ -1,8 +1,8 @@ ~~~ ~~ #%L -~~ Nuiton Config +~~ Nuiton Config :: API ~~ %% -~~ Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit +~~ Copyright (C) 2016 Code Lutin, Tony Chemit ~~ %% ~~ This program is free software: you can redistribute it and/or modify ~~ it under the terms of the GNU Lesser General Public License as @@ -45,11 +45,9 @@ Note Voici quelques liens sur le nouveau projet: - * {{{http://svn.nuiton.org/svn/nuiton-config}svn}} + * {{{https://gitlab.nuiton.org/nuiton/nuiton-config}git}} - * {{{http://nuiton.org/projects/nuiton-config}forge}} - - * {{{http://maven-site.nuiton.org/nuiton-config}site}} + * {{{https://forge.nuiton.org/projects/nuiton-config}forge}} [] diff --git a/src/site/site_fr.xml b/nuiton-config/src/site/site_fr.xml similarity index 57% copy from src/site/site_fr.xml copy to nuiton-config/src/site/site_fr.xml index bb3e07c..6350b63 100644 --- a/src/site/site_fr.xml +++ b/nuiton-config/src/site/site_fr.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- #%L - Nuiton Config + Nuiton Config :: API %% - Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + Copyright (C) 2016 Code Lutin, Tony Chemit %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -31,38 +31,17 @@ <href>index.html</href> </bannerLeft> - <bannerRight> - <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src> - <href>http://www.codelutin.com</href> - </bannerRight> - <body> - <links> - <item name="Nuiton.org" href="https://forge.nuiton.org"/> - <item name="Code Lutin" href="https://www.codelutin.com"/> - <item name="Libre entreprise" href="http://www.libre-entreprise.org"/> - </links> - <breadcrumbs> - <item name="${project.name}" href="${project.url}/index.html"/> - <item name="${project.version}" href="${project.url}/v/${siteDeployClassifier}/index.html"/> + <item name="${project.name}" href="./index.html"/> </breadcrumbs> + <menu ref="parent"/> <menu name="Utilisateur"> <item name="Accueil" href="index.html"/> - <item name="Note de versions" href="versions.html"/> </menu> - - <menu ref="modules"/> <menu ref="reports"/> - <footer> - <div id='mavenProjectProperties' locale='fr' - projectId='${project.projectId}' - version='${project.siteDeployClassifier}' - sourcesType='${project.siteSourcesType}'/> - </footer> - </body> </project> diff --git a/nuiton-config/src/test/java/org/nuiton/config/ApplicationConfigTest.java b/nuiton-config/src/test/java/org/nuiton/config/ApplicationConfigTest.java index 0efc9bb..2a2b120 100644 --- a/nuiton-config/src/test/java/org/nuiton/config/ApplicationConfigTest.java +++ b/nuiton-config/src/test/java/org/nuiton/config/ApplicationConfigTest.java @@ -4,7 +4,7 @@ package org.nuiton.config; * #%L * Nuiton Config :: API * %% - * Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + * Copyright (C) 2016 Code Lutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as @@ -424,7 +424,7 @@ public class ApplicationConfigTest { * Test that system properties such as ${user.home}, ${user.name} are * replaced. * - * @throws ArgumentsParserException + * @throws ArgumentsParserException if could not parse configuration */ @Test public void testSystemProperties() throws ArgumentsParserException { @@ -454,7 +454,7 @@ public class ApplicationConfigTest { /** * test if dot is replaced with _ if properties is not found with dot in env * - * @throws ArgumentsParserException + * @throws ArgumentsParserException if could not parse configuration */ @Test @Ignore @@ -505,13 +505,6 @@ public class ApplicationConfigTest { instance.getFlatOptions(false).getProperty("user.fullname")); } - /** - * Test null options. - * - * TODO EC20100503 this test throw a huge exception - * - * @throws Exception - */ @Test public void getNullOptions() throws Exception { ApplicationConfig instance = new ApplicationConfig(); @@ -536,13 +529,8 @@ public class ApplicationConfigTest { Assert.assertNull(instance.getOptionAsVersion("dfsdfgqsgqfg")); } - /** - * Test on printConfig output. - * - * @throws ArgumentsParserException - * @throws UnsupportedEncodingException - */ - public void testxx() throws ArgumentsParserException, UnsupportedEncodingException { + @Test + public void testPrintConfig() throws ArgumentsParserException, UnsupportedEncodingException { ApplicationConfig instance = new ApplicationConfig(); instance.parse(); instance.setOption("toto", "tata"); diff --git a/nuiton-config/src/test/java/org/nuiton/config/ChangeApplicationNameTest.java b/nuiton-config/src/test/java/org/nuiton/config/ChangeApplicationNameTest.java index cbb4b33..1a9019f 100644 --- a/nuiton-config/src/test/java/org/nuiton/config/ChangeApplicationNameTest.java +++ b/nuiton-config/src/test/java/org/nuiton/config/ChangeApplicationNameTest.java @@ -4,7 +4,7 @@ package org.nuiton.config; * #%L * Nuiton Config :: API * %% - * Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + * Copyright (C) 2016 Code Lutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as diff --git a/nuiton-config/src/test/resources/log4j.properties b/nuiton-config/src/test/resources/log4j.properties index 0452a29..e5491ba 100644 --- a/nuiton-config/src/test/resources/log4j.properties +++ b/nuiton-config/src/test/resources/log4j.properties @@ -2,7 +2,7 @@ # #%L # Nuiton Config :: API # %% -# Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit +# Copyright (C) 2016 Code Lutin, Tony Chemit # %% # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as diff --git a/nuiton-config/src/test/resources/wao.properties b/nuiton-config/src/test/resources/wao.properties index e954b17..e63c484 100644 --- a/nuiton-config/src/test/resources/wao.properties +++ b/nuiton-config/src/test/resources/wao.properties @@ -2,7 +2,7 @@ # #%L # Nuiton Config :: API # %% -# Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit +# Copyright (C) 2016 Code Lutin, Tony Chemit # %% # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as diff --git a/src/site/apt/index.apt b/src/site/apt/index.apt index bc5be79..69320ed 100644 --- a/src/site/apt/index.apt +++ b/src/site/apt/index.apt @@ -2,7 +2,7 @@ ~~ #%L ~~ Nuiton Config ~~ %% -~~ Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit +~~ Copyright (C) 2016 Code Lutin, Tony Chemit ~~ %% ~~ This program is free software: you can redistribute it and/or modify ~~ it under the terms of the GNU Lesser General Public License as @@ -20,374 +20,20 @@ ~~ #L% ~~~ ---- - Nuiton config + Nuiton Config Project ---- ---- - 2009-08-23 + 2016-09-30 ---- Présentation - La classe ApplicationConfig a pour but de gérer les options et actions - disponibles au sein d'une application. Elle gère aussi bien : + Le projet <<nuiton-config>> propose : - * la lecture de fichier de configuration ; + * une api simple de gestion de configuration (voir {{{./nuiton-config/index.html}module API}}) ; - * le parsage de la ligne de commande ; + * un plugin maven pour générer la configuration et une documentation (voir {{{./nuiton-config-maven-plugin/index.html}module Maven}}) ; - * l'execution des actions ; + * un projet exemple qui utilise <<nuiton-config>> (voir {{{./nuiton-config-example/index.html} module Exemple}}). - * la sauvegarde de la configuration. - -Note - - <<Nuiton-config>> quitte le projet <nuiton-utils> pour devenir un projet autonome. - - Voici quelques liens sur le nouveau projet: - - * {{{http://svn.nuiton.org/svn/nuiton-config}svn}} - - * {{{http://nuiton.org/projects/nuiton-config}forge}} - - * {{{http://maven-site.nuiton.org/nuiton-config}site}} - - [] - - A noter que le GAV de l'artefact ne change pas (<org.nuiton:nuiton-config>). - - La dernière version stable dans nuiton-utils est la 2.7; vous pouvez dès à - présent utiliser la version 3.0-alpha-1 de nuiton-config. - - Pour plus de détails sur les changements importants entre chaque version, - vous pouvez consulter les {{{./versions.html}Notes de versions}}. - -Lecture/écriture - -* Lecture des fichiers de configuration - - La lecture des fichiers de configuration est effectuée lors de l'appel - à la methode <<<parse(String...)>>> en utilisant la valeur de - <<<getConfigFileName()>>> pour trouver les fichiers à lire. - -* La sauvegarde - - La sauvegarde des options se fait via une des trois methodes disponibles : - - * <<<save>>> : sauvegarde dans un fichier specifique ; - - * <<<saveForSystem>>> : sauvegarde les donnees dans /etc ; - - * <<<saveForUser>>> : sauvegarde les donnees dans $HOME. - - [] - - Seules les options qui ont été modifiées par l'application (par la methode - <<<setOption()>>>) seront sauvegardées. Les variables d'environnement, les - arguments de la ligne de commandes(etc...) ne seront pas sauvegardés. - -* Configuration multi instance - - Il est possible d'associer un nom de contexte à une configuration via la - methode <<<setAppName("azerty")>>>. Ainsi, les fichiers seront cherchés - dans le dossier défini par l'option <<<azerty.config.path>>> si elle existe - (sinon, dans le dossier par défaut) et le nom du fichier cherché defini - par l'option <<<azerty.config.file>>>. - - Cette option est utilisée par exemple pour installer plusieurs instances - d'application dans un serveur web et que chaque instance aille - chercher ses fichiers de configuration à son propre endroit. - -Fonctionnalités - -* Les options de configuration - - L'ordre de prise en compte des options est le suivant : - - * Option renseignée par programmation ; - - * Ligne de commande ; - - * Propriétés système (System.getProperties()) ; - - * Propriétés d'environnement (System.getenv()) ; - - * Fichier du dossier courant ( ./ + nom du fichier) ; - - * Fichier de configuration globale ( /etc/ + nom du fichier) ; - - * Fichier dans le classpath ( / + nom du fichier) ; - - * Valeur par défaut (renseignée à l'init). - - [] - - Cela signifie par exemple que si une option a une valeur par défaut et qu'elle - est renseignée dans le fichier /etc et sur la ligne de commande, c'est la - valeur présente sur la ligne de commande qui sera prise en compte. - -* Les actions - - Les actions ne peuvent être renseignées que sur la ligne de commande. Exemple : - -+------------------------------------------------ ---org.nuiton.test.Test#doLogin user password true -+------------------------------------------------ - - Une action est donc définie par le chemin complet de la methode qui traitera - l'action. Si la methode est statique, elle sera appelée directement. Dans le - cas contraire, la classe contenant la méthode sera instanciée à partir - d'un constructeur prenant en paramètre seulement la configuration, ou, s'il - n'est pas disponible, le constructeur par défaut. La méthode sera ensuite - appelée sur cette instance. Les diverses instances sont conservées pour - effectuer plusieurs actions. - - Les arguments de la méthode utilisés lors de l'appel sont convertis - dans le bon type. Si la méthode a des arguments de taille variante (...) - tous les arguments jusqu'à la prochaine option ou à la fin de la ligne - seront utilisés. - - Si vous avez des paramètres optionnels, le seul moyen est d'utiliser des - arguments variants. - - Par exemple, la ligne de commande précédente appelera la methode : - -+------------------------------------------- -public class Test { - public doLogin(String login, String password, boolean dryRun) { - [...] - } -} -+------------------------------------------- - - Les actions ne sont pas executées, mais seulement parsées. Cela signifie - qu'elles seront executées seulement lorsque l'application appelera la méthode - <<<doAction(int)>>>. - Par défaut, toutes les actions sont de niveau 0 et sont executées dans leur - ordre d'apparition sur la ligne de commande. - Il est possible de différencier les différentes actions en utilisant - l'annotation <<<@Step>>> - -+------------------------------------------- -doAction(0); -... do something ... -doAction(1); -+------------------------------------------- - - Dans cet exemple, les actions 0 et 1 ne sont pas effectuées au même moment. - C'est très utile par exemple pour éxecuter certaines actions avant le démarrage - de l'UI par exemple, et d'autres après... - -* Les arguments non parsés - - La configuration 'consomme' les arguments de la ligne de commande qu'elle a - réussie à traiter. Pour recupérer les autres arguments propres à l'application - il est possible de les obtenir grace à la méthode <<<getUnparsed()>>>. - Si l'on souhaite forcer la fin du parsing de la ligne de commande il est - possible de mettre <<<-->>>. - - Par exemple, la ligne suivante : - -+------------------------------------------- -monApplication "mon arg" --option k1 v1 -- --option k2 v2 -- autre -+------------------------------------------- - - Renverra la liste suivante via <<<getUnparsed()>>> : - -+------------------------------------------- -"mon arg", "--option", "k2", "v2", "--", "autre" -+------------------------------------------- - -* Les alias - - Il est possible d'utiliser des alias pour definir les options et les actions. - Ces alias doivent être renseignés par la methode <<<addAlias(String, String>>>: - -+------------------------------------------- -addAlias("-v", "--option", "verbose", "true"); -addAlias("-o", "--option", "outputfile"); -addAlias("-i", "--mon.package.MaClass#MaMethode", "import"); -+------------------------------------------- - - Dans le premier exemple on simplifie une option de flags l'option -v n'attend - donc plus d'argument. Dans le second exemple on simplifie une option qui - attend encore un argment de type File. Enfin dans le troisieme exemple - on simplifie la syntaxe d'une action et on force le premier argument de - l'action à être "import". - - Lors du parsing de la ligne de commande, tous les alias sont remplacés par - leur correspondance. Il est donc possible d'utiliser ce mecanisme pour - autre chose : - -+------------------------------------------- -addAlias("cl", "Code Lutin"); -+------------------------------------------- - - -* Conversion de type - - Pour convertir les types des options et arguments de méthodes, - {{{http://commons.apache.org/beanutils/}commons-beanutils}} est utilisé. - - Les types actuellement supporté sont : - - * <<<java.lang.String>>> ; - - * <<<java.io.File>>> ; - - * <<<java.net.URL>>> ; - - * <<<java.lang.Class>>> ; - - * <<<java.sql.Date>>> ; - - * <<<java.sql.Time>>> ; - - * <<<java.sql.Timestamp>>> ; - - * Les tableaux d'un type primitif ou {@link String}. Chaque élément doit - être séparé par une virgule. - - [] - - Pour utiliser d'autres types, il suffit de les enregistrer dans beanutils via - la méthode <<<ConvertUtils.register(Converter, Class)>>> - -* Les substitutions de variable - - La configuration de variable supporte la substitution par d'autres variables - via la syntaxe <<<$\{xxx\}>>> où <<<xxx>>> est une autre variable de - la configuration. - - Par exemple (fichier de configuration) : - -+------------------------------------------- -application.name = Mon Appli -application.version = 1.2.3 -application.info = ${application.name} ${application.version} (${java.version}) -+------------------------------------------- - - L'appel de l'option <<<application.info>>> via la methode <<<getOption()>>> - retournera une chaîne de la forme : - -+------------------------------------------- -Mon Appli 1.2.3 (1.6.0_18) -+------------------------------------------- - - À noter que les substitutions ne sont remplacées qu'a leur lecture, la sauvegarde - de l'option <<<application.info>>> se fera sans remplacement. - -Mise en oeuvre - -* Définition - - Voici l'ensemble des tâches à effectuer pour définir une configuration - d'application : - - * Creation d'une sous classe d'<<<ApplicationConfig>>> ; - - * Ajout des options par défaut ; - - * Création des classes et méthodes d'actions ; - - * Déclaration des alias des options et actions. - - [] - - Exemple : - -+------------------------------------------- -public class MyConfig extends ApplicationConfig { - - public static final int AFTER_LOGIN = 1; - - public MyConfig () { - // options par défaut - setDefaultOption("user", "anonymous"); - setDefaultOption("password", ""); - // ajout des alias - addAlias("-u", "--user"); - addAlias("-p", "--password"); - addActionAlias("--login", MyConfig.class.getName + "#" + "doLogin"); - } - - public void setUser(String user) { - setOption("user", user); - } - - public void setUser(String user) { - setOption("user", user); - } - - public void doLogin(String user, String password) { - [...] - } - - @Step(AFTER_LOGIN) - public void doSomething() { - [...] - } -} -+------------------------------------------- - -* Usage - - La configuration doit principalement être initilalisée grâce à la méthode - <<<parse(String[])>>> avant d'être utilisée. - -+------------------------------------------- -public static void main(String[] args) { - MyConfig config = new MyConfig(); - config.setConfigFileName("myconfig.conf"); - config.parse(args); - - System.out.println("Connecting with " : + config.getOption("user")); - config.doAction(0); - System.out.println("Connected, do something..."); - config.doAction(MyConfig.AFTER_LOGIN); -} -+------------------------------------------- - -* Utilisation du ApplicationConfigProvider - - Ce contrat ajouté en version <2.4.8> permet de spécifier qu'une librairie - ou une application offre des options. - - Il suffit d'implanter ce contrat et de le rendre disponible via le mécanisme - de ServiceLoader. - -** Exemple - -+------------------------------------------- -public class PollenApplicationConfigProvider implements ApplicationConfigProvider { - - @Override - public String getName() { - return "pollen"; - } - - @Override - public String getDescription(Locale locale) { - return l_(locale, "pollen.application.config"); - } - - @Override - public ConfigOptionDef[] getOptions() { - return PollenConfigurationOption.values(); - } - - @Override - public ActionOptionDef[] getActions() { - return new ActionOptionDef[0]; - } -} -+------------------------------------------- - - Puis ajouter le fichier <META-INF/services/org.nuiton.config.ApplicationConfigProvider> - dans les resources du projet : - -+------------------------------------------- -org.chorem.pollen.PollenApplicationConfigProvider -+------------------------------------------- - - Cela permet ensuite, par exemple, de générer un rapport contenant toutes les - options disponibles dans l'application. + [] diff --git a/src/site/apt/versions.apt b/src/site/apt/versions.apt index f26e249..3da4674 100644 --- a/src/site/apt/versions.apt +++ b/src/site/apt/versions.apt @@ -2,7 +2,7 @@ ~~ #%L ~~ Nuiton Config ~~ %% -~~ Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit +~~ Copyright (C) 2016 Code Lutin, Tony Chemit ~~ %% ~~ This program is free software: you can redistribute it and/or modify ~~ it under the terms of the GNU Lesser General Public License as diff --git a/src/site/site_fr.xml b/src/site/site_fr.xml index bb3e07c..330ca1a 100644 --- a/src/site/site_fr.xml +++ b/src/site/site_fr.xml @@ -3,7 +3,7 @@ #%L Nuiton Config %% - Copyright (C) 2013 - 2016 Code Lutin, Tony Chemit + Copyright (C) 2016 Code Lutin, Tony Chemit %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -46,7 +46,7 @@ <breadcrumbs> <item name="${project.name}" href="${project.url}/index.html"/> - <item name="${project.version}" href="${project.url}/v/${siteDeployClassifier}/index.html"/> + <item name="${project.version}" href="${project.url}/v/${project.siteDeployClassifier}/index.html"/> </breadcrumbs> <menu name="Utilisateur"> -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.