@SuppressWarnings({"unchecked"}) public MatchResult isAssignableFrom(ServiceContract source, ServiceContract target, boolean reportErrors) { Key key = new Key(source.getClass(), target.getClass()); ContractMatcherExtension matcher = cache.get(key); if (matcher == null) { // this is a programming error String name = ContractMatcherExtension.class.getSimpleName(); throw new AssertionError(name + " not found for converting from " + source.getClass() + " to " + target.getClass()); } return matcher.isAssignableFrom(source, target, reportErrors); }
@SuppressWarnings({"unchecked"}) public MatchResult isAssignableFrom(ServiceContract source, ServiceContract target, boolean reportErrors) { Key key = new Key(source.getClass(), target.getClass()); ContractMatcherExtension matcher = cache.get(key); if (matcher == null) { // this is a programming error String name = ContractMatcherExtension.class.getSimpleName(); throw new AssertionError(name + " not found for converting from " + source.getClass() + " to " + target.getClass()); } return matcher.isAssignableFrom(source, target, reportErrors); }
@SuppressWarnings({"unchecked"}) public MatchResult isAssignableFrom(ServiceContract source, ServiceContract target, boolean reportErrors) { Key key = new Key(source.getClass(), target.getClass()); ContractMatcherExtension matcher = cache.get(key); if (matcher == null) { // this is a programming error String name = ContractMatcherExtension.class.getSimpleName(); throw new AssertionError(name + " not found for converting from " + source.getClass() + " to " + target.getClass()); } return matcher.isAssignableFrom(source, target, reportErrors); }
public void addMatcherExtension(ContractMatcherExtension<?, ?> matcher) { Key key = new Key(matcher.getSource(), matcher.getTarget()); cache.put(key, matcher); }
public void addMatcherExtension(ContractMatcherExtension<?, ?> matcher) { Key key = new Key(matcher.getSource(), matcher.getTarget()); cache.put(key, matcher); }
public void addMatcherExtension(ContractMatcherExtension<?, ?> matcher) { Key key = new Key(matcher.getSource(), matcher.getTarget()); cache.put(key, matcher); }