@Test public void 有効なFillingProviderでPropertyMatcherを作成できる() { PropertyMatcher matcher = profill.createPropertyMatcher(new ValidFillingProvider()); assertThat(matcher.getAnnotation() == Action.class, is(true)); assertThat(matcher.getName(), is("test")); assertThat(matcher.getType() == String.class, is(true)); }
protected PropertyMatcher createPropertyMatcher(FillingProvider provider) { ProvideFillingFor pff = provider.getClass().getAnnotation(ProvideFillingFor.class); if (pff == null) { throw new InternalException(Profill.class, "E-PROFILL#0001"); } return new PropertyMatcher(pff.annotation(), pff.name(), pff.type()); }
Profill { protected PropertyMatcher createPropertyMatcher(FillingProvider provider) { ProvideFillingFor pff = provider.getClass().getAnnotation(ProvideFillingFor.class); if (pff == null) { throw new InternalException(Profill.class, "E-PROFILL#0001"); } return new PropertyMatcher(pff.annotation(), pff.name(), pff.type()); } }
Profill { protected PropertyMatcher createPropertyMatcher(FillingProvider provider) { ProvideFillingFor pff = provider.getClass().getAnnotation(ProvideFillingFor.class); if (pff == null) { throw new InternalException(Profill.class, "E-PROFILL#0001"); } return new PropertyMatcher(pff.annotation(), pff.name(), pff.type()); } Profill(); }
Profill { protected PropertyMatcher createPropertyMatcher(FillingProvider provider) { ProvideFillingFor pff = provider.getClass().getAnnotation(ProvideFillingFor.class); if (pff == null) { throw new InternalException(Profill.class, "E-PROFILL#0001"); } return new PropertyMatcher(pff.annotation(), pff.name(), pff.type()); } Profill(); void makeSafeAgainstMultiThreadedAccess(); void addFillingProvider(FillingProvider provider); void fill(Object bean); boolean isTryToInstantiateIfNestedPropertyIsNull(); void setTryToInstantiateIfNestedPropertyIsNull(boolean value); }
Profill { protected PropertyMatcher createPropertyMatcher(FillingProvider provider) { ProvideFillingFor pff = provider.getClass().getAnnotation(ProvideFillingFor.class); if (pff == null) { throw new InternalException(Profill.class, "E-PROFILL#0001"); } return new PropertyMatcher(pff.annotation(), pff.name(), pff.type()); } Profill(); void makeSafeAgainstMultiThreadedAccess(); void addFillingProvider(FillingProvider provider); void fill(Object bean); boolean isTryToInstantiateIfNestedPropertyIsNull(); void setTryToInstantiateIfNestedPropertyIsNull(boolean value);  }