From dc91f4ef2c05a0ac8c1d59f938f71297fe45d906 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 18 Dec 2017 11:39:12 +0100 Subject: [PATCH] Fix javadoc in org.eclipse.jgit events package Change-Id: Ifcb9c67daeb9da84a1461a4f731523ac5df3a223 Signed-off-by: Matthias Sohn --- .../jgit/events/ConfigChangedEvent.java | 6 +++++- .../jgit/events/ConfigChangedListener.java | 4 +++- .../jgit/events/IndexChangedEvent.java | 6 +++++- .../jgit/events/IndexChangedListener.java | 4 +++- .../eclipse/jgit/events/ListenerHandle.java | 9 +++++++-- .../org/eclipse/jgit/events/ListenerList.java | 8 ++++---- .../eclipse/jgit/events/RefsChangedEvent.java | 6 +++++- .../jgit/events/RefsChangedListener.java | 4 +++- .../eclipse/jgit/events/RepositoryEvent.java | 16 +++++++++++++--- .../jgit/events/RepositoryListener.java | 4 +++- .../jgit/events/WorkingTreeModifiedEvent.java | 19 +++++++++++-------- .../events/WorkingTreeModifiedListener.java | 6 ++++-- 12 files changed, 66 insertions(+), 26 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedEvent.java index 79598eacb3..69f6ff82ce 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedEvent.java @@ -43,13 +43,17 @@ package org.eclipse.jgit.events; -/** Describes a change to one or more keys in the configuration. */ +/** + * Describes a change to one or more keys in the configuration. + */ public class ConfigChangedEvent extends RepositoryEvent { + /** {@inheritDoc} */ @Override public Class getListenerType() { return ConfigChangedListener.class; } + /** {@inheritDoc} */ @Override public void dispatch(ConfigChangedListener listener) { listener.onConfigChanged(this); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedListener.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedListener.java index 322cf7f6d6..34fe90a58d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedListener.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedListener.java @@ -43,7 +43,9 @@ package org.eclipse.jgit.events; -/** Receives {@link ConfigChangedEvent}s. */ +/** + * Receives {@link org.eclipse.jgit.events.ConfigChangedEvent}s. + */ public interface ConfigChangedListener extends RepositoryListener { /** * Invoked when any change is made to the configuration. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedEvent.java index a54288ee9e..647ec8a20c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedEvent.java @@ -43,13 +43,17 @@ package org.eclipse.jgit.events; -/** Describes a change to one or more paths in the index file. */ +/** + * Describes a change to one or more paths in the index file. + */ public class IndexChangedEvent extends RepositoryEvent { + /** {@inheritDoc} */ @Override public Class getListenerType() { return IndexChangedListener.class; } + /** {@inheritDoc} */ @Override public void dispatch(IndexChangedListener listener) { listener.onIndexChanged(this); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedListener.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedListener.java index d41ef74ee9..682cea563a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedListener.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedListener.java @@ -43,7 +43,9 @@ package org.eclipse.jgit.events; -/** Receives {@link IndexChangedEvent}s. */ +/** + * Receives {@link org.eclipse.jgit.events.IndexChangedEvent}s. + */ public interface IndexChangedListener extends RepositoryListener { /** * Invoked when any change is made to the index. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerHandle.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerHandle.java index d8cd756d99..dcd5374073 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerHandle.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerHandle.java @@ -43,7 +43,9 @@ package org.eclipse.jgit.events; -/** Tracks a previously registered {@link RepositoryListener}. */ +/** + * Tracks a previously registered {@link org.eclipse.jgit.events.RepositoryListener}. + */ public class ListenerHandle { private final ListenerList parent; @@ -59,11 +61,14 @@ public class ListenerHandle { this.listener = listener; } - /** Remove the listener and stop receiving events. */ + /** + * Remove the listener and stop receiving events. + */ public void remove() { parent.remove(this); } + /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerList.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerList.java index cea03db2ec..9be1c96e91 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerList.java @@ -48,12 +48,14 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.CopyOnWriteArrayList; -/** Manages a thread-safe list of {@link RepositoryListener}s. */ +/** + * Manages a thread-safe list of {@link org.eclipse.jgit.events.RepositoryListener}s. + */ public class ListenerList { private final ConcurrentMap, CopyOnWriteArrayList> lists = new ConcurrentHashMap<>(); /** - * Register a {@link WorkingTreeModifiedListener}. + * Register a {@link org.eclipse.jgit.events.WorkingTreeModifiedListener}. * * @param listener * the listener implementation. @@ -102,8 +104,6 @@ public class ListenerList { /** * Add a listener to the list. * - * @param - * the type of listener being registered. * @param type * type of listener being registered. * @param listener diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedEvent.java index 36af3f8b77..f1923afc20 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedEvent.java @@ -43,13 +43,17 @@ package org.eclipse.jgit.events; -/** Describes a change to one or more references of a repository. */ +/** + * Describes a change to one or more references of a repository. + */ public class RefsChangedEvent extends RepositoryEvent { + /** {@inheritDoc} */ @Override public Class getListenerType() { return RefsChangedListener.class; } + /** {@inheritDoc} */ @Override public void dispatch(RefsChangedListener listener) { listener.onRefsChanged(this); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedListener.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedListener.java index 9c0f4ed588..f3cdad12e5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedListener.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedListener.java @@ -43,7 +43,9 @@ package org.eclipse.jgit.events; -/** Receives {@link RefsChangedEvent}s. */ +/** + * Receives {@link org.eclipse.jgit.events.RefsChangedEvent}s. + */ public interface RefsChangedListener extends RepositoryListener { /** * Invoked when any reference changes. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java index 1b7d28c333..576b21ba61 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java @@ -59,7 +59,8 @@ public abstract class RepositoryEvent { * Set the repository this event occurred on. *

* This method should only be invoked once on each event object, and is - * automatically set by {@link Repository#fireEvent(RepositoryEvent)}. + * automatically set by + * {@link org.eclipse.jgit.lib.Repository#fireEvent(RepositoryEvent)}. * * @param r * the repository. @@ -69,12 +70,20 @@ public abstract class RepositoryEvent { repository = r; } - /** @return the repository that was changed. */ + /** + * Get the repository that was changed + * + * @return the repository that was changed + */ public Repository getRepository() { return repository; } - /** @return type of listener this event dispatches to. */ + /** + * Get type of listener this event dispatches to + * + * @return type of listener this event dispatches to + */ public abstract Class getListenerType(); /** @@ -85,6 +94,7 @@ public abstract class RepositoryEvent { */ public abstract void dispatch(T listener); + /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryListener.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryListener.java index 4f951e5f87..a2cf0cc664 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryListener.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryListener.java @@ -43,7 +43,9 @@ package org.eclipse.jgit.events; -/** A listener can register for event delivery. */ +/** + * A listener can register for event delivery. + */ public interface RepositoryListener { // Empty marker interface; see extensions for actual methods. } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedEvent.java index 6517823db2..9fbcc4dd50 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedEvent.java @@ -48,8 +48,9 @@ import java.util.Collections; import org.eclipse.jgit.annotations.NonNull; /** - * A {@link RepositoryEvent} describing changes to the working tree. It is fired - * whenever a {@link org.eclipse.jgit.dircache.DirCacheCheckout} modifies + * A {@link org.eclipse.jgit.events.RepositoryEvent} describing changes to the + * working tree. It is fired whenever a + * {@link org.eclipse.jgit.dircache.DirCacheCheckout} modifies * (adds/deletes/updates) files in the working tree. * * @since 4.9 @@ -62,8 +63,8 @@ public class WorkingTreeModifiedEvent private Collection deleted; /** - * Creates a new {@link WorkingTreeModifiedEvent} with the given - * collections. + * Creates a new {@link org.eclipse.jgit.events.WorkingTreeModifiedEvent} + * with the given collections. * * @param modified * repository-relative paths that were added or updated @@ -88,8 +89,8 @@ public class WorkingTreeModifiedEvent } /** - * Retrieves the {@link Collection} of repository-relative paths of files - * that were modified (added or updated). + * Retrieves the {@link java.util.Collection} of repository-relative paths + * of files that were modified (added or updated). * * @return the set */ @@ -103,8 +104,8 @@ public class WorkingTreeModifiedEvent } /** - * Retrieves the {@link Collection} of repository-relative paths of files - * that were deleted. + * Retrieves the {@link java.util.Collection} of repository-relative paths + * of files that were deleted. * * @return the set */ @@ -117,11 +118,13 @@ public class WorkingTreeModifiedEvent return result; } + /** {@inheritDoc} */ @Override public Class getListenerType() { return WorkingTreeModifiedListener.class; } + /** {@inheritDoc} */ @Override public void dispatch(WorkingTreeModifiedListener listener) { listener.onWorkingTreeModified(this); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedListener.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedListener.java index 402a900226..728ce26a2c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedListener.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedListener.java @@ -44,8 +44,8 @@ package org.eclipse.jgit.events; /** - * Receives {@link WorkingTreeModifiedEvent}s, which are fired whenever a - * {@link org.eclipse.jgit.dircache.DirCacheCheckout} modifies + * Receives {@link org.eclipse.jgit.events.WorkingTreeModifiedEvent}s, which are + * fired whenever a {@link org.eclipse.jgit.dircache.DirCacheCheckout} modifies * (adds/deletes/updates) files in the working tree. * * @since 4.9 @@ -56,6 +56,8 @@ public interface WorkingTreeModifiedListener extends RepositoryListener { * Respond to working tree modifications. * * @param event + * a {@link org.eclipse.jgit.events.WorkingTreeModifiedEvent} + * object. */ void onWorkingTreeModified(WorkingTreeModifiedEvent event); } -- 2.39.5