org.apache.ivy.plugins.matcher.NoMatcher Java Examples
The following examples show how to use
org.apache.ivy.plugins.matcher.NoMatcher.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ChangingModuleDetector.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
private Matcher getChangingMatcher() { if (!(resolver instanceof AbstractResolver)) { return NoMatcher.INSTANCE; } AbstractResolver abstractResolver = (AbstractResolver) resolver; String changingMatcherName = JavaReflectionUtil.method(AbstractResolver.class, String.class, "getChangingMatcherName").invoke(abstractResolver); String changingPattern = JavaReflectionUtil.method(AbstractResolver.class, String.class, "getChangingPattern").invoke(abstractResolver); if (changingMatcherName == null || changingPattern == null) { return NoMatcher.INSTANCE; } PatternMatcher matcher = abstractResolver.getSettings().getMatcher(changingMatcherName); if (matcher == null) { throw new IllegalStateException("unknown matcher '" + changingMatcherName + "'. It is set as changing matcher in " + this); } return matcher.getMatcher(changingPattern); }
Example #2
Source File: ChangingModuleDetector.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
private Matcher getChangingMatcher() { if (!(resolver instanceof AbstractResolver)) { return NoMatcher.INSTANCE; } AbstractResolver abstractResolver = (AbstractResolver) resolver; String changingMatcherName = JavaReflectionUtil.method(AbstractResolver.class, String.class, "getChangingMatcherName").invoke(abstractResolver); String changingPattern = JavaReflectionUtil.method(AbstractResolver.class, String.class, "getChangingPattern").invoke(abstractResolver); if (changingMatcherName == null || changingPattern == null) { return NoMatcher.INSTANCE; } PatternMatcher matcher = abstractResolver.getSettings().getMatcher(changingMatcherName); if (matcher == null) { throw new IllegalStateException("unknown matcher '" + changingMatcherName + "'. It is set as changing matcher in " + this); } return matcher.getMatcher(changingPattern); }
Example #3
Source File: DefaultRepositoryCacheManager.java From ant-ivy with Apache License 2.0 | 5 votes |
private Matcher getChangingMatcher(CacheMetadataOptions options) { String changingPattern = options.getChangingPattern() != null ? options .getChangingPattern() : this.changingPattern; if (changingPattern == null) { return NoMatcher.INSTANCE; } String changingMatcherName = options.getChangingMatcherName() != null ? options .getChangingMatcherName() : this.changingMatcherName; PatternMatcher matcher = settings.getMatcher(changingMatcherName); if (matcher == null) { throw new IllegalStateException("unknown matcher '" + changingMatcherName + "'. It is set as changing matcher in " + this); } return matcher.getMatcher(changingPattern); }