@Test public void testException2() throws Exception { thrown.expect(ClassCastException.class); thrown.expectMessage("function[class org.jfaster.mango.invoker.FunctionalGetterInvokerTest$IntegerListToStringFunction] on method[java.util.List org.jfaster.mango.invoker.FunctionalGetterInvokerTest$F.getX()] error, function's inputType[java.util.List<java.lang.Integer>] must be assignable from method's returnType[java.util.List<java.lang.String>]"); Method method = F.class.getDeclaredMethod("getX"); F e = new F(); ArrayList<String> x = Lists.newArrayList("xxx"); e.setX(x); FunctionalGetterInvoker.create("x", method); }
public static FunctionalGetterInvoker create(String name, Method method) { return new FunctionalGetterInvoker(name, method); }
FunctionalGetterInvoker extends MethodNamedObject implements GetterInvoker { public static FunctionalGetterInvoker create(String name, Method method) { return new FunctionalGetterInvoker(name, method); } }
FunctionalGetterInvoker extends MethodNamedObject implements GetterInvoker { public static FunctionalGetterInvoker create(String name, Method method) { return new FunctionalGetterInvoker(name, method); } private  FunctionalGetterInvoker(String name, Method method); }
FunctionalGetterInvoker extends MethodNamedObject implements GetterInvoker { public static FunctionalGetterInvoker create(String name, Method method) { return new FunctionalGetterInvoker(name, method); } private  FunctionalGetterInvoker(String name, Method method); static FunctionalGetterInvoker create(String name, Method method); @SuppressWarnings("unchecked") @Override Object invoke(Object obj); @Override Type getReturnType(); @Override Class<?> getReturnRawType(); }
FunctionalGetterInvoker extends MethodNamedObject implements GetterInvoker { public static FunctionalGetterInvoker create(String name, Method method) { return new FunctionalGetterInvoker(name, method); } private  FunctionalGetterInvoker(String name, Method method); static FunctionalGetterInvoker create(String name, Method method); @SuppressWarnings("unchecked") @Override Object invoke(Object obj); @Override Type getReturnType(); @Override Class<?> getReturnRawType();  }