use of com.airbnb.epoxy.ClassToGenerateInfo.ConstructorInfo in project epoxy by airbnb.
the class EpoxyProcessor method generateConstructors.
/** Include any constructors that are in the super class. */
private Iterable<MethodSpec> generateConstructors(ClassToGenerateInfo info) {
List<MethodSpec> constructors = new ArrayList<>(info.getConstructors().size());
for (ConstructorInfo constructorInfo : info.getConstructors()) {
Builder builder = MethodSpec.constructorBuilder().addModifiers(constructorInfo.modifiers).addParameters(constructorInfo.params).varargs(constructorInfo.varargs);
StringBuilder statementBuilder = new StringBuilder("super(");
generateParams(statementBuilder, constructorInfo.params);
constructors.add(builder.addStatement(statementBuilder.toString()).build());
}
return constructors;
}
Aggregations