br.com.objectos.way.auto.functional.AutoFunctionalProcessor Maven / Gradle / Ivy
/*
* AutoFunctionalProcessor.java criado em 29/10/2014
*
* Propriedade de Objectos Fábrica de Software LTDA.
* Reprodução parcial ou total proibida.
*/
package br.com.objectos.way.auto.functional;
import java.lang.annotation.Annotation;
import java.util.List;
import br.com.objectos.way.code.AbstractAnnotationProcessor;
import br.com.objectos.way.code.CodeCanvasArtifact;
import br.com.objectos.way.code.MethodInfo;
import br.com.objectos.way.code.TypeInfo;
import br.com.objectos.way.core.auto.AutoFunctional;
import com.google.common.collect.ImmutableList;
/**
* @author [email protected] (Marcio Endo)
*/
public class AutoFunctionalProcessor extends AbstractAnnotationProcessor {
@Override
protected Class extends Annotation> annotationType() {
return AutoFunctional.class;
}
@Override
protected boolean shouldProcessMethods() {
return true;
}
@Override
protected boolean shouldProcessTypes() {
return false;
}
@Override
protected List toArtifactList(TypeInfo typeInfo, MethodInfo methodInfo) {
return ImmutableList. builder()
.addAll(IsPredicateCanvas.toArtifactList(typeInfo, methodInfo))
.addAll(ToFunctionCanvas.toArtifactList(typeInfo, methodInfo))
.build();
}
}