@Test public void testApply() throws Exception { A a = new A(); a.setE(E.Y); Method m = A.class.getDeclaredMethod("getE"); GetterInvoker invoker = FunctionalGetterInvoker.create("e", m); String r = (String) invoker.invoke(a); assertThat(r, is("Y")); }
@Nullable @Override public String apply(@Nullable Enum input) { return input == null ? null : input.name(); }
EnumToStringFunction implements GetterFunction<Enum, String> { @Nullable @Override public String apply(@Nullable Enum input) { return input == null ? null : input.name(); } }
EnumToStringFunction implements GetterFunction<Enum, String> { @Nullable @Override public String apply(@Nullable Enum input) { return input == null ? null : input.name(); }  }
EnumToStringFunction implements GetterFunction<Enum, String> { @Nullable @Override public String apply(@Nullable Enum input) { return input == null ? null : input.name(); }  @Nullable @Override String apply(@Nullable Enum input); }
EnumToStringFunction implements GetterFunction<Enum, String> { @Nullable @Override public String apply(@Nullable Enum input) { return input == null ? null : input.name(); }  @Nullable @Override String apply(@Nullable Enum input);  }