aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2017-12-18 13:17:49 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2017-12-18 13:19:10 +0100
commit107c71a6e6937c0a2d2fe604960eb9d7f1de33c3 (patch)
tree3fb00930627f4776b1fcebf2dcfe53aef8f8c894 /org.eclipse.jgit/src/org/eclipse/jgit
parentd1804d3f747fab4c0ead337e8b3749f13f284734 (diff)
downloadjgit-107c71a6e6937c0a2d2fe604960eb9d7f1de33c3.tar.gz
jgit-107c71a6e6937c0a2d2fe604960eb9d7f1de33c3.zip
Fix javadoc in org.eclipse.jgit ignore package
Change-Id: I1a81d371420cd4cf90ab9e048026c0ab8a763018 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java16
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreNode.java15
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/AbstractMatcher.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/IMatcher.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/LeadingAsteriskMatcher.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/NameMatcher.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java14
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/TrailingAsteriskMatcher.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildCardMatcher.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildMatcher.java2
11 files changed, 55 insertions, 16 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java
index 7298a082c7..8abd7fa920 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java
@@ -77,6 +77,7 @@ public class FastIgnoreRule {
private final boolean dirOnly;
/**
+ * Constructor for FastIgnoreRule
*
* @param pattern
* ignore pattern as described in <a href=
@@ -160,15 +161,18 @@ public class FastIgnoreRule {
}
/**
- * @return True if the pattern is just a file name and not a path
+ * Whether the pattern is just a file name and not a path
+ *
+ * @return {@code true} if the pattern is just a file name and not a path
*/
public boolean getNameOnly() {
return !(matcher instanceof PathMatcher);
}
/**
+ * Whether the pattern should match directories only
*
- * @return True if the pattern should match directories only
+ * @return {@code true} if the pattern should match directories only
*/
public boolean dirOnly() {
return dirOnly;
@@ -193,13 +197,17 @@ public class FastIgnoreRule {
}
/**
- * @return true if the rule never matches (comment line or broken pattern)
+ * Whether the rule never matches
+ *
+ * @return {@code true} if the rule never matches (comment line or broken
+ * pattern)
* @since 4.1
*/
public boolean isEmpty() {
return matcher == NO_MATCH;
}
+ /** {@inheritDoc} */
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -212,6 +220,7 @@ public class FastIgnoreRule {
}
+ /** {@inheritDoc} */
@Override
public int hashCode() {
final int prime = 31;
@@ -222,6 +231,7 @@ public class FastIgnoreRule {
return result;
}
+ /** {@inheritDoc} */
@Override
public boolean equals(Object obj) {
if (this == obj)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreNode.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreNode.java
index 6314c63d2e..1ad60101e7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreNode.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreNode.java
@@ -81,7 +81,9 @@ public class IgnoreNode {
/** The rules that have been parsed into this node. */
private final List<FastIgnoreRule> rules;
- /** Create an empty ignore node with no rules. */
+ /**
+ * Create an empty ignore node with no rules.
+ */
public IgnoreNode() {
rules = new ArrayList<>();
}
@@ -91,7 +93,7 @@ public class IgnoreNode {
*
* @param rules
* list of rules.
- **/
+ */
public IgnoreNode(List<FastIgnoreRule> rules) {
this.rules = rules;
}
@@ -102,7 +104,7 @@ public class IgnoreNode {
* @param in
* input stream holding the standard ignore format. The caller is
* responsible for closing the stream.
- * @throws IOException
+ * @throws java.io.IOException
* Error thrown when reading an ignore file.
*/
public void parse(InputStream in) throws IOException {
@@ -122,7 +124,11 @@ public class IgnoreNode {
return new BufferedReader(new InputStreamReader(in, Constants.CHARSET));
}
- /** @return list of all ignore rules held by this node. */
+ /**
+ * Get list of all ignore rules held by this node
+ *
+ * @return list of all ignore rules held by this node
+ */
public List<FastIgnoreRule> getRules() {
return Collections.unmodifiableList(rules);
}
@@ -194,6 +200,7 @@ public class IgnoreNode {
return MatchResult.CHECK_PARENT;
}
+ /** {@inheritDoc} */
@Override
public String toString() {
return rules.toString();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/AbstractMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/AbstractMatcher.java
index 64c2a74554..8e8e5717a3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/AbstractMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/AbstractMatcher.java
@@ -64,16 +64,19 @@ public abstract class AbstractMatcher implements IMatcher {
this.dirOnly = dirOnly;
}
+ /** {@inheritDoc} */
@Override
public String toString() {
return pattern;
}
+ /** {@inheritDoc} */
@Override
public int hashCode() {
return pattern.hashCode();
}
+ /** {@inheritDoc} */
@Override
public boolean equals(Object obj) {
if (this == obj)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/IMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/IMatcher.java
index 5b184cb19f..dbf06385c5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/IMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/IMatcher.java
@@ -74,9 +74,10 @@ public interface IMatcher {
* with a slash)
* @param pathMatch
* {@code true} if the match is for the full path: prefix-only
- * matches are not allowed, and {@link NameMatcher}s must match
- * only the last component (if they can -- they may not, if they
- * are anchored at the beginning)
+ * matches are not allowed, and
+ * {@link org.eclipse.jgit.ignore.internal.NameMatcher}s must
+ * match only the last component (if they can -- they may not, if
+ * they are anchored at the beginning)
* @return true if this matcher pattern matches given string
*/
boolean matches(String path, boolean assumeDirectory, boolean pathMatch);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/LeadingAsteriskMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/LeadingAsteriskMatcher.java
index cc0fe937b4..2bae8f229f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/LeadingAsteriskMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/LeadingAsteriskMatcher.java
@@ -55,6 +55,7 @@ public class LeadingAsteriskMatcher extends NameMatcher {
"Pattern must have leading asterisk: " + pattern); //$NON-NLS-1$
}
+ /** {@inheritDoc} */
@Override
public boolean matches(String segment, int startIncl, int endExcl,
boolean assumeDirectory) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/NameMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/NameMatcher.java
index 9667837a41..6a4b2b8677 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/NameMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/NameMatcher.java
@@ -71,6 +71,7 @@ public class NameMatcher extends AbstractMatcher {
}
}
+ /** {@inheritDoc} */
@Override
public boolean matches(String path, boolean assumeDirectory,
boolean pathMatch) {
@@ -120,6 +121,7 @@ public class NameMatcher extends AbstractMatcher {
return false;
}
+ /** {@inheritDoc} */
@Override
public boolean matches(String segment, int startIncl, int endExcl,
boolean assumeDirectory) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java
index 9b3a2aac78..50e78ae751 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java
@@ -105,14 +105,17 @@ public class PathMatcher extends AbstractMatcher {
}
/**
+ * Create path matcher
*
* @param pattern
+ * a pattern
* @param pathSeparator
* if this parameter isn't null then this character will not
* match at wildcards(* and ? are wildcards).
* @param dirOnly
+ * a boolean.
* @return never null
- * @throws InvalidPatternException
+ * @throws org.eclipse.jgit.errors.InvalidPatternException
*/
public static IMatcher createPathMatcher(String pattern,
Character pathSeparator, boolean dirOnly)
@@ -170,6 +173,7 @@ public class PathMatcher extends AbstractMatcher {
}
}
+ /** {@inheritDoc} */
@Override
public boolean matches(String path, boolean assumeDirectory,
boolean pathMatch) {
@@ -212,6 +216,7 @@ public class PathMatcher extends AbstractMatcher {
return false;
}
+ /** {@inheritDoc} */
@Override
public boolean matches(String segment, int startIncl, int endExcl,
boolean assumeDirectory) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java
index 79df1511d1..8828931eef 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java
@@ -56,8 +56,8 @@ import org.eclipse.jgit.ignore.FastIgnoreRule;
import org.eclipse.jgit.internal.JGitText;
/**
- * Various {@link String} related utility methods, written mostly to avoid
- * generation of new String objects (e.g. via splitting Strings etc).
+ * Various {@link java.lang.String} related utility methods, written mostly to
+ * avoid generation of new String objects (e.g. via splitting Strings etc).
*/
public class Strings {
@@ -67,6 +67,8 @@ public class Strings {
}
/**
+ * Strip trailing characters
+ *
* @param pattern
* non null
* @param c
@@ -87,6 +89,8 @@ public class Strings {
}
/**
+ * Strip trailing whitespace characters
+ *
* @param pattern
* non null
* @return new string with all trailing whitespace removed
@@ -105,10 +109,12 @@ public class Strings {
}
/**
+ * Check if pattern is a directory pattern ending with a path separator
+ *
* @param pattern
* non null
- * @return true if the last character, which is not whitespace, is a path
- * separator
+ * @return {@code true} if the last character, which is not whitespace, is a
+ * path separator
*/
public static boolean isDirectoryPattern(String pattern) {
for (int i = pattern.length() - 1; i >= 0; i--) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/TrailingAsteriskMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/TrailingAsteriskMatcher.java
index 2e148f4a6f..7df42b76cf 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/TrailingAsteriskMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/TrailingAsteriskMatcher.java
@@ -55,6 +55,7 @@ public class TrailingAsteriskMatcher extends NameMatcher {
"Pattern must have trailing asterisk: " + pattern); //$NON-NLS-1$
}
+ /** {@inheritDoc} */
@Override
public boolean matches(String segment, int startIncl, int endExcl,
boolean assumeDirectory) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildCardMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildCardMatcher.java
index f64050f83c..ca8c581d4b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildCardMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildCardMatcher.java
@@ -50,7 +50,7 @@ import org.eclipse.jgit.errors.InvalidPatternException;
/**
* Matcher built from path segments containing wildcards. This matcher converts
- * glob wildcards to Java {@link Pattern}'s.
+ * glob wildcards to Java {@link java.util.regex.Pattern}'s.
* <p>
* This class is immutable and thread safe.
*/
@@ -64,6 +64,7 @@ public class WildCardMatcher extends NameMatcher {
p = convertGlob(subPattern);
}
+ /** {@inheritDoc} */
@Override
public boolean matches(String segment, int startIncl, int endExcl,
boolean assumeDirectory) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildMatcher.java
index 363b3cee84..ba8015cc09 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildMatcher.java
@@ -61,12 +61,14 @@ public final class WildMatcher extends AbstractMatcher {
super(WILDMATCH, false);
}
+ /** {@inheritDoc} */
@Override
public final boolean matches(String path, boolean assumeDirectory,
boolean pathMatch) {
return true;
}
+ /** {@inheritDoc} */
@Override
public final boolean matches(String segment, int startIncl, int endExcl,
boolean assumeDirectory) {