@Test public void second_parameter_type() { MethodDescriptor method = getMethodDescriptor(); ParameterDescriptor parameter = method.getParameters().get(1); TypeDescriptor type = parameter.getType(); assertThat(type.getRawType()).isEqualTo(Set.class); assertThat(type.resolveGenericParameter(Set.class, 0).getRawType()).isEqualTo(Integer.class); }
public List<ParameterDescriptor> getParameters() { ImmutableList.Builder<ParameterDescriptor> builder = ImmutableList.builder(); int index = 0; for (Parameter parameter : method.getParameters()) { builder.add(new ParameterDescriptor(this, parameter, index++)); } return builder.build(); }
MethodDescriptor extends AbstractMethodDescriptor<Method> implements StaticExecutable { public List<ParameterDescriptor> getParameters() { ImmutableList.Builder<ParameterDescriptor> builder = ImmutableList.builder(); int index = 0; for (Parameter parameter : method.getParameters()) { builder.add(new ParameterDescriptor(this, parameter, index++)); } return builder.build(); } }
MethodDescriptor extends AbstractMethodDescriptor<Method> implements StaticExecutable { public List<ParameterDescriptor> getParameters() { ImmutableList.Builder<ParameterDescriptor> builder = ImmutableList.builder(); int index = 0; for (Parameter parameter : method.getParameters()) { builder.add(new ParameterDescriptor(this, parameter, index++)); } return builder.build(); } MethodDescriptor(TypeDescriptor declaringType, Method method); }
MethodDescriptor extends AbstractMethodDescriptor<Method> implements StaticExecutable { public List<ParameterDescriptor> getParameters() { ImmutableList.Builder<ParameterDescriptor> builder = ImmutableList.builder(); int index = 0; for (Parameter parameter : method.getParameters()) { builder.add(new ParameterDescriptor(this, parameter, index++)); } return builder.build(); } MethodDescriptor(TypeDescriptor declaringType, Method method); TypeDescriptor getReturnType(); Class<?> getRawReturnType(); List<ParameterDescriptor> getParameters(); int getParameterCount(); String getName(); List<Class<?>> getParameterTypes(); @Override Object invokeStatic(Object... args); Object invoke(Object object, Object... args); @Override boolean equals(Object obj); @Override int hashCode(); boolean applies(TypeDescriptor typeDescriptor); String toString(); @Override Method getElement(); }
MethodDescriptor extends AbstractMethodDescriptor<Method> implements StaticExecutable { public List<ParameterDescriptor> getParameters() { ImmutableList.Builder<ParameterDescriptor> builder = ImmutableList.builder(); int index = 0; for (Parameter parameter : method.getParameters()) { builder.add(new ParameterDescriptor(this, parameter, index++)); } return builder.build(); } MethodDescriptor(TypeDescriptor declaringType, Method method); TypeDescriptor getReturnType(); Class<?> getRawReturnType(); List<ParameterDescriptor> getParameters(); int getParameterCount(); String getName(); List<Class<?>> getParameterTypes(); @Override Object invokeStatic(Object... args); Object invoke(Object object, Object... args); @Override boolean equals(Object obj); @Override int hashCode(); boolean applies(TypeDescriptor typeDescriptor); String toString(); @Override Method getElement();  }