improved javadoc

This commit is contained in:
Hervé Boutemy 2015-02-15 20:56:54 +01:00
parent 7c7bf4dfef
commit c28348024a
2 changed files with 18 additions and 6 deletions

View File

@ -40,14 +40,21 @@ public interface ToolchainManager
String ROLE = ToolchainManager.class.getName(); String ROLE = ToolchainManager.class.getName();
/** /**
* to be used from plugins capable of working with toolchains. * Retrieve toolchain of specified type from build context. It is expected that
* <code>maven-toolchains-plugin</code> contains the configuration to select the appropriate
* toolchain and is executed at the beginning of the build.
*
* @param session the Maven session, must not be {@code null}
* @param type the type, must not be {@code null}
* @return the toolchain selected by <code>maven-toolchains-plugin</code>
*/ */
Toolchain getToolchainFromBuildContext( String type, MavenSession context ); Toolchain getToolchainFromBuildContext( String type, MavenSession context );
/** /**
* Select all toolchains matching the type and requirements * Select all toolchains available in user settings matching the type and requirements,
* independently from <code>maven-toolchains-plugin</code>.
* *
* @param session the maven session, must not be {@code null} * @param session the Maven session, must not be {@code null}
* @param type the type, must not be {@code null} * @param type the type, must not be {@code null}
* @param requirements the requirements, may be {@code null} * @param requirements the requirements, may be {@code null}
* @return the matching toolchains, never {@code null} * @return the matching toolchains, never {@code null}

View File

@ -21,18 +21,22 @@ package org.apache.maven.toolchain;
import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.MavenSession;
/** /**
* Component for use by the <code>maven-toolchains-plugin</code> only. * Component for use by the <code>maven-toolchains-plugin</code> only.
* It provides API: <ol>
* <li>to retrieve every toolchains available in user settings,</li>
* <li>to store chosen toolchain into build context for later use by toolchain-aware plugins.</li>
* </ol>
* *
* @author mkleint * @author mkleint
* @since 2.0.9 * @since 2.0.9
* @see ToolchainManager#getToolchainFromBuildContext(String, MavenSession)
*/ */
public interface ToolchainManagerPrivate public interface ToolchainManagerPrivate
{ {
/** /**
* Retrieves the toolchains of given type from the user settings. * Retrieves every toolchains of given type available in user settings.
* *
* @param type the type, must not be {@code null} * @param type the type, must not be {@code null}
* @param context the Maven session, must not be {@code null} * @param context the Maven session, must not be {@code null}
@ -42,11 +46,12 @@ public interface ToolchainManagerPrivate
throws MisconfiguredToolchainException; throws MisconfiguredToolchainException;
/** /**
* Stores the toolchain into build context. * Stores the toolchain into build context for later use by toolchain-aware plugins.
* *
* @param toolchain the toolchain to store, must not be {@code null} * @param toolchain the toolchain to store, must not be {@code null}
* @param context the Maven session, must not be {@code null} * @param context the Maven session, must not be {@code null}
* @since 2.0.9 * @since 2.0.9
* @see ToolchainManager#getToolchainFromBuildContext(String, MavenSession)
*/ */
void storeToolchainToBuildContext( ToolchainPrivate toolchain, MavenSession context ); void storeToolchainToBuildContext( ToolchainPrivate toolchain, MavenSession context );