use of com.squareup.javapoet.ParameterSpec.Builder in project epoxy by airbnb.
the class ClassToGenerateInfo method buildParamList.
private List<ParameterSpec> buildParamList(List<? extends VariableElement> params) {
List<ParameterSpec> result = new ArrayList<>();
for (VariableElement param : params) {
Builder builder = ParameterSpec.builder(TypeName.get(param.asType()), param.getSimpleName().toString());
for (AnnotationMirror annotation : param.getAnnotationMirrors()) {
builder.addAnnotation(AnnotationSpec.get(annotation));
}
result.add(builder.build());
}
return result;
}
Aggregations