@Test public void testFromFactory() throws Exception { MethodTemplate[] methodTemplates = MethodTemplate.from(SampleMovieService.class); assertEquals(SampleMovieService.class.getMethods().length, methodTemplates.length); }
public static <T> MethodTemplate[] from(Class<T> clientInterface) { List<MethodTemplate> list = new ArrayList<MethodTemplate>(clientInterface.getMethods().length); for (Method m : clientInterface.getMethods()) { list.add(new MethodTemplate(m)); } return list.toArray(new MethodTemplate[list.size()]); }
MethodTemplate { public static <T> MethodTemplate[] from(Class<T> clientInterface) { List<MethodTemplate> list = new ArrayList<MethodTemplate>(clientInterface.getMethods().length); for (Method m : clientInterface.getMethods()) { list.add(new MethodTemplate(m)); } return list.toArray(new MethodTemplate[list.size()]); } }
MethodTemplate { public static <T> MethodTemplate[] from(Class<T> clientInterface) { List<MethodTemplate> list = new ArrayList<MethodTemplate>(clientInterface.getMethods().length); for (Method m : clientInterface.getMethods()) { list.add(new MethodTemplate(m)); } return list.toArray(new MethodTemplate[list.size()]); } MethodTemplate(Method method); }
MethodTemplate { public static <T> MethodTemplate[] from(Class<T> clientInterface) { List<MethodTemplate> list = new ArrayList<MethodTemplate>(clientInterface.getMethods().length); for (Method m : clientInterface.getMethods()) { list.add(new MethodTemplate(m)); } return list.toArray(new MethodTemplate[list.size()]); } MethodTemplate(Method method); String getTemplateName(); Method getMethod(); String getParamName(int idx); int getParamPosition(int idx); int getParamSize(); int getContentArgPosition(); Class<? extends ContentTransformer<?>> getContentTransformerClass(); Class<?> getResultType(); Class<?> getGenericContentType(); static MethodTemplate[] from(Class<T> clientInterface); }
MethodTemplate { public static <T> MethodTemplate[] from(Class<T> clientInterface) { List<MethodTemplate> list = new ArrayList<MethodTemplate>(clientInterface.getMethods().length); for (Method m : clientInterface.getMethods()) { list.add(new MethodTemplate(m)); } return list.toArray(new MethodTemplate[list.size()]); } MethodTemplate(Method method); String getTemplateName(); Method getMethod(); String getParamName(int idx); int getParamPosition(int idx); int getParamSize(); int getContentArgPosition(); Class<? extends ContentTransformer<?>> getContentTransformerClass(); Class<?> getResultType(); Class<?> getGenericContentType(); static MethodTemplate[] from(Class<T> clientInterface);  }