@Test @Ignore public void testProcess() throws Exception { Collection<ConverterModel> converters = library.getConverters(); assertEquals(3, converters.size()); ConverterModel converterModel = Iterables.get(converters, 0); ClassName forClass = converterModel.getConverterForClass(); if (forClass != null && !Object.class.getName().equals(forClass.getName())) { assertEquals(Integer.class.getName(), forClass.getName()); } }
@Override public void process(Element element, ComponentLibrary library) throws CdkProcessingException { SourceUtils sourceUtils = getSourceUtils(); AnnotationMirror converter = sourceUtils.getAnnotationMirror(element, JsfConverter.class); ConverterModel converterModel = new ConverterModel(); sourceUtils.setModelProperty(converterModel, converter, "id"); sourceUtils.setModelProperty(converterModel, converter, "converterForClass", "forClass"); setDescription(converterModel, converter, getDocComment(element)); processAttributes(element, converterModel, converter); setTagInfo(converter, converterModel); library.getConverters().add(converterModel); }
ConverterProcessor extends ProcessorBase implements CdkAnnotationProcessor { @Override public void process(Element element, ComponentLibrary library) throws CdkProcessingException { SourceUtils sourceUtils = getSourceUtils(); AnnotationMirror converter = sourceUtils.getAnnotationMirror(element, JsfConverter.class); ConverterModel converterModel = new ConverterModel(); sourceUtils.setModelProperty(converterModel, converter, "id"); sourceUtils.setModelProperty(converterModel, converter, "converterForClass", "forClass"); setDescription(converterModel, converter, getDocComment(element)); processAttributes(element, converterModel, converter); setTagInfo(converter, converterModel); library.getConverters().add(converterModel); } }
ConverterProcessor extends ProcessorBase implements CdkAnnotationProcessor { @Override public void process(Element element, ComponentLibrary library) throws CdkProcessingException { SourceUtils sourceUtils = getSourceUtils(); AnnotationMirror converter = sourceUtils.getAnnotationMirror(element, JsfConverter.class); ConverterModel converterModel = new ConverterModel(); sourceUtils.setModelProperty(converterModel, converter, "id"); sourceUtils.setModelProperty(converterModel, converter, "converterForClass", "forClass"); setDescription(converterModel, converter, getDocComment(element)); processAttributes(element, converterModel, converter); setTagInfo(converter, converterModel); library.getConverters().add(converterModel); }  }
ConverterProcessor extends ProcessorBase implements CdkAnnotationProcessor { @Override public void process(Element element, ComponentLibrary library) throws CdkProcessingException { SourceUtils sourceUtils = getSourceUtils(); AnnotationMirror converter = sourceUtils.getAnnotationMirror(element, JsfConverter.class); ConverterModel converterModel = new ConverterModel(); sourceUtils.setModelProperty(converterModel, converter, "id"); sourceUtils.setModelProperty(converterModel, converter, "converterForClass", "forClass"); setDescription(converterModel, converter, getDocComment(element)); processAttributes(element, converterModel, converter); setTagInfo(converter, converterModel); library.getConverters().add(converterModel); }  @Override void process(Element element, ComponentLibrary library); @Override Class<? extends Annotation> getProcessedAnnotation(); }
ConverterProcessor extends ProcessorBase implements CdkAnnotationProcessor { @Override public void process(Element element, ComponentLibrary library) throws CdkProcessingException { SourceUtils sourceUtils = getSourceUtils(); AnnotationMirror converter = sourceUtils.getAnnotationMirror(element, JsfConverter.class); ConverterModel converterModel = new ConverterModel(); sourceUtils.setModelProperty(converterModel, converter, "id"); sourceUtils.setModelProperty(converterModel, converter, "converterForClass", "forClass"); setDescription(converterModel, converter, getDocComment(element)); processAttributes(element, converterModel, converter); setTagInfo(converter, converterModel); library.getConverters().add(converterModel); }  @Override void process(Element element, ComponentLibrary library); @Override Class<? extends Annotation> getProcessedAnnotation();  }