summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2017-12-18 11:45:55 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2017-12-18 13:19:08 +0100
commit6c83cc16605f6aec9b5e712b3e559927c0823696 (patch)
treeb17e29ad2a97a89eeb206244bbe959048146caff
parentdc91f4ef2c05a0ac8c1d59f938f71297fe45d906 (diff)
downloadjgit-6c83cc16605f6aec9b5e712b3e559927c0823696.tar.gz
jgit-6c83cc16605f6aec9b5e712b3e559927c0823696.zip
Fix javadoc in org.eclipse.jgit fnmatch package
Change-Id: I14384c3bf3c41f8e1c62ec117837c2fc782a832f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/FileNameMatcher.java29
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/Head.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/WildCardHead.java1
8 files changed, 44 insertions, 11 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java
index 10c84c4ecc..60669bb955 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java
@@ -53,6 +53,13 @@ abstract class AbstractHead implements Head {
private final boolean star;
+ /**
+ * Whether the char matches
+ *
+ * @param c
+ * a char.
+ * @return whether the char matches
+ */
protected abstract boolean matches(char c);
AbstractHead(boolean star) {
@@ -60,9 +67,11 @@ abstract class AbstractHead implements Head {
}
/**
+ * Set {@link org.eclipse.jgit.fnmatch.Head}s which will not be modified.
*
* @param newHeads
- * a list of {@link Head}s which will not be modified.
+ * a list of {@link org.eclipse.jgit.fnmatch.Head}s which will
+ * not be modified.
*/
public final void setNewHeads(List<Head> newHeads) {
if (this.newHeads != null)
@@ -70,6 +79,7 @@ abstract class AbstractHead implements Head {
this.newHeads = newHeads;
}
+ /** {@inheritDoc} */
@Override
public List<Head> getNextHeads(char c) {
if (matches(c))
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java
index 6211b246f8..98aee0eef2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java
@@ -47,16 +47,24 @@ package org.eclipse.jgit.fnmatch;
final class CharacterHead extends AbstractHead {
private final char expectedCharacter;
+ /**
+ * Constructor for CharacterHead
+ *
+ * @param expectedCharacter
+ * expected {@code char}
+ */
protected CharacterHead(final char expectedCharacter) {
super(false);
this.expectedCharacter = expectedCharacter;
}
+ /** {@inheritDoc} */
@Override
protected final boolean matches(final char c) {
return c == expectedCharacter;
}
+ /** {@inheritDoc} */
@Override
public String toString() {
return String.valueOf(expectedCharacter);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/FileNameMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/FileNameMatcher.java
index 856d74e997..56630395b2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/FileNameMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/FileNameMatcher.java
@@ -126,12 +126,14 @@ public class FileNameMatcher {
}
/**
+ * Constructor for FileNameMatcher
+ *
* @param patternString
* must contain a pattern which fnmatch would accept.
* @param invalidWildgetCharacter
* if this parameter isn't null then this character will not
* match at wildcards(* and ? are wildcards).
- * @throws InvalidPatternException
+ * @throws org.eclipse.jgit.errors.InvalidPatternException
* if the patternString contains a invalid fnmatch pattern.
*/
public FileNameMatcher(final String patternString,
@@ -141,11 +143,13 @@ public class FileNameMatcher {
}
/**
- * A Copy Constructor which creates a new {@link FileNameMatcher} with the
- * same state and reset point like <code>other</code>.
+ * A Copy Constructor which creates a new
+ * {@link org.eclipse.jgit.fnmatch.FileNameMatcher} with the same state and
+ * reset point like <code>other</code>.
*
* @param other
- * another {@link FileNameMatcher} instance.
+ * another {@link org.eclipse.jgit.fnmatch.FileNameMatcher}
+ * instance.
*/
public FileNameMatcher(FileNameMatcher other) {
this(other.headsStartValue, other.heads);
@@ -347,6 +351,7 @@ public class FileNameMatcher {
}
/**
+ * Append to the string which is matched against the patterns of this class
*
* @param stringToMatch
* extends the string which is matched against the patterns of
@@ -369,10 +374,13 @@ public class FileNameMatcher {
}
/**
+ * Create a {@link org.eclipse.jgit.fnmatch.FileNameMatcher} instance which
+ * uses the same pattern like this matcher, but has the current state of
+ * this matcher as reset and start point
*
- * @return a {@link FileNameMatcher} instance which uses the same pattern
- * like this matcher, but has the current state of this matcher as
- * reset and start point.
+ * @return a {@link org.eclipse.jgit.fnmatch.FileNameMatcher} instance which
+ * uses the same pattern like this matcher, but has the current
+ * state of this matcher as reset and start point.
*/
public FileNameMatcher createMatcherForSuffix() {
final List<Head> copyOfHeads = new ArrayList<>(heads.size());
@@ -381,8 +389,9 @@ public class FileNameMatcher {
}
/**
+ * Whether the matcher matches
*
- * @return true, if the string currently being matched does match.
+ * @return whether the matcher matches
*/
public boolean isMatch() {
if (heads.isEmpty())
@@ -400,9 +409,9 @@ public class FileNameMatcher {
}
/**
+ * Whether a match can be appended
*
- * @return false, if the string being matched will not match when the string
- * gets extended.
+ * @return a boolean.
*/
public boolean canAppendMatch() {
for (int i = 0; i < heads.size(); i++) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java
index 5c18756786..965d90085f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java
@@ -130,6 +130,7 @@ final class GroupHead extends AbstractHead {
}
}
+ /** {@inheritDoc} */
@Override
protected final boolean matches(final char c) {
for (CharacterPattern pattern : characterClasses) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/Head.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/Head.java
index 3de18a7357..49839f8e6e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/Head.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/Head.java
@@ -48,6 +48,7 @@ import java.util.List;
interface Head {
/**
+ * Get the character which decides which heads are returned
*
* @param c
* the character which decides which heads are returned.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java
index f9ddd9e65e..726d1f2f8e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java
@@ -56,6 +56,7 @@ final class LastHead implements Head {
// defined because of javadoc and visibility modifier.
}
+ /** {@inheritDoc} */
@Override
public List<Head> getNextHeads(char c) {
return FileNameMatcher.EMPTY_HEAD_LIST;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java
index 4a0a03df25..c132e28156 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java
@@ -52,11 +52,13 @@ final class RestrictedWildCardHead extends AbstractHead {
this.excludedCharacter = excludedCharacter;
}
+ /** {@inheritDoc} */
@Override
protected final boolean matches(final char c) {
return c != excludedCharacter;
}
+ /** {@inheritDoc} */
@Override
public String toString() {
return isStar() ? "*" : "?"; //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/WildCardHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/WildCardHead.java
index b5173d97d0..c806e23134 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/WildCardHead.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/WildCardHead.java
@@ -49,6 +49,7 @@ final class WildCardHead extends AbstractHead {
super(star);
}
+ /** {@inheritDoc} */
@Override
protected final boolean matches(final char c) {
return true;