Package com.btmatthews.atlas.core.processor

Source Code of com.btmatthews.atlas.core.processor.BuilderProcessor

package com.btmatthews.atlas.core.processor;

import com.btmatthews.atlas.core.annotation.BuilderFactory;

import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;
import java.util.Set;

@SupportedAnnotationTypes("com.btmatthews.atlas.core.annotation.BuilderFactory")
@SupportedSourceVersion(SourceVersion.RELEASE_8)
public class BuilderProcessor extends AbstractProcessor {

    @Override
    public boolean process(final Set<? extends TypeElement> annotations,
                           final RoundEnvironment roundEnv) {
        for (final Element elem : roundEnv.getElementsAnnotatedWith(BuilderFactory.class)) {
            final BuilderFactory annotation = elem.getAnnotation(BuilderFactory.class);
            final Class<?> implementationClass = annotation.value();
        }
        return true;
    }
}
TOP

Related Classes of com.btmatthews.atlas.core.processor.BuilderProcessor

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.