@Test(expected = NullPointerException.class) public void createFromNonOptionalFailureGetter() { final DummyTestTarget testTarget = new DummyTestTarget(); final Property<String> getterNoneNull = PropertyCreationHelper.createFromNonOptional(o -> testTarget.getValueOne(), null, false); fail(); }
public static <T> Property<T> createFromNonOptional( @NotNull final Function<Object, T> getter, @NotNull final BiConsumer<Object, T> setter, @NotNull final boolean requiresDataContext) { Validate.notNull(getter); Validate.notNull(setter); return create(Optional.of(getter), Optional.of(setter), requiresDataContext); }
PropertyCreationHelper { public static <T> Property<T> createFromNonOptional( @NotNull final Function<Object, T> getter, @NotNull final BiConsumer<Object, T> setter, @NotNull final boolean requiresDataContext) { Validate.notNull(getter); Validate.notNull(setter); return create(Optional.of(getter), Optional.of(setter), requiresDataContext); } }
PropertyCreationHelper { public static <T> Property<T> createFromNonOptional( @NotNull final Function<Object, T> getter, @NotNull final BiConsumer<Object, T> setter, @NotNull final boolean requiresDataContext) { Validate.notNull(getter); Validate.notNull(setter); return create(Optional.of(getter), Optional.of(setter), requiresDataContext); } private  PropertyCreationHelper(); }
PropertyCreationHelper { public static <T> Property<T> createFromNonOptional( @NotNull final Function<Object, T> getter, @NotNull final BiConsumer<Object, T> setter, @NotNull final boolean requiresDataContext) { Validate.notNull(getter); Validate.notNull(setter); return create(Optional.of(getter), Optional.of(setter), requiresDataContext); } private  PropertyCreationHelper(); static Property<T> createFromStaticValue(@Nullable T value); static Property<T> createFromOptional(
      @Nullable final Function<Object, T> getter,
      @Nullable final BiConsumer<Object, T> setter,
      @NotNull final boolean requiresDataContext); static Property<T> create(
      @NotNull final Optional<Function<Object, T>> getter,
      @NotNull final Optional<BiConsumer<Object, T>> setter,
      @NotNull final boolean requiresDataContext); static Property<T> createFromNonOptional(
      @NotNull final Function<Object, T> getter,
      @NotNull final BiConsumer<Object, T> setter,
      @NotNull final boolean requiresDataContext); static Property<T> createFromName(@NotNull final Optional<String> getSetMethodName); @SuppressWarnings({"OptionalUsedAsFieldOrParameterType", "unchecked"}) static Property<T> createFromName(
      @NotNull final Optional<String> getMethodName,
      @NotNull final Optional<String> setMethodName); }
PropertyCreationHelper { public static <T> Property<T> createFromNonOptional( @NotNull final Function<Object, T> getter, @NotNull final BiConsumer<Object, T> setter, @NotNull final boolean requiresDataContext) { Validate.notNull(getter); Validate.notNull(setter); return create(Optional.of(getter), Optional.of(setter), requiresDataContext); } private  PropertyCreationHelper(); static Property<T> createFromStaticValue(@Nullable T value); static Property<T> createFromOptional(
      @Nullable final Function<Object, T> getter,
      @Nullable final BiConsumer<Object, T> setter,
      @NotNull final boolean requiresDataContext); static Property<T> create(
      @NotNull final Optional<Function<Object, T>> getter,
      @NotNull final Optional<BiConsumer<Object, T>> setter,
      @NotNull final boolean requiresDataContext); static Property<T> createFromNonOptional(
      @NotNull final Function<Object, T> getter,
      @NotNull final BiConsumer<Object, T> setter,
      @NotNull final boolean requiresDataContext); static Property<T> createFromName(@NotNull final Optional<String> getSetMethodName); @SuppressWarnings({"OptionalUsedAsFieldOrParameterType", "unchecked"}) static Property<T> createFromName(
      @NotNull final Optional<String> getMethodName,
      @NotNull final Optional<String> setMethodName);  }