You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2016/03/15 00:20:07 UTC
[2/5] karaf git commit: KARAF-4392 - Upgrade to maven-javadoc-plugin
2.10.3 and clean javadoc comments
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/handler/EventAdminImpl.java
----------------------------------------------------------------------
diff --git a/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/handler/EventAdminImpl.java b/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/handler/EventAdminImpl.java
index 4c07349..6ac5f53 100644
--- a/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/handler/EventAdminImpl.java
+++ b/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/handler/EventAdminImpl.java
@@ -63,10 +63,17 @@ public class EventAdminImpl implements EventAdmin
private boolean addSubject;
/**
- * The constructor of the <tt>EventAdmin</tt> implementation.
+ * The constructor of the <code>EventAdmin</code> implementation.
*
- * @param syncPool The synchronous thread pool
- * @param asyncPool The asynchronous thread pool
+ * @param bundleContext The bundle context to use.
+ * @param syncPool The synchronous thread pool.
+ * @param asyncPool The asynchronous thread pool.
+ * @param timeout The thread execution timeout.
+ * @param ignoreTimeout The thread ignore timeout.
+ * @param requireTopic True to define the topic as required, false else.
+ * @param ignoreTopics The array of topics to ignore.
+ * @param addTimestamp True to add timestamp to the event, false else.
+ * @param addSubject True to add subject to the event, false else.
*/
public EventAdminImpl(
final BundleContext bundleContext,
@@ -93,9 +100,10 @@ public class EventAdminImpl implements EventAdmin
}
/**
- * Check if the event admin is active and return the tracker
- * @return The tracker
- * @throws IllegalArgumentException if the event admin has been stopped
+ * Check if the event admin is active and return the tracker.
+ *
+ * @return The event tracker.
+ * @throws IllegalArgumentException If the event admin has been stopped.
*/
private EventHandlerTracker getTracker() {
final EventHandlerTracker localTracker = tracker;
@@ -106,7 +114,10 @@ public class EventAdminImpl implements EventAdmin
}
/**
- * Check whether the topic should be delivered at all
+ * Check whether the topic should be delivered at all.
+ *
+ * @param event The event.
+ * @return True if the topic is delivered, false else.
*/
private boolean checkTopic( final Event event )
{
@@ -157,9 +168,8 @@ public class EventAdminImpl implements EventAdmin
/**
* Post an asynchronous event.
*
- * @param event The event to be posted by this service
- *
- * @throws IllegalStateException - In case we are stopped
+ * @param event The event to be posted by this service.
+ * @throws IllegalStateException In case we are stopped.
*
* @see org.osgi.service.event.EventAdmin#postEvent(org.osgi.service.event.Event)
*/
@@ -174,9 +184,8 @@ public class EventAdminImpl implements EventAdmin
/**
* Send a synchronous event.
*
- * @param event The event to be send by this service
- *
- * @throws IllegalStateException - In case we are stopped
+ * @param event The event to be send by this service.
+ * @throws IllegalStateException In case we are stopped.
*
* @see org.osgi.service.event.EventAdmin#sendEvent(org.osgi.service.event.Event)
*/
@@ -199,6 +208,13 @@ public class EventAdminImpl implements EventAdmin
/**
* Update the event admin with new configuration.
+ *
+ * @param timeout The event timeout.
+ * @param ignoreTimeout The event ignore timeout.
+ * @param requireTopic True if the event require a topic, false else.
+ * @param ignoreTopics The array of topic to ignore.
+ * @param addTimestamp True to add timestamp to the event, false else.
+ * @param addSubject True to add subject to the event, false else.
*/
public void update(final int timeout,
final String[] ignoreTimeout,
@@ -217,9 +233,13 @@ public class EventAdminImpl implements EventAdmin
}
/**
- * This is a utility method that will throw a <tt>NullPointerException</tt>
+ * This is a utility method that will throw a <code>NullPointerException</code>
* in case that the given object is null. The message will be of the form
* "${name} + may not be null".
+ *
+ * @param object The object to check.
+ * @param name The object name (in the event).
+ * @throws NullPointerException If the object is null.
*/
private void checkNull(final Object object, final String name)
{
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/LessAction.java
----------------------------------------------------------------------
diff --git a/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/LessAction.java b/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/LessAction.java
index a252177..af7bca7 100644
--- a/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/LessAction.java
+++ b/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/LessAction.java
@@ -665,9 +665,9 @@ public class LessAction implements Action, SignalListener {
}
/**
- * This is for long running commands to be interrupted by ctrl-c
+ * This is for long running commands to be interrupted by ctrl-c.
*
- * @throws InterruptedException
+ * @throws InterruptedException If the command is interrupted.
*/
public static void checkInterrupted() throws InterruptedException {
Thread.yield();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/MoreAction.java
----------------------------------------------------------------------
diff --git a/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/MoreAction.java b/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/MoreAction.java
index 971db97..ef92105 100644
--- a/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/MoreAction.java
+++ b/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/MoreAction.java
@@ -130,9 +130,9 @@ public class MoreAction implements Action {
}
/**
- * This is for long running commands to be interrupted by ctrl-c
+ * This is for long running commands to be interrupted by ctrl-c.
*
- * @throws InterruptedException
+ * @throws InterruptedException If the command is interrupted.
*/
public static void checkInterrupted() throws InterruptedException {
Thread.yield();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/WcAction.java
----------------------------------------------------------------------
diff --git a/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/WcAction.java b/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/WcAction.java
index 93e00bc..4a063f8 100644
--- a/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/WcAction.java
+++ b/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/WcAction.java
@@ -102,12 +102,10 @@ public class WcAction implements Action {
}
/**
- * Perform the main logic of counting the relevant data within a given input stream.
- * <p/>
- * Note, a line is considered to be terminated by linefeed '\n' or carriage return '\r'.
- * A previous linefeed will be consumed.
- * <p/>
- * This method assumes UTF-8.
+ * <p>Perform the main logic of counting the relevant data within a given input stream.</p>
+ * <p>Note, a line is considered to be terminated by linefeed '\n' or carriage return '\r'.</p>
+ * <p>A previous linefeed will be consumed.</p>
+ * <p>This method assumes UTF-8.</p>
*
* @param inputStream the input stream.
* @return the word count result.
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/felix/gogo/commands/Command.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/felix/gogo/commands/Command.java b/shell/console/src/main/java/org/apache/felix/gogo/commands/Command.java
index 10c494a..c4bc759 100644
--- a/shell/console/src/main/java/org/apache/felix/gogo/commands/Command.java
+++ b/shell/console/src/main/java/org/apache/felix/gogo/commands/Command.java
@@ -31,23 +31,32 @@ import java.lang.annotation.ElementType;
@Target({ElementType.TYPE})
@Deprecated
public @interface Command {
+
/**
- * Returns the scope or sub shell of the command
+ * Return the scope or sub shell of the command.
+ *
+ * @return The command scope.
*/
String scope();
/**
- * REturns the name of the command if used inside a shell
+ * Return the name of the command if used inside a shell.
+ *
+ * @return The command name.
*/
String name();
/**
- * Returns the description of the command which is used to generate command line help
+ * Return the description of the command which is used to generate command line help.
+ *
+ * @return The command description.
*/
String description() default "";
/**
- * Returns a detailed description of the command
+ * Return a detailed description of the command.
+ *
+ * @return The command detailed description.
*/
String detailedDescription() default "";
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/felix/gogo/commands/SubShell.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/felix/gogo/commands/SubShell.java b/shell/console/src/main/java/org/apache/felix/gogo/commands/SubShell.java
index 0206964..3d3e85a 100644
--- a/shell/console/src/main/java/org/apache/felix/gogo/commands/SubShell.java
+++ b/shell/console/src/main/java/org/apache/felix/gogo/commands/SubShell.java
@@ -29,17 +29,23 @@ import java.lang.annotation.Target;
public @interface SubShell {
/**
- * Returns the name of the command if used inside a shell
+ * Return the name of the command if used inside a shell.
+ *
+ * @return The name of the command in the shell.
*/
String name();
/**
- * Returns the description of the command which is used to generate command line help
+ * Return the description of the command which is used to generate command line help.
+ *
+ * @return The description of the command in the shell.
*/
String description() default "";
/**
- * Returns a detailed description of the command
+ * Return a detailed description of the command.
+ *
+ * @return The detailed description of the command in the shell.
*/
String detailedDescription() default "";
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/felix/gogo/commands/converter/ReifiedType.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/felix/gogo/commands/converter/ReifiedType.java b/shell/console/src/main/java/org/apache/felix/gogo/commands/converter/ReifiedType.java
index bc835d9..56f6677 100644
--- a/shell/console/src/main/java/org/apache/felix/gogo/commands/converter/ReifiedType.java
+++ b/shell/console/src/main/java/org/apache/felix/gogo/commands/converter/ReifiedType.java
@@ -30,10 +30,8 @@ package org.apache.felix.gogo.commands.converter;
* a subclass that provide type arguments should be respected. Blueprint
* extender implementations can subclass this class and provide access to the
* generics type graph if used in a conversion. Such a subclass must
- * <em>reify<em> the different Java 5 <code>Type</code> instances into the
+ * <em>reify</em> the different Java 5 <code>Type</code> instances into the
* reified form. That is, a form where the raw Class is available with its optional type arguments as Reified Types.
- *
- * @Immutable
*/
@Deprecated
public class ReifiedType {
@@ -82,7 +80,7 @@ public class ReifiedType {
* object is assignable to Object and therefore no conversion is then
* necessary, this is compatible with older Javas than 5. For this reason,
* the implementation in this class always returns the
- * <code>Object<code> class, regardless of the given index.
+ * <code>Object</code> class, regardless of the given index.
*
* This method should be overridden by a subclass that provides access to
* the generic information.
@@ -98,7 +96,7 @@ public class ReifiedType {
*
* @param i
* The index of the type argument
- * @return <code>ReifiedType(Object.class)<code>, subclasses must override this and return the generic argument at index <code>i</code>
+ * @return <code>ReifiedType(Object.class)</code>, subclasses must override this and return the generic argument at index <code>i</code>
*/
public ReifiedType getActualTypeArgument(int i) {
return ALL;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/commands/Command.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/commands/Command.java b/shell/console/src/main/java/org/apache/karaf/shell/commands/Command.java
index 36fd665..79ea355 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/commands/Command.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/commands/Command.java
@@ -33,22 +33,30 @@ import java.lang.annotation.ElementType;
public @interface Command
{
/**
- * Returns the scope or sub shell of the command
+ * Return the scope or sub shell of the command.
+ *
+ * @return The command scope.
*/
String scope();
/**
- * REturns the name of the command if used inside a shell
+ * Return the name of the command if used inside a shell.
+ *
+ * @return The command name.
*/
String name();
/**
- * Returns the description of the command which is used to generate command line help
+ * Return the description of the command which is used to generate command line help.
+ *
+ * @return The command description.
*/
String description() default "";
/**
- * Returns a detailed description of the command
+ * Return a detailed description of the command.
+ *
+ * @return The command detailed description.
*/
String detailedDescription() default "";
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/commands/basic/ActionPreparator.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/commands/basic/ActionPreparator.java b/shell/console/src/main/java/org/apache/karaf/shell/commands/basic/ActionPreparator.java
index e1681b0..9914baa 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/commands/basic/ActionPreparator.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/commands/basic/ActionPreparator.java
@@ -28,15 +28,15 @@ public interface ActionPreparator {
/**
* Check if the arguments are valid for the action and inject the arguments into the fields
- * of the action
+ * of the action.
*
- * Using deprecated Action for compatiblity
+ * Using deprecated Action for compatibility.
*
- * @param action
- * @param session
- * @param arguments
- * @return
- * @throws Exception
+ * @param action The action to perform.
+ * @param session The command session to use.
+ * @param arguments The action arguments.
+ * @return True if the action preparation succeed, false else.
+ * @throws Exception In case of preparation failure.
*/
boolean prepare(@SuppressWarnings("deprecation") Action action, CommandSession session, List<Object> arguments) throws Exception;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/commands/converter/ReifiedType.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/commands/converter/ReifiedType.java b/shell/console/src/main/java/org/apache/karaf/shell/commands/converter/ReifiedType.java
index 8f28dc2..4f91dcc 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/commands/converter/ReifiedType.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/commands/converter/ReifiedType.java
@@ -30,10 +30,8 @@ package org.apache.karaf.shell.commands.converter;
* a subclass that provide type arguments should be respected. Blueprint
* extender implementations can subclass this class and provide access to the
* generics type graph if used in a conversion. Such a subclass must
- * <em>reify<em> the different Java 5 <code>Type</code> instances into the
+ * <em>reify</em> the different Java 5 <code>Type</code> instances into the
* reified form. That is, a form where the raw Class is available with its optional type arguments as Reified Types.
- *
- * @Immutable
*/
@Deprecated
public class ReifiedType {
@@ -81,7 +79,7 @@ public class ReifiedType {
* object is assignable to Object and therefore no conversion is then
* necessary, this is compatible with older Javas than 5. For this reason,
* the implementation in this class always returns the
- * <code>Object<code> class, regardless of the given index.
+ * <code>Object</code> class, regardless of the given index.
*
* This method should be overridden by a subclass that provides access to
* the generic information.
@@ -97,7 +95,7 @@ public class ReifiedType {
*
* @param i
* The index of the type argument
- * @return <code>ReifiedType(Object.class)<code>, subclasses must override this and return the generic argument at index <code>i</code>
+ * @return <code>ReifiedType(Object.class)</code>, subclasses must override this and return the generic argument at index <code>i</code>
*/
public ReifiedType getActualTypeArgument(int i) {
return ALL;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/compat/ArgumentCompleter.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/compat/ArgumentCompleter.java b/shell/console/src/main/java/org/apache/karaf/shell/compat/ArgumentCompleter.java
index 8f52503..df534aa 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/compat/ArgumentCompleter.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/compat/ArgumentCompleter.java
@@ -275,16 +275,20 @@ public class ArgumentCompleter {
}
/**
- * If true, a completion at argument index N will only succeed
- * if all the completions from 0-(N-1) also succeed.
+ * If true, a completion at argument index N will only succeed
+ * if all the completions from 0-(N-1) also succeed.
+ *
+ * @param strict The new value of the strict flag.
*/
public void setStrict(final boolean strict) {
this.strict = strict;
}
/**
- * Returns whether a completion at argument index N will succees
- * if all the completions from arguments 0-(N-1) also succeed.
+ * Return whether a completion at argument index N will success
+ * if all the completions from arguments 0-(N-1) also succeed.
+ *
+ * @return The value of the strict flag.
*/
public boolean getStrict() {
return this.strict;
@@ -393,14 +397,14 @@ public class ArgumentCompleter {
int pos = ret + (list.getBufferPosition() - argpos);
/**
- * Special case: when completing in the middle of a line, and the
- * area under the cursor is a delimiter, then trim any delimiters
- * from the candidates, since we do not need to have an extra
- * delimiter.
+ * Special case: when completing in the middle of a line, and the
+ * area under the cursor is a delimiter, then trim any delimiters
+ * from the candidates, since we do not need to have an extra
+ * delimiter.
*
- * E.g., if we have a completion for "foo", and we
- * enter "f bar" into the buffer, and move to after the "f"
- * and hit TAB, we want "foo bar" instead of "foo bar".
+ * E.g., if we have a completion for "foo", and we
+ * enter "f bar" into the buffer, and move to after the "f"
+ * and hit TAB, we want "foo bar" instead of "foo bar".
*/
String buffer = list.getBuffer();
int cursor = list.getBufferPosition();
@@ -426,14 +430,14 @@ public class ArgumentCompleter {
}
/**
- * Returns true if the specified character is a whitespace
- * parameter. Check to ensure that the character is not
- * escaped and returns true from
- * {@link #isDelimiterChar}.
+ * Return true if the specified character is a whitespace
+ * parameter. Check to ensure that the character is not
+ * escaped and returns true from
+ * {@link #isDelimiterChar}.
*
- * @param buffer the complete command buffer
- * @param pos the index of the character in the buffer
- * @return true if the character should be a delimiter
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character should be a delimiter, false else.
*/
public boolean isDelimiter(final String buffer, final int pos) {
return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos);
@@ -444,8 +448,12 @@ public class ArgumentCompleter {
}
/**
- * The character is a delimiter if it is whitespace, and the
- * preceeding character is not an escape character.
+ * The character is a delimiter if it is whitespace, and the
+ * preceding character is not an escape character.
+ *
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character is a delimiter, false else.
*/
public boolean isDelimiterChar(String buffer, int pos) {
return Character.isWhitespace(buffer.charAt(pos));
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/compat/OldArgumentCompleter.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/compat/OldArgumentCompleter.java b/shell/console/src/main/java/org/apache/karaf/shell/compat/OldArgumentCompleter.java
index 407244c..27d4e34 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/compat/OldArgumentCompleter.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/compat/OldArgumentCompleter.java
@@ -205,16 +205,20 @@ public class OldArgumentCompleter {
}
/**
- * If true, a completion at argument index N will only succeed
- * if all the completions from 0-(N-1) also succeed.
+ * If true, a completion at argument index N will only succeed
+ * if all the completions from 0-(N-1) also succeed.
+ *
+ * @param strict The new value of the strict flag.
*/
public void setStrict(final boolean strict) {
this.strict = strict;
}
/**
- * Returns whether a completion at argument index N will succees
- * if all the completions from arguments 0-(N-1) also succeed.
+ * Return whether a completion at argument index N will succees
+ * if all the completions from arguments 0-(N-1) also succeed.
+ *
+ * @return The current value of the strict flag.
*/
public boolean getStrict() {
return this.strict;
@@ -356,14 +360,14 @@ public class OldArgumentCompleter {
}
/**
- * Returns true if the specified character is a whitespace
- * parameter. Check to ensure that the character is not
- * escaped and returns true from
- * {@link #isDelimiterChar}.
+ * Return true if the specified character is a whitespace
+ * parameter. Check to ensure that the character is not
+ * escaped and returns true from
+ * {@link #isDelimiterChar}.
*
- * @param buffer the complete command buffer
- * @param pos the index of the character in the buffer
- * @return true if the character should be a delimiter
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character should be a delimiter, false else.
*/
public boolean isDelimiter(final String buffer, final int pos) {
return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos);
@@ -374,15 +378,19 @@ public class OldArgumentCompleter {
}
/**
- * The character is a delimiter if it is whitespace, and the
- * preceeding character is not an escape character.
+ * The character is a delimiter if it is whitespace, and the
+ * preceding character is not an escape character.
+ *
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character is delimiter, false else.
*/
public boolean isDelimiterChar(String buffer, int pos) {
return Character.isWhitespace(buffer.charAt(pos));
}
/**
- * The result of a delimited buffer.
+ * The result of a delimited buffer.
*/
public static class ArgumentList {
private String[] arguments;
@@ -391,12 +399,10 @@ public class OldArgumentCompleter {
private int bufferPosition;
/**
- * @param arguments the array of tokens
- * @param cursorArgumentIndex the token index of the cursor
- * @param argumentPosition the position of the cursor in the
- * current token
- * @param bufferPosition the position of the cursor in
- * the whole buffer
+ * @param arguments The array of tokens.
+ * @param cursorArgumentIndex The token index of the cursor.
+ * @param argumentPosition The position of the cursor in the current token.
+ * @param bufferPosition The position of the cursor in the whole buffer.
*/
public ArgumentList(String[] arguments, int cursorArgumentIndex,
int argumentPosition, int bufferPosition) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/AbstractAction.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/AbstractAction.java b/shell/console/src/main/java/org/apache/karaf/shell/console/AbstractAction.java
index 634f264..5ebd9ad 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/AbstractAction.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/AbstractAction.java
@@ -37,9 +37,9 @@ public abstract class AbstractAction implements Action {
protected abstract Object doExecute() throws Exception;
/**
- * This is for long running commands to be interrupted by ctrl-c
+ * This is for long running commands to be interrupted by ctrl-c.
*
- * @throws InterruptedException
+ * @throws InterruptedException If the action is interrupted.
*/
public static void checkInterrupted() throws InterruptedException {
Thread.yield();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/NameScoping.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/NameScoping.java b/shell/console/src/main/java/org/apache/karaf/shell/console/NameScoping.java
index 3fcdad3..90d5b21 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/NameScoping.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/NameScoping.java
@@ -19,7 +19,6 @@ package org.apache.karaf.shell.console;
import org.apache.felix.service.command.CommandSession;
-
/**
* A helper class for name scoping
*/
@@ -29,8 +28,12 @@ public class NameScoping {
public static final String MULTI_SCOPE_MODE_KEY = "MULTI_SCOPE_MODE";
/**
- * Returns the name of the command which can omit the global scope prefix if the command starts with the
- * same prefix as the current application
+ * Return the name of the command which can omit the global scope prefix if the command starts with the
+ * same prefix as the current application.
+ *
+ * @param session The command session.
+ * @param key The command key.
+ * @return The command name without the global prefix.
*/
public static String getCommandNameWithoutGlobalPrefix(CommandSession session, String key) {
if (!isMultiScopeMode(session)) {
@@ -48,7 +51,11 @@ public class NameScoping {
}
/**
- * Returns true if the given scope is the global scope so that it can be hidden from help messages
+ * Return true if the given scope is the global scope so that it can be hidden from help messages.
+ *
+ * @param session The command session.
+ * @param scope The command scope.
+ * @return True if the scope is global, false else.
*/
public static boolean isGlobalScope(CommandSession session, String scope) {
if (session == null)
@@ -64,8 +71,11 @@ public class NameScoping {
}
/**
- * Returns true if we are in multi-scope mode (the default) or if we are in single scope mode which means we
- * avoid prefixing commands with their scope
+ * Return true if we are in multi-scope mode (the default) or if we are in single scope mode which means we
+ * avoid prefixing commands with their scope.
+ *
+ * @param session The command session.
+ * @return True if the command is multi-scoped, false else.
*/
public static boolean isMultiScopeMode(CommandSession session) {
if (session == null)
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/SubShell.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/SubShell.java b/shell/console/src/main/java/org/apache/karaf/shell/console/SubShell.java
index 8f627a6..0bccb94 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/SubShell.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/SubShell.java
@@ -22,17 +22,23 @@ package org.apache.karaf.shell.console;
public interface SubShell {
/**
- * Returns the name of the command if used inside a shell
+ * Return the name of the command if used inside a shell.
+ *
+ * @return The name of the command in the shell.
*/
String getName();
/**
- * Returns the description of the command which is used to generate command line help
+ * Return the description of the command which is used to generate command line help.
+ *
+ * @return The description of the command in the shell.
*/
String getDescription();
/**
- * Returns a detailed description of the command
+ * Return a detailed description of the command.
+ *
+ * @return The detailed description of the command in the shell.
*/
String getDetailedDescription();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/completer/ArgumentCompleter.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/completer/ArgumentCompleter.java b/shell/console/src/main/java/org/apache/karaf/shell/console/completer/ArgumentCompleter.java
index bdf1733..6e7dea5 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/completer/ArgumentCompleter.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/completer/ArgumentCompleter.java
@@ -279,16 +279,20 @@ public class ArgumentCompleter implements Completer {
}
/**
- * If true, a completion at argument index N will only succeed
- * if all the completions from 0-(N-1) also succeed.
+ * If true, a completion at argument index N will only succeed
+ * if all the completions from 0-(N-1) also succeed.
+ *
+ * @param strict The new value of the strict flag.
*/
public void setStrict(final boolean strict) {
this.strict = strict;
}
/**
- * Returns whether a completion at argument index N will succees
- * if all the completions from arguments 0-(N-1) also succeed.
+ * Return whether a completion at argument index N will success
+ * if all the completions from arguments 0-(N-1) also succeed.
+ *
+ * @return The value of the strict flag.
*/
public boolean getStrict() {
return this.strict;
@@ -405,14 +409,14 @@ public class ArgumentCompleter implements Completer {
int pos = ret + (list.getBufferPosition() - argpos);
/**
- * Special case: when completing in the middle of a line, and the
- * area under the cursor is a delimiter, then trim any delimiters
- * from the candidates, since we do not need to have an extra
- * delimiter.
+ * Special case: when completing in the middle of a line, and the
+ * area under the cursor is a delimiter, then trim any delimiters
+ * from the candidates, since we do not need to have an extra
+ * delimiter.
*
- * E.g., if we have a completion for "foo", and we
- * enter "f bar" into the buffer, and move to after the "f"
- * and hit TAB, we want "foo bar" instead of "foo bar".
+ * E.g., if we have a completion for "foo", and we
+ * enter "f bar" into the buffer, and move to after the "f"
+ * and hit TAB, we want "foo bar" instead of "foo bar".
*/
if ((buffer != null) && (cursor != buffer.length()) && isDelimiter(buffer, cursor)) {
@@ -448,14 +452,14 @@ public class ArgumentCompleter implements Completer {
}
/**
- * Returns true if the specified character is a whitespace
- * parameter. Check to ensure that the character is not
- * escaped and returns true from
- * {@link #isDelimiterChar}.
+ * Return true if the specified character is a whitespace
+ * parameter. Check to ensure that the character is not
+ * escaped and returns true from
+ * {@link #isDelimiterChar}.
*
- * @param buffer the complete command buffer
- * @param pos the index of the character in the buffer
- * @return true if the character should be a delimiter
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character should be a delimiter, false else.
*/
public boolean isDelimiter(final String buffer, final int pos) {
return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos);
@@ -466,15 +470,19 @@ public class ArgumentCompleter implements Completer {
}
/**
- * The character is a delimiter if it is whitespace, and the
- * preceeding character is not an escape character.
+ * The character is a delimiter if it is whitespace, and the
+ * preceding character is not an escape character.
+ *
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character is a delimiter, false else.
*/
public boolean isDelimiterChar(String buffer, int pos) {
return Character.isWhitespace(buffer.charAt(pos));
}
/**
- * The result of a delimited buffer.
+ * The result of a delimited buffer.
*/
public static class ArgumentList {
private String[] arguments;
@@ -483,12 +491,10 @@ public class ArgumentCompleter implements Completer {
private int bufferPosition;
/**
- * @param arguments the array of tokens
- * @param cursorArgumentIndex the token index of the cursor
- * @param argumentPosition the position of the cursor in the
- * current token
- * @param bufferPosition the position of the cursor in
- * the whole buffer
+ * @param arguments The array of tokens.
+ * @param cursorArgumentIndex The token index of the cursor.
+ * @param argumentPosition The position of the cursor in the current token.
+ * @param bufferPosition The position of the cursor in the whole buffer.
*/
public ArgumentList(String[] arguments, int cursorArgumentIndex,
int argumentPosition, int bufferPosition) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/completer/FileCompleter.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/completer/FileCompleter.java b/shell/console/src/main/java/org/apache/karaf/shell/console/completer/FileCompleter.java
index 477aad0..d66e7b1 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/completer/FileCompleter.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/completer/FileCompleter.java
@@ -24,13 +24,13 @@ import org.apache.felix.service.command.CommandSession;
import org.apache.karaf.shell.console.Completer;
/**
- * A file name completer takes the buffer and issues a list of
- * potential completions.
- * <p/>
- * This completer tries to behave as similar as possible to
+ * <p>A file name completer takes the buffer and issues a list of
+ * potential completions.</p>
+ *
+ * <p>This completer tries to behave as similar as possible to
* <i>bash</i>'s file name completion (using GNU readline)
- * with the following exceptions:
- * <p/>
+ * with the following exceptions:</p>
+ *
* <ul>
* <li>Candidates that are directories will end with "/"</li>
* <li>Wildcard regular expressions are not evaluated or replaced</li>
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/completer/OldArgumentCompleter.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/completer/OldArgumentCompleter.java b/shell/console/src/main/java/org/apache/karaf/shell/console/completer/OldArgumentCompleter.java
index 90c3b1a..0cc7252 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/completer/OldArgumentCompleter.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/completer/OldArgumentCompleter.java
@@ -196,16 +196,20 @@ public class OldArgumentCompleter implements Completer {
}
/**
- * If true, a completion at argument index N will only succeed
- * if all the completions from 0-(N-1) also succeed.
+ * If true, a completion at argument index N will only succeed
+ * if all the completions from 0-(N-1) also succeed.
+ *
+ * @param strict The new value of the strict flag.
*/
public void setStrict(final boolean strict) {
this.strict = strict;
}
/**
- * Returns whether a completion at argument index N will succees
- * if all the completions from arguments 0-(N-1) also succeed.
+ * Return whether a completion at argument index N will succees
+ * if all the completions from arguments 0-(N-1) also succeed.
+ *
+ * @return The value of the strict flag.
*/
public boolean getStrict() {
return this.strict;
@@ -312,14 +316,14 @@ public class OldArgumentCompleter implements Completer {
int pos = ret + (list.getBufferPosition() - argpos);
/**
- * Special case: when completing in the middle of a line, and the
- * area under the cursor is a delimiter, then trim any delimiters
- * from the candidates, since we do not need to have an extra
- * delimiter.
+ * Special case: when completing in the middle of a line, and the
+ * area under the cursor is a delimiter, then trim any delimiters
+ * from the candidates, since we do not need to have an extra
+ * delimiter.
*
- * E.g., if we have a completion for "foo", and we
- * enter "f bar" into the buffer, and move to after the "f"
- * and hit TAB, we want "foo bar" instead of "foo bar".
+ * E.g., if we have a completion for "foo", and we
+ * enter "f bar" into the buffer, and move to after the "f"
+ * and hit TAB, we want "foo bar" instead of "foo bar".
*/
if ((buffer != null) && (cursor != buffer.length()) && isDelimiter(buffer, cursor)) {
@@ -355,14 +359,14 @@ public class OldArgumentCompleter implements Completer {
}
/**
- * Returns true if the specified character is a whitespace
- * parameter. Check to ensure that the character is not
- * escaped and returns true from
- * {@link #isDelimiterChar}.
+ * Return true if the specified character is a whitespace
+ * parameter. Check to ensure that the character is not
+ * escaped and returns true from
+ * {@link #isDelimiterChar}.
*
- * @param buffer the complete command buffer
- * @param pos the index of the character in the buffer
- * @return true if the character should be a delimiter
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character should be a delimiter, false else.
*/
public boolean isDelimiter(final String buffer, final int pos) {
return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos);
@@ -373,29 +377,32 @@ public class OldArgumentCompleter implements Completer {
}
/**
- * The character is a delimiter if it is whitespace, and the
- * preceeding character is not an escape character.
+ * The character is a delimiter if it is whitespace, and the
+ * preceding character is not an escape character.
+ *
+ * @param buffer The complete command buffer.
+ * @param pos The position of the character in the buffer.
+ * @return True if the character is a delimiter, false else.
*/
public boolean isDelimiterChar(String buffer, int pos) {
return Character.isWhitespace(buffer.charAt(pos));
}
/**
- * The result of a delimited buffer.
+ * The result of a delimited buffer.
*/
public static class ArgumentList {
+
private String[] arguments;
private int cursorArgumentIndex;
private int argumentPosition;
private int bufferPosition;
/**
- * @param arguments the array of tokens
- * @param cursorArgumentIndex the token index of the cursor
- * @param argumentPosition the position of the cursor in the
- * current token
- * @param bufferPosition the position of the cursor in
- * the whole buffer
+ * @param arguments The array of tokens.
+ * @param cursorArgumentIndex The token index of the cursor.
+ * @param argumentPosition The position of the cursor in the current token.
+ * @param bufferPosition The position of the cursor in the whole buffer.
*/
public ArgumentList(String[] arguments, int cursorArgumentIndex,
int argumentPosition, int bufferPosition) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/impl/Main.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/Main.java b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/Main.java
index 2b0d0d9..eea5af8 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/Main.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/Main.java
@@ -57,8 +57,8 @@ public class Main {
/**
* Use this method when the shell is being executed as a top level shell.
*
- * @param args
- * @throws Exception
+ * @param args The console main arguments.
+ * @throws Exception In case of console running failure.
*/
public void run(String args[]) throws Exception {
@@ -80,9 +80,10 @@ public class Main {
* Use this method when the shell is being executed as a command
* of another shell.
*
- * @param parent
- * @param args
- * @throws Exception
+ * @param parent The parent command session.
+ * @param threadIO The thread IO to use to execute the console.
+ * @param args The console arguments.
+ * @throws Exception In case of console running failure.
*/
public void run(CommandSession parent, ThreadIO threadIO, String args[]) throws Exception {
@@ -221,13 +222,14 @@ public class Main {
/**
* Allow sub classes of main to change the ConsoleImpl implementation used.
*
- * @param commandProcessor
- * @param in
- * @param out
- * @param err
- * @param terminal
- * @return
- * @throws Exception
+ * @param commandProcessor The command processor to use.
+ * @param threadIO The thread IO to use for the console.
+ * @param in The input stream.
+ * @param out The output stream.
+ * @param err The error stream.
+ * @param terminal The terminal to use.
+ * @return The created console implementation.
+ * @throws Exception If the console creation fails.
*/
protected ConsoleImpl createConsole(CommandProcessorImpl commandProcessor, ThreadIO threadIO, InputStream in, PrintStream out, PrintStream err, Terminal terminal) throws Exception {
return new ConsoleImpl(commandProcessor, threadIO, in, out, err, terminal, null, null, null, false);
@@ -237,7 +239,7 @@ public class Main {
* Sub classes can override so that their registered commands do not conflict with the default shell
* implementation.
*
- * @return
+ * @return The location of the commands resource.
*/
public String getDiscoveryResource() {
return "META-INF/services/org/apache/karaf/shell/commands";
@@ -299,10 +301,12 @@ public class Main {
}
/**
- * Returns whether or not we are in multi-scope mode.
- * <p/>
- * The default mode is multi-scoped where we prefix commands by their scope. If we are in single
- * scoped mode then we don't use scope prefixes when registering or tab completing commands.
+ * <p>Returns whether or not we are in multi-scope mode.</p>
+ *
+ * <p>The default mode is multi-scoped where we prefix commands by their scope. If we are in single
+ * scoped mode then we don't use scope prefixes when registering or tab completing commands.</p>
+ *
+ * @return True if the command is multi-scoped, false else.
*/
public boolean isMultiScopeMode() {
return true;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
index 1cbe4b5..78d7479 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
@@ -153,7 +153,7 @@ public class ConsoleImpl implements Console {
/**
* Subclasses can override to use a different history file.
*
- * @return
+ * @return The history file.
*/
protected File getHistoryFile() {
String defaultHistoryPath = new File(System.getProperty("user.home"), ".karaf/karaf.history").toString();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/util/ShellUtil.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/util/ShellUtil.java b/shell/console/src/main/java/org/apache/karaf/shell/util/ShellUtil.java
index 9d21e49..41c6b3c 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/util/ShellUtil.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/util/ShellUtil.java
@@ -101,11 +101,11 @@ public class ShellUtil {
}
/**
- * Check if a bundle is a system bundle (start level < 50)
+ * Check if a bundle is a system bundle (start level minor than 50)
*
- * @param bundleContext
- * @param bundle
- * @return true if the bundle has start level minor than 50
+ * @param bundleContext The bundle context.
+ * @param bundle The bundle to check.
+ * @return True if the bundle has start level minor than 50, false else.
*/
public static boolean isASystemBundle(BundleContext bundleContext, Bundle bundle) {
int level = bundle.adapt(BundleStartLevel.class).getStartLevel();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/Action.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Action.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Action.java
index 955c837..c206d22 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Action.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Action.java
@@ -19,25 +19,25 @@
package org.apache.karaf.shell.api.action;
/**
- * An action is the default implementation of the commands in karaf.
+ * <p>An action is the default implementation of the commands in karaf.
* In OSGi, Actions are discovered using an extender and a new instance
* of the class is created when the command is invoked, so that the
- * implementation does not need to be thread safe.
+ * implementation does not need to be thread safe.</p>
*
- * Before the call to the execute method the action is checked for
+ * <p>Before the call to the execute method the action is checked for
* fields annotated with @Reference and injected with services coming
* from the SessionFactory's Registry or from the OSGi registry.
* Methods annotated with @Init are then called. The next step is to
* inject command line parameters into fields annotated with @Option
- * and @Argument and then call the execute method.
+ * and @Argument and then call the execute method.</p>
*
- * Any class implementing Action must have a no argument constructor. This
+ * <p>Any class implementing Action must have a no argument constructor. This
* is necessary so the help generator can instantiate the class and get the
- * default values.
+ * default values.</p>
*
- * In order to make commands available from the non-OSGi shell,
+ * <p>In order to make commands available from the non-OSGi shell,
* the commands must be listed in a file available at
- * META-INF/services/org/apache/karaf/shell/commmands.
+ * META-INF/services/org/apache/karaf/shell/commmands.</p>
*
* @see org.apache.karaf.shell.api.action.Command
* @see org.apache.karaf.shell.api.action.lifecycle.Service
@@ -49,7 +49,7 @@ public interface Action {
* registry, options and arguments from the command line.
*
* @return <code>null</code> or the result of the action execution
- * @throws Exception
+ * @throws Exception in case of execution failure.
*/
Object execute() throws Exception;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/Argument.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Argument.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Argument.java
index 8cb1e51..6fc25b3 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Argument.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Argument.java
@@ -37,16 +37,22 @@ public @interface Argument
/**
* Name of the argument.
* By default, the field name will be used.
+ *
+ * @return the argument name.
*/
String name() default DEFAULT;
/**
* A textual description of the argument.
+ *
+ * @return the argument description.
*/
String description() default "";
/**
* Whether this argument is mandatory or not.
+ *
+ * @return true if the argument is required, false else.
*/
boolean required() default false;
@@ -54,12 +60,16 @@ public @interface Argument
* Position of the argument in the command line.
* When using multiple arguments, the indices must be
* starting from 0 and incrementing without any holes.
+ *
+ * @return the argument index.
*/
int index() default 0;
/**
* The last argument can be multi-valued in which case
* the field type must be a List.
+ *
+ * @return true if the argument has multiple values, false else.
*/
boolean multiValued() default false;
@@ -68,6 +78,8 @@ public @interface Argument
* In case the value displayed in the help to the user should
* be different that the default value of the field, one
* can use this property to specify the value to display.
+ *
+ * @return the argument help string representation.
*/
String valueToShowInHelp() default DEFAULT_STRING;
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/Command.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Command.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Command.java
index 7622b33..4364689 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Command.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Command.java
@@ -35,17 +35,23 @@ import java.lang.annotation.Target;
public @interface Command
{
/**
- * Returns the scope or sub shell of the command
+ * Returns the scope or sub shell of the command.
+ *
+ * @return the command scope.
*/
String scope();
/**
- * Returns the name of the command if used inside a shell
+ * Returns the name of the command if used inside a shell.
+ *
+ * @return the command name.
*/
String name();
/**
- * Returns the description of the command which is used to generate command line help
+ * Returns the description of the command which is used to generate command line help.
+ *
+ * @return the command description.
*/
String description() default "";
@@ -54,8 +60,10 @@ public @interface Command
* This description will be shown in the help for the command.
* Longer descriptions can be externalized using a
* <code>classpath:[location]</code> url, in which case the
- * descrition will be loaded from the bundle at the given location,
+ * description will be loaded from the bundle at the given location,
* relatively to the implementation of the command.
+ *
+ * @return the command long description.
*/
String detailedDescription() default "";
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/Completion.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Completion.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Completion.java
index d9a3dca..1eb9b7b 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Completion.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Completion.java
@@ -42,17 +42,23 @@ public @interface Completion {
* {@link org.apache.karaf.shell.support.completers.StringsCompleter},
* in which case, the <code>values</code> property will be used
* as the list of possible completions.
+ *
+ * @return the completer class.
*/
Class<?> value();
/**
* When using a static completer, returns the possible values.
+ *
+ * @return possible completion values as string array.
*/
String[] values() default { };
/**
* When using a static completer, indicates if completion
* should be done case sensitive or not.
+ *
+ * @return true if the completion is case sensitive, false else.
*/
boolean caseSensitive() default false;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/Option.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Option.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Option.java
index 66065d4..62c9510 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Option.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Option.java
@@ -24,21 +24,21 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * Used to mark an optional named command line option who's name typically starts with "--" or "-".
+ * <p>Used to mark an optional named command line option who's name typically starts with "--" or "-".
* This annotation can be applied to attributes of a class implementing an Action.
- * The value of the command line option will be automatically converted to the attribute type.
+ * The value of the command line option will be automatically converted to the attribute type.</p>
* @see org.apache.karaf.shell.support.converter.DefaultConverter
- * <p>
+ *
* <h2>Example 1 (boolean option):</h2>
* <code>@Option(name="--force") boolean force;</code>
- * <p>
- * This will be represented as --force on the command line.
- * <p>
+ *
+ * <p>This will be represented as --force on the command line.</p>
+ *
* <h2>Example 2 (mandatory String option):</h2>
* <code>@Option(name="-name",required=true) String name;</code>
- * <p>
- * This will be represented as -name=<myname> on the command line and the command will be rejected if the
- * option is not given.
+ *
+ * <p>This will be represented as -name=<myname> on the command line and the command will be rejected if the
+ * option is not given.</p>
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
@@ -48,22 +48,30 @@ public @interface Option
/**
* The name of this option. Usually starting with a '-'.
+ *
+ * @return the option name.
*/
String name();
/**
* Specify a list of aliases for this option.
* Useful when using an option with short or long names.
+ *
+ * @return the option aliases (as a string array).
*/
String[] aliases() default {};
/**
* A textual description of the option.
+ *
+ * @return the option description.
*/
String description() default "";
/**
* Whether this argument is mandatory or not.
+ *
+ * @return true if the option is required, false else.
*/
boolean required() default false;
@@ -72,6 +80,8 @@ public @interface Option
* the field type must be a List. On the command line,
* multi-valued options are used with specifying the option
* multiple times with different values.
+ *
+ * @return true if the option is multivalued, false else.
*/
boolean multiValued() default false;
@@ -80,6 +90,8 @@ public @interface Option
* In case the value displayed in the help to the user should
* be different that the default value of the field, one
* can use this property to specify the value to display.
+ *
+ * @return the option description as shown in the help.
*/
String valueToShowInHelp() default DEFAULT_STRING;
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/Parsing.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Parsing.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Parsing.java
index d9808c5..172b439 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Parsing.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Parsing.java
@@ -33,6 +33,8 @@ public @interface Parsing {
/**
* The parser class to use for this command.
+ *
+ * @return the parsing value.
*/
Class<?> value();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Destroy.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Destroy.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Destroy.java
index 86199c0..1a23a3c 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Destroy.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Destroy.java
@@ -24,7 +24,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * A class annotated with {@link @Service} can have a method
+ * A class annotated with {@link Service} can have a method
* annotation with <code>@Destroy</code> in which case the annotated
* method will be called when the object is destroyed.
*/
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Init.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Init.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Init.java
index d0cd3c0..8d3bfde 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Init.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Init.java
@@ -24,7 +24,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * A class annotated with {@link @Service} can have a method
+ * A class annotated with {@link Service} can have a method
* annotation with <code>@Init</code> in which case the annotated
* method will be called after a successful injection.
*/
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Manager.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Manager.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Manager.java
index 2b26e81..42a7f25 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Manager.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Manager.java
@@ -19,14 +19,14 @@
package org.apache.karaf.shell.api.action.lifecycle;
/**
- * The <code>Manager</code> service can be used to programmatically
+ * <p>The <code>Manager</code> service can be used to programmatically
* register {@link org.apache.karaf.shell.api.action.Action}s or
- * {@link org.apache.karaf.shell.api.console.Completer}s.
+ * {@link org.apache.karaf.shell.api.console.Completer}s.</p>
*
- * Registered objects must be annotated with the {@link Service} annotation.
+ * <p>Registered objects must be annotated with the {@link Service} annotation.</p>
*
- * Objects will be registered in the {@link org.apache.karaf.shell.api.console.Registry}
- * associated with this <code>Manager</code>.
+ * <p>Objects will be registered in the {@link org.apache.karaf.shell.api.console.Registry}
+ * associated with this <code>Manager</code>.</p>
*
* @see org.apache.karaf.shell.api.console.Registry
* @see org.apache.karaf.shell.api.action.lifecycle.Service
@@ -38,11 +38,15 @@ public interface Manager {
* If the given class is an {@link org.apache.karaf.shell.api.action.Action},
* a {@link org.apache.karaf.shell.api.console.Command} will be created and registered,
* else, an instance of the class will be created, injected and registered.
+ *
+ * @param clazz the Action class to register.
*/
void register(Class<?> clazz);
/**
* Unregister a previously registered class.
+ *
+ * @param clazz the Action class to unregister.
*/
void unregister(Class<?> clazz);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Reference.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Reference.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Reference.java
index 8239f7d..5892fb3 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Reference.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Reference.java
@@ -24,7 +24,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * A class annotated with {@link @Service} can have fields
+ * A class annotated with {@link Service} can have fields
* annotated with <code>@Service</code> in which case matching
* services will be retrieved from the
* {@link org.apache.karaf.shell.api.console.Registry} and
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/Command.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Command.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Command.java
index 8ac47fc..7349699 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Command.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Command.java
@@ -25,11 +25,15 @@ public interface Command extends Function {
/**
* Retrieve the scope of this command.
+ *
+ * @return the command scope.
*/
String getScope();
/**
* Retrieve the name of this command.
+ *
+ * @return the command name.
*/
String getName();
@@ -37,6 +41,8 @@ public interface Command extends Function {
* Retrieve the description of this command.
* This short command description will be printed
* when using the <code>help</code> command.
+ *
+ * @return the command description.
*/
String getDescription();
@@ -51,7 +57,7 @@ public interface Command extends Function {
/**
* Retrieve the parser associated with this command or null for the default one.
*
- * @return
+ * @return the command parser.
*/
Parser getParser();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/CommandLine.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/CommandLine.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/CommandLine.java
index 2ed7697..fa68e17 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/CommandLine.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/CommandLine.java
@@ -28,16 +28,22 @@ public interface CommandLine {
/**
* Retrieve the argument index for the cursor position
+ *
+ * @return the cursor argument index
*/
int getCursorArgumentIndex();
/**
* Retrieve the argument for the cursor position
+ *
+ * @return the cursor argument at position
*/
String getCursorArgument();
/**
* Retrieve the position of the cursor within the argument
+ *
+ * @return the position of the argument
*/
int getArgumentPosition();
@@ -45,16 +51,22 @@ public interface CommandLine {
* List of arguments on the current command.
* If the command line contains multiple commands, only the command corresponding
* to the cursor position is available.
+ *
+ * @return array of arguments
*/
String[] getArguments();
/**
* Retrieve the position of the cursor within the command line.
+ *
+ * @return the buffer position
*/
int getBufferPosition();
/**
* Retrieve the full buffer.
+ *
+ * @return the buffer
*/
String getBuffer();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/History.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/History.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/History.java
index 10b1b11..be2100d 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/History.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/History.java
@@ -23,17 +23,24 @@ public interface History {
/**
* First available index.
+ *
+ * @return first index in the history
*/
int first();
/**
* Last available index.
+ *
+ * @return last index in the history
*/
int last();
/**
* Command at the given index.
* Indices can range from <code>first()</code> to <code>last()</code>.
+ *
+ * @param index the index in the history.
+ * @return the command in the history at the given index.
*/
CharSequence get(int index);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/Registry.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Registry.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Registry.java
index 8df1b22..7d9f131 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Registry.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Registry.java
@@ -32,14 +32,17 @@ public interface Registry {
/**
* Return a list of available commands.
+ *
+ * @return the list of available commands.
*/
List<Command> getCommands();
/**
+ * Get the actual command with the corresponding scope and name.
*
- * @param scope
- * @param name
- * @return
+ * @param scope the command scope.
+ * @param name the command name.
+ * @return the actual corresponding {@link Command}.
*/
Command getCommand(String scope, String name);
@@ -49,14 +52,16 @@ public interface Registry {
* a {@link Callable} can be registered and each injection will
* call it to obtain the actual service implementation.
*
- * @param factory
- * @param clazz
- * @param <T>
+ * @param factory the service factory.
+ * @param clazz the registration class.
+ * @param <T> the corresponding type.
*/
<T> void register(Callable<T> factory, Class<T> clazz);
/**
* Register a service.
+ *
+ * @param service register a given service.
*/
void register(Object service);
@@ -64,21 +69,34 @@ public interface Registry {
* Unregister a service.
* If the registration has been done using a factory, the same
* factory should be used to unregister.
+ *
+ * @param service unregister a given service.
*/
void unregister(Object service);
/**
* Obtain a service implementing the given class.
+ *
+ * @param clazz the class/interface to look for service.
+ * @param <T> the service type.
+ * @return the service corresponding to the given class/interface.
*/
<T> T getService(Class<T> clazz);
/**
* Obtain a list of services implementing the given class.
+ *
+ * @param clazz the class/interface to look for services.
+ * @param <T> the service type.
+ * @return the list of services corresponding to the given class/interface.
*/
<T> List<T> getServices(Class<T> clazz);
/**
* Check whether the registry has a service of the given class.
+ *
+ * @param clazz the class/interface to look for service.
+ * @return true if at least one service is found for the corresponding interface, false else.
*/
boolean hasService(Class<?> clazz);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/Session.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Session.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Session.java
index cf7f795..4150ead 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Session.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Session.java
@@ -60,16 +60,17 @@ public interface Session extends Runnable {
/**
* Execute a program in this session.
*
- * @param commandline
+ * @param commandline the provided command line
* @return the result of the execution
+ * @throws Exception in case of execution failure.
*/
Object execute(CharSequence commandline) throws Exception;
/**
* Get the value of a variable.
*
- * @param name
- * @return
+ * @param name the key name in the session
+ * @return the corresponding object
*/
Object get(String name);
@@ -98,17 +99,17 @@ public interface Session extends Runnable {
* bypass the piping. If the output is piped to a file, then the object
* returned must be null.
*
- * @return
+ * @return the console stream
*/
PrintStream getConsole();
/**
* Prompt the user for a line.
*
- * @param prompt
- * @param mask
- * @return
- * @throws java.io.IOException
+ * @param prompt the session prompt
+ * @param mask the session mask
+ * @return the corresponding line
+ * @throws java.io.IOException in case of prompting failure
*/
String readLine(String prompt, final Character mask) throws IOException;
@@ -116,6 +117,8 @@ public interface Session extends Runnable {
* Retrieve the {@link org.apache.karaf.shell.api.console.Terminal} associated
* with this <code>Session</code> or <code>null</code> if this <code>Session</code>
* is headless.
+ *
+ * @return the session terminal
*/
Terminal getTerminal();
@@ -123,18 +126,24 @@ public interface Session extends Runnable {
* Retrieve the {@link org.apache.karaf.shell.api.console.History} associated
* with this <code>Session</code> or <code>null</code> if this <code>Session</code>
* is headless.
+ *
+ * @return the session history
*/
History getHistory();
/**
* Retrieve the {@link org.apache.karaf.shell.api.console.Registry} associated
* with this <code>Session</code>.
+ *
+ * @return the session registry
*/
Registry getRegistry();
/**
* Retrieve the {@link org.apache.karaf.shell.api.console.SessionFactory} associated
* with this <code>Session</code>.
+ *
+ * @return the session factory
*/
SessionFactory getFactory();
@@ -142,6 +151,9 @@ public interface Session extends Runnable {
* Resolve a command name. If the command name has no specified scope, the fully
* qualified command name will be returned, depending on the scopes and current
* subshell.
+ *
+ * @param name the command name
+ * @return the full qualified command name
*/
String resolveCommand(String name);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/SessionFactory.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/SessionFactory.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/SessionFactory.java
index a33e62d..2e93f98 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/SessionFactory.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/SessionFactory.java
@@ -34,6 +34,8 @@ public interface SessionFactory {
/**
* Retrieve the {@link Registry} used by this <code>SessionFactory</code>.
+ *
+ * @return a registry built by the factory.
*/
Registry getRegistry();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/SignalListener.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/SignalListener.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/SignalListener.java
index 3f6927a..25169e4 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/SignalListener.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/SignalListener.java
@@ -24,8 +24,9 @@ package org.apache.karaf.shell.api.console;
public interface SignalListener {
/**
+ * Callback method called when a signal occurs.
*
- * @param signal
+ * @param signal the signal event.
*/
void signal(Signal signal);
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/Terminal.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Terminal.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Terminal.java
index bed0786..76b4cb0 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Terminal.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Terminal.java
@@ -27,57 +27,73 @@ public interface Terminal {
/**
* The infocmp type of this terminal
+ *
+ * @return the terminal type.
*/
String getType();
/**
* Width of the terminal.
+ *
+ * @return the terminal width.
*/
int getWidth();
/**
* Height of the terminal.
+ *
+ * @return the terminal height.
*/
int getHeight();
/**
* Whether ansi sequences are supported or not.
+ *
+ * @return true if ANSI is supported, false else.
*/
boolean isAnsiSupported();
/**
* Whether echo is enabled or not.
+ *
+ * @return true if echo is enabled, false else.
*/
boolean isEchoEnabled();
/**
* Enable or disable echo.
+ *
+ * @param enabled true to enable echo, false else.
*/
void setEchoEnabled(boolean enabled);
/**
- * Add a qualified listener for the specific signal
- * @param listener the listener to register
- * @param signal the signal the listener is interested in
+ * Add a qualified listener for the specific signal.
+ *
+ * @param listener the listener to register.
+ * @param signal the signal the listener is interested in.
*/
void addSignalListener(SignalListener listener, Signal... signal);
/**
- * Add a qualified listener for the specific set of signal
- * @param listener the listener to register
- * @param signals the signals the listener is interested in
+ * Add a qualified listener for the specific set of signal.
+ *
+ * @param listener the listener to register.
+ * @param signals the signals the listener is interested in.
*/
void addSignalListener(SignalListener listener, EnumSet<Signal> signals);
/**
- * Add a global listener for all signals
- * @param listener the listener to register
+ * Add a global listener for all signals.
+ *
+ * @param listener the listener to register.
*/
void addSignalListener(SignalListener listener);
/**
- * Remove a previously registered listener for all the signals it was registered
- * @param listener the listener to remove
+ * Remove a previously registered listener for all the signals it was registered.
+ *
+ * @param listener the listener to remove.
*/
void removeSignalListener(SignalListener listener);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
index adc554b..c766c24 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
@@ -314,14 +314,14 @@ public class ArgumentCompleter implements Completer {
}
/**
- * Returns true if the specified character is a whitespace
- * parameter. Check to ensure that the character is not
- * escaped and returns true from
- * {@link #isDelimiterChar}.
+ * Returns true if the specified character is a whitespace
+ * parameter. Check to ensure that the character is not
+ * escaped and returns true from
+ * {@link #isDelimiterChar}.
*
- * @param buffer the complete command buffer
- * @param pos the index of the character in the buffer
- * @return true if the character should be a delimiter
+ * @param buffer the complete command buffer.
+ * @param pos the index of the character in the buffer.
+ * @return true if the character should be a delimiter, false else.
*/
public boolean isDelimiter(final String buffer, final int pos) {
return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos);
@@ -332,8 +332,12 @@ public class ArgumentCompleter implements Completer {
}
/**
- * The character is a delimiter if it is whitespace, and the
- * preceeding character is not an escape character.
+ * The character is a delimiter if it is whitespace, and the
+ * preceding character is not an escape character.
+ *
+ * @param buffer the complete command buffer.
+ * @param pos the index of the character in the buffer.
+ * @return true if the character should be a delimiter, false else.
*/
public boolean isDelimiterChar(String buffer, int pos) {
return Character.isWhitespace(buffer.charAt(pos));
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/MultiServiceTracker.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/MultiServiceTracker.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/MultiServiceTracker.java
index 38c0a14..3665396 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/MultiServiceTracker.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/MultiServiceTracker.java
@@ -36,7 +36,7 @@ import org.osgi.framework.ServiceReference;
* Track multiple service by its type.
* When tracking multiple services, the dependency is always considered optional.
*
- * @param <T>
+ * @param <T> the service type (interface)..
*/
public abstract class MultiServiceTracker<T> {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/SingleServiceTracker.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/SingleServiceTracker.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/SingleServiceTracker.java
index d007382..9b0d24f 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/SingleServiceTracker.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/SingleServiceTracker.java
@@ -32,7 +32,7 @@ import org.osgi.framework.ServiceReference;
* Track a single service by its type.
* When tracking a single service, the dependency is always considered mandatory.
*
- * @param <T>
+ * @param <T> the service type (interface).
*/
public abstract class SingleServiceTracker<T> {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
index 4476211..2925346 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
@@ -191,7 +191,7 @@ public class ConsoleSessionImpl implements Session {
/**
* Subclasses can override to use a different history file.
*
- * @return
+ * @return the history file
*/
protected File getHistoryFile() {
String defaultHistoryPath = new File(System.getProperty("user.home"), ".karaf/karaf.history").toString();