TypeName superinterface = ParameterizedTypeName.get(ClassName.get(DefaultLifeCycleAware.class), viewGenericType);
TypeSpec.Builder anonimBuilder = TypeSpec.anonymousClassBuilder("").addSuperinterface(superinterface);
manageEventsMethods(anonimBuilder, lifeCycleAwareInfo, viewGenericType);
builder.addStatement("collector.addLifeCycleAware($L)", anonimBuilder.build());
}
<BUG>for (Element element : lifeCycleAwareInfo.lifeCycleAwareElements) {
if (implementsLifeCycleAware(ClassName.get(element.asType()))) {
builder = builder.addStatement("collector.addLifeCycleAware(view.$L)", element);
}
}</BUG>
return builder.build();

TypeName superinterface = ParameterizedTypeName.get(ClassName.get(DefaultLifeCycleAware.class), viewGenericType);
TypeSpec.Builder anonimBuilder = TypeSpec.anonymousClassBuilder("").addSuperinterface(superinterface);
manageEventsMethods(anonimBuilder, lifeCycleAwareInfo, viewGenericType);
builder.addStatement("collector.addLifeCycleAware($L)", anonimBuilder.build());
}
