Author: xavier
Date: Wed Dec 19 09:10:05 2007
New Revision: 605621
URL: http://svn.apache.org/viewvc?rev=605621&view=rev
Log:
fix style
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/AnyMatcher.java
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/MatcherHelper.java
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ModuleIdMatcher.java
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/NoMatcher.java
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcher.java
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/AnyMatcher.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/AnyMatcher.java?rev=605621&r1=605620&r2=605621&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/AnyMatcher.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/AnyMatcher.java
Wed Dec 19 09:10:05 2007
@@ -21,7 +21,7 @@
* A matcher that will match everything.
*/
public/* @Immutable */class AnyMatcher implements Matcher {
- public final static Matcher INSTANCE = new AnyMatcher();
+ public static final Matcher INSTANCE = new AnyMatcher();
public AnyMatcher() {
}
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java?rev=605621&r1=605620&r2=605621&view=diff
==============================================================================
---
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java
(original)
+++
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher.java
Wed Dec 19 09:10:05 2007
@@ -39,20 +39,20 @@
}
private static final class ExactOrRegexpMatcher implements Matcher {
- private Matcher _exact;
+ private Matcher exact;
- private Matcher _regexp;
+ private Matcher regexp;
public ExactOrRegexpMatcher(String expression) {
- _exact = ExactPatternMatcher.INSTANCE.getMatcher(expression);
- _regexp = RegexpPatternMatcher.INSTANCE.getMatcher(expression);
+ exact = ExactPatternMatcher.INSTANCE.getMatcher(expression);
+ regexp = RegexpPatternMatcher.INSTANCE.getMatcher(expression);
}
public boolean matches(String input) {
if (input == null) {
throw new NullPointerException();
}
- return _exact.matches(input) || _regexp.matches(input);
+ return exact.matches(input) || regexp.matches(input);
}
public boolean isExact() {
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java?rev=605621&r1=605620&r2=605621&view=diff
==============================================================================
---
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java
(original)
+++
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ExactPatternMatcher.java
Wed Dec 19 09:10:05 2007
@@ -35,17 +35,17 @@
}
private static/* @Immutable */class ExactMatcher implements Matcher {
- protected String _expression;
+ private String expression;
public ExactMatcher(String expression) {
- _expression = expression;
+ this.expression = expression;
}
public boolean matches(String input) {
if (input == null) {
throw new NullPointerException();
}
- return input.equals(_expression);
+ return input.equals(expression);
}
public boolean isExact() {
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java?rev=605621&r1=605620&r2=605621&view=diff
==============================================================================
---
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
(original)
+++
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
Wed Dec 19 09:10:05 2007
@@ -55,11 +55,11 @@
}
private static class GlobMatcher implements Matcher {
- private Pattern _pattern;
+ private Pattern pattern;
public GlobMatcher(String expression) throws PatternSyntaxException {
try {
- _pattern = new GlobCompiler().compile(expression);
+ pattern = new GlobCompiler().compile(expression);
} catch (MalformedPatternException e) {
throw new PatternSyntaxException(e.getMessage(), expression,
0);
}
@@ -69,7 +69,7 @@
if (input == null) {
throw new NullPointerException();
}
- return new Perl5Matcher().matches(input, _pattern);
+ return new Perl5Matcher().matches(input, pattern);
}
public boolean isExact() {
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/MatcherHelper.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/MatcherHelper.java?rev=605621&r1=605620&r2=605621&view=diff
==============================================================================
---
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/MatcherHelper.java
(original)
+++
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/MatcherHelper.java
Wed Dec 19 09:10:05 2007
@@ -24,8 +24,11 @@
/**
* Set of helper methods to match ModuleId, ModuleRevisionId, ArtifactId
*/
-public class MatcherHelper {
+public final class MatcherHelper {
// TODO this class might be better off as MatcherUtils in util package
+
+ private MatcherHelper() {
+ }
public static boolean matches(PatternMatcher m, String expression, String
input) {
return m.getMatcher(expression).matches(input);
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ModuleIdMatcher.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ModuleIdMatcher.java?rev=605621&r1=605620&r2=605621&view=diff
==============================================================================
---
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ModuleIdMatcher.java
(original)
+++
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/ModuleIdMatcher.java
Wed Dec 19 09:10:05 2007
@@ -21,27 +21,28 @@
public class ModuleIdMatcher {
// TODO this class should be moved out of this package
- private Matcher _orgMatcher;
+ private Matcher orgMatcher;
- private Matcher _moduleMatcher;
+ private Matcher moduleMatcher;
- private ModuleId _mid;
+ private ModuleId mid;
- private PatternMatcher _pm;
+ private PatternMatcher pm;
public ModuleIdMatcher(ModuleId mid, PatternMatcher pm) {
- _mid = mid;
- _pm = pm;
- _orgMatcher = pm.getMatcher(mid.getOrganisation() == null ?
PatternMatcher.ANY_EXPRESSION
+ this.mid = mid;
+ this.pm = pm;
+ this.orgMatcher = pm.getMatcher(mid.getOrganisation() == null
+ ? PatternMatcher.ANY_EXPRESSION
: mid.getOrganisation());
- _moduleMatcher = pm.getMatcher(mid.getName());
+ this.moduleMatcher = pm.getMatcher(mid.getName());
}
public boolean matches(ModuleId mid) {
- return _orgMatcher.matches(mid.getOrganisation()) &&
_moduleMatcher.matches(mid.getName());
+ return orgMatcher.matches(mid.getOrganisation()) &&
moduleMatcher.matches(mid.getName());
}
public String toString() {
- return _mid + " (" + _pm.getName() + ")";
+ return mid + " (" + pm.getName() + ")";
}
}
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/NoMatcher.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/NoMatcher.java?rev=605621&r1=605620&r2=605621&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/NoMatcher.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/NoMatcher.java
Wed Dec 19 09:10:05 2007
@@ -22,7 +22,7 @@
*/
public final/* @Immutable */class NoMatcher implements Matcher {
- public final static Matcher INSTANCE = new NoMatcher();
+ public static final Matcher INSTANCE = new NoMatcher();
public NoMatcher() {
}
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcher.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcher.java?rev=605621&r1=605620&r2=605621&view=diff
==============================================================================
---
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcher.java
(original)
+++
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/matcher/RegexpPatternMatcher.java
Wed Dec 19 09:10:05 2007
@@ -43,20 +43,20 @@
}
private static/* @Immutable */class RegexpMatcher implements Matcher {
- private Pattern _pattern;
+ private Pattern pattern;
public RegexpMatcher(String expression) throws PatternSyntaxException {
if (expression == null) {
throw new NullPointerException();
}
- _pattern = Pattern.compile(expression);
+ pattern = Pattern.compile(expression);
}
public boolean matches(String input) {
if (input == null) {
throw new NullPointerException();
}
- return _pattern.matcher(input).matches();
+ return pattern.matcher(input).matches();
}
public boolean isExact() {