@Nullable @Override @Throws(IllegalNullArgumentException.class) public CreationStrategy<?> findCreationStrategyForField(@Nonnull final Field field) { Check.notNull(field, "field"); for (final StrategyPair entry : Lists.reverse(mapping)) { if (entry.getKey().matchesByField(field)) { return entry.getValue(); } } return null; }
@Nullable @Override @Throws(IllegalNullArgumentException.class) public CreationStrategy<?> findCreationStrategyForType(@Nonnull final Class<?> clazz) { Check.notNull(clazz, "clazz"); for (final StrategyPair entry : Lists.reverse(mapping)) { if (entry.getKey().matchesByType(clazz)) { return entry.getValue(); } } return null; }