org.apache.ivy.plugins.resolver.AbstractResolver Java Examples
The following examples show how to use
org.apache.ivy.plugins.resolver.AbstractResolver.
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); }