From 7aab5edc7b5a5e847d153aebb1e6701706cc2e66 Mon Sep 17 00:00:00 2001 From: Nelson Tavares de Sousa <stu103017@mail.uni-kiel.de> Date: Tue, 16 Jun 2015 13:15:53 +0200 Subject: [PATCH] fixed javadoc --- .../java/teetime/framework/AbstractStage.java | 14 ++++++-- .../framework/AnalysisConfiguration.java | 36 ++++++++++++++++--- .../java/teetime/framework/InputPort.java | 9 +++++ src/main/java/teetime/framework/Stage.java | 3 ++ .../AbstractExceptionListener.java | 5 +-- .../framework/pipe/PipeFactoryRegistry.java | 2 +- 6 files changed, 59 insertions(+), 10 deletions(-) diff --git a/src/main/java/teetime/framework/AbstractStage.java b/src/main/java/teetime/framework/AbstractStage.java index 6f3cf0e2..ab552d4d 100644 --- a/src/main/java/teetime/framework/AbstractStage.java +++ b/src/main/java/teetime/framework/AbstractStage.java @@ -130,6 +130,9 @@ public abstract class AbstractStage extends Stage { /** * Creates and adds an InputPort to the stage * + * @param <T> + * the type of elements to be received + * * @return Newly added InputPort * */ @@ -143,7 +146,9 @@ public abstract class AbstractStage extends Stage { /** * Creates and adds an InputPort to the stage * - * @param type + * @param <T> + * the type of elements to be received + * * @return Newly added InputPort */ protected <T> InputPort<T> createInputPort(final Class<T> type) { @@ -155,6 +160,9 @@ public abstract class AbstractStage extends Stage { /** * Creates and adds an OutputPort to the stage * + * @param <T> + * the type of elements to be sent + * * @return Newly added OutputPort * */ @@ -168,7 +176,9 @@ public abstract class AbstractStage extends Stage { /** * Creates and adds an OutputPort to the stage * - * @param type + * @param <T> + * the type of elements to be sent + * * @return Newly added OutputPort */ protected <T> OutputPort<T> createOutputPort(final Class<T> type) { diff --git a/src/main/java/teetime/framework/AnalysisConfiguration.java b/src/main/java/teetime/framework/AnalysisConfiguration.java index 26139ce6..f9b14001 100644 --- a/src/main/java/teetime/framework/AnalysisConfiguration.java +++ b/src/main/java/teetime/framework/AnalysisConfiguration.java @@ -82,7 +82,11 @@ public abstract class AnalysisConfiguration { * Connects two stages with a pipe within the same thread. * * @param sourcePort + * {@link OutputPort} of the sending stage * @param targetPort + * {@link InputPort} of the sending stage + * @param <T> + * the type of elements to be sent * @return * the pipe instance which connects the two given stages * @@ -97,7 +101,11 @@ public abstract class AnalysisConfiguration { * Connects two stages with a bounded pipe within two separate threads. * * @param sourcePort + * {@link OutputPort} of the sending stage * @param targetPort + * {@link InputPort} of the sending stage + * @param <T> + * the type of elements to be sent * @return * the pipe instance which connects the two given stages * @@ -112,7 +120,11 @@ public abstract class AnalysisConfiguration { * Connects two stages with a unbounded pipe within two separate threads. * * @param sourcePort + * {@link OutputPort} of the sending stage * @param targetPort + * {@link InputPort} of the sending stage + * @param <T> + * the type of elements to be sent * @return * the pipe instance which connects the two given stages * @@ -127,10 +139,15 @@ public abstract class AnalysisConfiguration { * Connects two stages with a bounded pipe within two separate threads. * * @param sourcePort + * {@link OutputPort} of the sending stage * @param targetPort + * {@link InputPort} of the sending stage * @param capacity * capacity of the underlying queue + * @param <T> + * the type of elements to be sent * @return + * the pipe instance which connects the two given stages * * @deprecated since 1.2. Use {@link #connectPorts(OutputPort, InputPort)} instead. */ @@ -143,10 +160,15 @@ public abstract class AnalysisConfiguration { * Connects two stages with a unbounded pipe within two separate threads. * * @param sourcePort + * {@link OutputPort} of the sending stage * @param targetPort + * {@link InputPort} of the sending stage * @param capacity * capacity of the underlying queue + * @param <T> + * the type of elements to be sent * @return + * the pipe instance which connects the two given stages * * @deprecated since 1.2. Use {@link #connectPorts(OutputPort, InputPort)} instead. */ @@ -156,12 +178,14 @@ public abstract class AnalysisConfiguration { } /** - * Connects two ports with a pipe. + * Connects two ports with a pipe with a default capacity of currently 4 * * @param sourcePort - * port from the sending stage + * {@link OutputPort} of the sending stage * @param targetPort - * port from the receiving stage + * {@link InputPort} of the sending stage + * @param <T> + * the type of elements to be sent */ protected <T> void connectPorts(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) { connectPorts(sourcePort, targetPort, 4); @@ -171,11 +195,13 @@ public abstract class AnalysisConfiguration { * Connects to ports with a pipe of a certain capacity * * @param sourcePort - * port from the sending stage + * {@link OutputPort} of the sending stage * @param targetPort - * port from the receiving stage + * {@link InputPort} of the sending stage * @param capacity * the pipe is set to this capacity, if the value is greater than 0. If it is 0, than the pipe is unbounded, thus growing of the pipe is enabled. + * @param <T> + * the type of elements to be sent */ protected <T> void connectPorts(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort, final int capacity) { connections.add(new Connection<T>(sourcePort, targetPort, capacity)); diff --git a/src/main/java/teetime/framework/InputPort.java b/src/main/java/teetime/framework/InputPort.java index f6e2a30d..d2ffc259 100644 --- a/src/main/java/teetime/framework/InputPort.java +++ b/src/main/java/teetime/framework/InputPort.java @@ -15,6 +15,15 @@ */ package teetime.framework; +/** + * + * @author Christian Wulf + * + * @param <T> + * the type of elements to be sent + * + * @since 1.0 + */ public final class InputPort<T> extends AbstractPort<T> { InputPort(final Class<T> type, final Stage owningStage) { diff --git a/src/main/java/teetime/framework/Stage.java b/src/main/java/teetime/framework/Stage.java index aff67ce4..a2c867ff 100644 --- a/src/main/java/teetime/framework/Stage.java +++ b/src/main/java/teetime/framework/Stage.java @@ -131,6 +131,9 @@ public abstract class Stage { /** * Event that is triggered within the initialization phase of the analysis. * It does not count to the execution time. + * + * @throws Exception + * an arbitrary exception if an error occurs during the initialization */ @SuppressWarnings("PMD.SignatureDeclareThrowsException") public abstract void onInitializing() throws Exception; diff --git a/src/main/java/teetime/framework/exceptionHandling/AbstractExceptionListener.java b/src/main/java/teetime/framework/exceptionHandling/AbstractExceptionListener.java index 8cbc63dd..7f1c774f 100644 --- a/src/main/java/teetime/framework/exceptionHandling/AbstractExceptionListener.java +++ b/src/main/java/teetime/framework/exceptionHandling/AbstractExceptionListener.java @@ -21,8 +21,9 @@ import org.slf4j.LoggerFactory; import teetime.framework.Stage; /** - * Represent a minimalistic StageExceptionListener. Listener which extend from this one, must a least implement this functionality. - * This abstract class provides a Logger {@link #logger} and a method to terminate the threads execution {@link #terminateExecution()}. + * Represents a minimalistic StageExceptionListener. + * Listener which extend from this one, must a least implement this functionality. + * This abstract class provides a Logger {@link #logger} and the method {@link #onStageException(Exception, Stage)} which is called on every raised exception. */ public abstract class AbstractExceptionListener { diff --git a/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java b/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java index 2b3a024a..f8347ce1 100644 --- a/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java +++ b/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java @@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory; * <p> * To get a PipeFactory instance, call {@link #getPipeFactory(ThreadCommunication, PipeOrdering, boolean)}. * - * @Deprecated since 1.2 + * @deprecated since 1.2 */ @Deprecated public final class PipeFactoryRegistry { -- GitLab