Cleaned up Javadocs
This commit is contained in:
parent
bbc0a92d23
commit
87bfac676d
10 changed files with 290 additions and 20 deletions
204
.idea/intellij-javadocs-4.0.1.xml
generated
Normal file
204
.idea/intellij-javadocs-4.0.1.xml
generated
Normal file
|
@ -0,0 +1,204 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaDocConfiguration">
|
||||
<GENERAL>
|
||||
<MODE>UPDATE</MODE>
|
||||
<OVERRIDDEN_METHODS>false</OVERRIDDEN_METHODS>
|
||||
<SPLITTED_CLASS_NAME>true</SPLITTED_CLASS_NAME>
|
||||
<LEVELS>
|
||||
<LEVEL>METHOD</LEVEL>
|
||||
<LEVEL>FIELD</LEVEL>
|
||||
<LEVEL>TYPE</LEVEL>
|
||||
</LEVELS>
|
||||
<VISIBILITIES>
|
||||
<VISIBILITY>PUBLIC</VISIBILITY>
|
||||
<VISIBILITY>DEFAULT</VISIBILITY>
|
||||
<VISIBILITY>PROTECTED</VISIBILITY>
|
||||
</VISIBILITIES>
|
||||
</GENERAL>
|
||||
<TEMPLATES>
|
||||
<CLASSES>
|
||||
<CLASS>
|
||||
<KEY>^.*(public|protected|private)*.+interface\s+\w+.*</KEY>
|
||||
<VALUE>/**\n
|
||||
* The interface ${name}.\n
|
||||
<#if element.typeParameters?has_content> * \n
|
||||
</#if>
|
||||
<#list element.typeParameters as typeParameter>
|
||||
* @param <${typeParameter.name}> the type parameter\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</CLASS>
|
||||
<CLASS>
|
||||
<KEY>^.*(public|protected|private)*.+enum\s+\w+.*</KEY>
|
||||
<VALUE>/**\n
|
||||
* The enum ${name}.\n
|
||||
*/</VALUE>
|
||||
</CLASS>
|
||||
<CLASS>
|
||||
<KEY>^.*(public|protected|private)*.+class\s+\w+.*</KEY>
|
||||
<VALUE>/**\n
|
||||
* The type ${name}.\n
|
||||
<#if element.typeParameters?has_content> * \n
|
||||
</#if>
|
||||
<#list element.typeParameters as typeParameter>
|
||||
* @param <${typeParameter.name}> the type parameter\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</CLASS>
|
||||
<CLASS>
|
||||
<KEY>.+</KEY>
|
||||
<VALUE>/**\n
|
||||
* The type ${name}.\n
|
||||
*/</VALUE>
|
||||
</CLASS>
|
||||
</CLASSES>
|
||||
<CONSTRUCTORS>
|
||||
<CONSTRUCTOR>
|
||||
<KEY>.+</KEY>
|
||||
<VALUE>/**\n
|
||||
* Instantiates a new ${name}.\n
|
||||
<#if element.parameterList.parameters?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.parameterList.parameters as parameter>
|
||||
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||
</#list>
|
||||
<#if element.throwsList.referenceElements?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.throwsList.referenceElements as exception>
|
||||
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</CONSTRUCTOR>
|
||||
</CONSTRUCTORS>
|
||||
<METHODS>
|
||||
<METHOD>
|
||||
<KEY>^.*(public|protected|private)*\s*.*(\w(\s*<.+>)*)+\s+get\w+\s*\(.*\).+</KEY>
|
||||
<VALUE>/**\n
|
||||
* Gets ${partName}.\n
|
||||
<#if element.typeParameters?has_content> * \n
|
||||
</#if>
|
||||
<#list element.typeParameters as typeParameter>
|
||||
* @param <${typeParameter.name}> the type parameter\n
|
||||
</#list>
|
||||
<#if element.parameterList.parameters?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.parameterList.parameters as parameter>
|
||||
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||
</#list>
|
||||
<#if isNotVoid>
|
||||
*\n
|
||||
* @return the ${partName}\n
|
||||
</#if>
|
||||
<#if element.throwsList.referenceElements?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.throwsList.referenceElements as exception>
|
||||
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</METHOD>
|
||||
<METHOD>
|
||||
<KEY>^.*(public|protected|private)*\s*.*(void|\w(\s*<.+>)*)+\s+set\w+\s*\(.*\).+</KEY>
|
||||
<VALUE>/**\n
|
||||
* Sets ${partName}.\n
|
||||
<#if element.typeParameters?has_content> * \n
|
||||
</#if>
|
||||
<#list element.typeParameters as typeParameter>
|
||||
* @param <${typeParameter.name}> the type parameter\n
|
||||
</#list>
|
||||
<#if element.parameterList.parameters?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.parameterList.parameters as parameter>
|
||||
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||
</#list>
|
||||
<#if isNotVoid>
|
||||
*\n
|
||||
* @return the ${partName}\n
|
||||
</#if>
|
||||
<#if element.throwsList.referenceElements?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.throwsList.referenceElements as exception>
|
||||
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</METHOD>
|
||||
<METHOD>
|
||||
<KEY>^.*((public\s+static)|(static\s+public))\s+void\s+main\s*\(\s*String\s*(\[\s*\]|\.\.\.)\s+\w+\s*\).+</KEY>
|
||||
<VALUE>/**\n
|
||||
* The entry point of application.\n
|
||||
|
||||
<#if element.parameterList.parameters?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
* @param ${element.parameterList.parameters[0].name} the input arguments\n
|
||||
<#if element.throwsList.referenceElements?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.throwsList.referenceElements as exception>
|
||||
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</METHOD>
|
||||
<METHOD>
|
||||
<KEY>.+</KEY>
|
||||
<VALUE>/**\n
|
||||
* ${name}<#if isNotVoid> ${return}</#if>.\n
|
||||
<#if element.typeParameters?has_content> * \n
|
||||
</#if>
|
||||
<#list element.typeParameters as typeParameter>
|
||||
* @param <${typeParameter.name}> the type parameter\n
|
||||
</#list>
|
||||
<#if element.parameterList.parameters?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.parameterList.parameters as parameter>
|
||||
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||
</#list>
|
||||
<#if isNotVoid>
|
||||
*\n
|
||||
* @return the ${return}\n
|
||||
</#if>
|
||||
<#if element.throwsList.referenceElements?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.throwsList.referenceElements as exception>
|
||||
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</METHOD>
|
||||
</METHODS>
|
||||
<FIELDS>
|
||||
<FIELD>
|
||||
<KEY>^.*(public|protected|private)*.+static.*(\w\s\w)+.+</KEY>
|
||||
<VALUE>/**\n
|
||||
* The constant ${element.getName()}.\n
|
||||
*/</VALUE>
|
||||
</FIELD>
|
||||
<FIELD>
|
||||
<KEY>^.*(public|protected|private)*.*(\w\s\w)+.+</KEY>
|
||||
<VALUE>/**\n
|
||||
<#if element.parent.isInterface()>
|
||||
* The constant ${element.getName()}.\n
|
||||
<#else>
|
||||
* The ${name}.\n
|
||||
</#if> */</VALUE>
|
||||
</FIELD>
|
||||
<FIELD>
|
||||
<KEY>.+</KEY>
|
||||
<VALUE>/**\n
|
||||
<#if element.parent.isEnum()>
|
||||
*${name} ${typeName}.\n
|
||||
<#else>
|
||||
* The ${name}.\n
|
||||
</#if>*/</VALUE>
|
||||
</FIELD>
|
||||
</FIELDS>
|
||||
</TEMPLATES>
|
||||
</component>
|
||||
</project>
|
1
.idea/libraries/bld.xml
generated
1
.idea/libraries/bld.xml
generated
|
@ -6,6 +6,7 @@
|
|||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5-sources.jar!/" />
|
||||
</SOURCES>
|
||||
<excluded>
|
||||
|
|
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
|
@ -29,6 +29,7 @@
|
|||
<pattern value="rife.bld.extension.JacocoReportOperation" method="writeReports" />
|
||||
<pattern value="rife.bld.extension.JacocoReportOperationBuild" method="pmd" />
|
||||
<pattern value="rife.bld.extension.JacocoReportOperation" method="destFile" />
|
||||
<pattern value="rife.bld.extension.JacocoReportOperation" method="isNotBlank" />
|
||||
</component>
|
||||
<component name="PDMPlugin">
|
||||
<option name="customRuleSets">
|
||||
|
@ -39,6 +40,7 @@
|
|||
<option value="$PROJECT_DIR$/../bld-exec/config/pmd.xml" />
|
||||
<option value="$PROJECT_DIR$/../bld-testng/config/pmd.xml" />
|
||||
<option value="$PROJECT_DIR$/../bld-pitest/config/pmd.xml" />
|
||||
<option value="$PROJECT_DIR$/../bld-generated-version/config/pmd.xml" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="skipTestSources" value="false" />
|
||||
|
|
|
@ -21,7 +21,7 @@ public void jacoco() throws IOException {
|
|||
}
|
||||
```
|
||||
|
||||
```text
|
||||
```console
|
||||
./bld compile jacoco
|
||||
```
|
||||
|
||||
|
|
1
examples/.idea/libraries/bld.xml
generated
1
examples/.idea/libraries/bld.xml
generated
|
@ -6,6 +6,7 @@
|
|||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5-sources.jar!/" />
|
||||
</SOURCES>
|
||||
<excluded>
|
||||
|
|
6
examples/README.md
Normal file
6
examples/README.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Compile and Generate JaCoCo Reports
|
||||
|
||||
```console
|
||||
./bld compile jacoco
|
||||
```
|
||||
|
|
@ -20,13 +20,14 @@ public class ExamplesBuild extends Project {
|
|||
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
|
||||
|
||||
scope(test)
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 0)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 0)));
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1)));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new ExamplesBuild().start(args);
|
||||
}
|
||||
|
||||
@BuildCommand(summary = "Generates Jacoco Reports")
|
||||
public void jacoco() throws IOException {
|
||||
new JacocoReportOperation()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
bld.downloadExtensionJavadoc=false
|
||||
bld.downloadExtensionSources=true
|
||||
bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.3
|
||||
bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.4
|
||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||
bld.downloadLocation=
|
||||
bld.version=1.7.5
|
||||
|
|
|
@ -48,8 +48,8 @@ public class JacocoReportOperationBuild extends Project {
|
|||
scope(runtime)
|
||||
.include(dependency("org.jacoco", "jacoco", jacocoVersion).exclude("*", "org.jacoco.doc"));
|
||||
scope(test)
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 0)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 0)))
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1)))
|
||||
.include(dependency("org.assertj", "assertj-core", version(3, 24, 2)));
|
||||
|
||||
javadocOperation()
|
||||
|
@ -66,13 +66,23 @@ public class JacocoReportOperationBuild extends Project {
|
|||
.artifactId("bld-jacoco-report")
|
||||
.description("bld Extension to Generate JaCoCo Code Coverage Reports")
|
||||
.url("https://github.com/rife2/bld-pmd")
|
||||
.developer(new PublishDeveloper().id("ethauvin").name("Erik C. Thauvin").email("erik@thauvin.net")
|
||||
.url("https://erik.thauvin.net/"))
|
||||
.license(new PublishLicense().name("The Apache License, Version 2.0")
|
||||
.url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
|
||||
.scm(new PublishScm().connection("scm:git:https://github.com/rife2/bld-pmd.git")
|
||||
.developer(
|
||||
new PublishDeveloper()
|
||||
.id("ethauvin")
|
||||
.name("Erik C. Thauvin")
|
||||
.email("erik@thauvin.net")
|
||||
.url("https://erik.thauvin.net/")
|
||||
)
|
||||
.license(
|
||||
new PublishLicense()
|
||||
.name("The Apache License, Version 2.0")
|
||||
.url("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||
)
|
||||
.scm(
|
||||
new PublishScm().connection("scm:git:https://github.com/rife2/bld-pmd.git")
|
||||
.developerConnection("scm:git:git@github.com:rife2/bld-pmd.git")
|
||||
.url("https://github.com/rife2/bld-pmd"))
|
||||
.url("https://github.com/rife2/bld-pmd")
|
||||
)
|
||||
.signKey(property("sign.key"))
|
||||
.signPassphrase(property("sign.passphrase"));
|
||||
}
|
||||
|
|
|
@ -111,7 +111,10 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the locations of Java class files.
|
||||
**/
|
||||
*
|
||||
* @param classFiles the class files
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation classFiles(File... classFiles) {
|
||||
this.classFiles.addAll(List.of(classFiles));
|
||||
return this;
|
||||
|
@ -119,7 +122,10 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the locations of Java class files.
|
||||
**/
|
||||
*
|
||||
* @param classFiles the class files
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation classFiles(Collection<File> classFiles) {
|
||||
this.classFiles.addAll(classFiles);
|
||||
return this;
|
||||
|
@ -127,6 +133,9 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the location of the CSV report.
|
||||
*
|
||||
* @param cvs the report location
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation csv(File cvs) {
|
||||
this.csv = cvs;
|
||||
|
@ -135,6 +144,9 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the file to write execution data to.
|
||||
*
|
||||
* @param destFile the file
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation destFile(File destFile) {
|
||||
this.destFile = destFile;
|
||||
|
@ -143,6 +155,9 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the source file encoding. The platform encoding is used by default.
|
||||
*
|
||||
* @param encoding the encoding
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation encoding(String encoding) {
|
||||
this.encoding = encoding;
|
||||
|
@ -151,6 +166,9 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the locations of the JaCoCo *.exec files to read.
|
||||
*
|
||||
* @param execFiles the exec files
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation execFiles(File... execFiles) {
|
||||
this.execFiles.addAll(List.of(execFiles));
|
||||
|
@ -159,6 +177,9 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the locations of the JaCoCo *.exec files to read.
|
||||
*
|
||||
* @param execFiles the exec files
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation execFiles(Collection<File> execFiles) {
|
||||
this.execFiles.addAll(execFiles);
|
||||
|
@ -238,6 +259,9 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Configure the operation from a {@link BaseProject}.
|
||||
*
|
||||
* @param project the project
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation fromProject(BaseProject project) {
|
||||
this.project = project;
|
||||
|
@ -246,6 +270,9 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the location of the HTML report.
|
||||
*
|
||||
* @param html the html
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation html(File html) {
|
||||
this.html = html;
|
||||
|
@ -270,6 +297,9 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the name used for the report.
|
||||
*
|
||||
* @param name the name
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation name(String name) {
|
||||
this.name = name;
|
||||
|
@ -278,6 +308,9 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Suppresses all output.
|
||||
*
|
||||
* @param quiet {@code true} or {@code false}
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation quiet(boolean quiet) {
|
||||
this.quiet = quiet;
|
||||
|
@ -307,7 +340,10 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the locations of the source files. (e.g., {@code src/main/java})
|
||||
**/
|
||||
*
|
||||
* @param sourceFiles the source files
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation sourceFiles(File... sourceFiles) {
|
||||
this.sourceFiles.addAll(List.of(sourceFiles));
|
||||
return this;
|
||||
|
@ -315,7 +351,10 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the locations of the source files. (e.g., {@code src/main/java})
|
||||
**/
|
||||
*
|
||||
* @param sourceFiles the source files
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation sourceFiles(Collection<File> sourceFiles) {
|
||||
this.sourceFiles.addAll(sourceFiles);
|
||||
return this;
|
||||
|
@ -332,6 +371,9 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the tab stop width for the source pages. Default is {@code 4}.
|
||||
*
|
||||
* @param tabWidth the tab width
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation tabWidth(int tabWidth) {
|
||||
this.tabWidth = tabWidth;
|
||||
|
@ -358,6 +400,9 @@ public class JacocoReportOperation extends AbstractOperation<JacocoReportOperati
|
|||
|
||||
/**
|
||||
* Sets the location of the XML report.
|
||||
*
|
||||
* @param xml the report location
|
||||
* @return this operation instance
|
||||
*/
|
||||
public JacocoReportOperation xml(File xml) {
|
||||
this.xml = xml;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue