Fix javadoc in org.eclipse.jgit events package
Change-Id: Ifcb9c67daeb9da84a1461a4f731523ac5df3a223 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
6478577899
commit
dc91f4ef2c
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -48,12 +48,14 @@
|
|||
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 ListenerHandle addConfigChangedListener(
|
|||
/**
|
||||
* Add a listener to the list.
|
||||
*
|
||||
* @param <T>
|
||||
* the type of listener being registered.
|
||||
* @param type
|
||||
* type of listener being registered.
|
||||
* @param listener
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 void setRepository(Repository r) {
|
|||
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 Repository getRepository() {
|
|||
*/
|
||||
public abstract void dispatch(T listener);
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@SuppressWarnings("nls")
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
|
@ -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.
|
||||
}
|
||||
|
|
|
@ -48,8 +48,9 @@
|
|||
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 boolean isEmpty() {
|
|||
}
|
||||
|
||||
/**
|
||||
* 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 boolean isEmpty() {
|
|||
}
|
||||
|
||||
/**
|
||||
* 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 boolean isEmpty() {
|
|||
return result;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public Class<WorkingTreeModifiedListener> getListenerType() {
|
||||
return WorkingTreeModifiedListener.class;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public void dispatch(WorkingTreeModifiedListener listener) {
|
||||
listener.onWorkingTreeModified(this);
|
||||
|
|
|
@ -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…
Reference in New Issue