Browse Source

Fix javadoc in org.eclipse.jgit events package

Change-Id: Ifcb9c67daeb9da84a1461a4f731523ac5df3a223
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-4.10
Matthias Sohn 7 years ago
parent
commit
dc91f4ef2c
  1. 6
      org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedEvent.java
  2. 4
      org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedListener.java
  3. 6
      org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedEvent.java
  4. 4
      org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedListener.java
  5. 9
      org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerHandle.java
  6. 8
      org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerList.java
  7. 6
      org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedEvent.java
  8. 4
      org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedListener.java
  9. 16
      org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java
  10. 4
      org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryListener.java
  11. 19
      org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedEvent.java
  12. 6
      org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedListener.java

6
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<ConfigChangedListener> {
/** {@inheritDoc} */
@Override
public Class<ConfigChangedListener> getListenerType() {
return ConfigChangedListener.class;
}
/** {@inheritDoc} */
@Override
public void dispatch(ConfigChangedListener listener) {
listener.onConfigChanged(this);

4
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.

6
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<IndexChangedListener> {
/** {@inheritDoc} */
@Override
public Class<IndexChangedListener> getListenerType() {
return IndexChangedListener.class;
}
/** {@inheritDoc} */
@Override
public void dispatch(IndexChangedListener listener) {
listener.onIndexChanged(this);

4
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.

9
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() {

8
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<Class<? extends RepositoryListener>, CopyOnWriteArrayList<ListenerHandle>> 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 <T>
* the type of listener being registered.
* @param type
* type of listener being registered.
* @param listener

6
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<RefsChangedListener> {
/** {@inheritDoc} */
@Override
public Class<RefsChangedListener> getListenerType() {
return RefsChangedListener.class;
}
/** {@inheritDoc} */
@Override
public void dispatch(RefsChangedListener listener) {
listener.onRefsChanged(this);

4
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.

16
org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java

@ -59,7 +59,8 @@ public abstract class RepositoryEvent<T extends RepositoryListener> {
* Set the repository this event occurred on.
* <p>
* 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<T extends RepositoryListener> {
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<T> getListenerType();
/**
@ -85,6 +94,7 @@ public abstract class RepositoryEvent<T extends RepositoryListener> {
*/
public abstract void dispatch(T listener);
/** {@inheritDoc} */
@SuppressWarnings("nls")
@Override
public String toString() {

4
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.
}

19
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<String> 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<WorkingTreeModifiedListener> getListenerType() {
return WorkingTreeModifiedListener.class;
}
/** {@inheritDoc} */
@Override
public void dispatch(WorkingTreeModifiedListener listener) {
listener.onWorkingTreeModified(this);

6
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);
}

Loading…
Cancel
Save