All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.objectos.way.auto.functional.AutoFunctionalProcessor Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
/*
 * 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 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();
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy