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

fr.lteconsulting.angular2gwt.processor.AngularComponentProcessor Maven / Gradle / Ivy

There is a newer version: 1.8
Show newest version
package fr.lteconsulting.angular2gwt.processor;

import java.util.Set;

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.TypeElement;

@SupportedAnnotationTypes( {
		AngularComponentProcessor.DirectiveAnnotationFqn,
		AngularComponentProcessor.ComponentAnnotationFqn,
		AngularComponentProcessor.InjectableAnnotationFqn,
		AngularComponentProcessor.NgModuleAnnotationFqn } )
@SupportedSourceVersion( SourceVersion.RELEASE_8 )
public class AngularComponentProcessor extends AbstractProcessor
{
	public final static String DirectiveAnnotationFqn = "fr.lteconsulting.angular2gwt.ng.core.Directive";
	public final static String ComponentAnnotationFqn = "fr.lteconsulting.angular2gwt.ng.core.Component";
	public final static String InjectableAnnotationFqn = "fr.lteconsulting.angular2gwt.ng.core.Injectable";
	public final static String NgModuleAnnotationFqn = "fr.lteconsulting.angular2gwt.ng.core.NgModule";
	
	public final static String DirectiveConstructorGetterName = "getDirectivePrototype";
	public final static String ComponentConstructorGetterName = "getComponentPrototype";
	public final static String InjectableConstructorGetterName = "getInjectablePrototype";
	public final static String NgModuleConstructorGetterName = "getNgModulePrototype";

	public final static String DIRECTIVE_HELPER_CLASS_SUFFIX = "_AngularDirective";
	public final static String COMPONENT_HELPER_CLASS_SUFFIX = "_AngularComponent";
	public final static String INJECTABLE_HELPER_CLASS_SUFFIX = "_AngularInjectable";
	public final static String NG_MODULE_HELPER_CLASS_SUFFIX = "_AngularModule";

	@Override
	public boolean process( Set annotations, RoundEnvironment roundEnv )
	{
		JsInteropOutputProcessor processor = new JsInteropOutputProcessor( processingEnv );

		return processor.process( annotations, roundEnv );
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy