@Test @Ignore public void testProcess() throws Exception { Collection<ValidatorModel> validators = library.getValidators(); assertEquals(2, validators.size()); for (ValidatorModel model : validators) { FacesId id = model.getId(); if (id != null) { assertEquals("my_validator", id.toString()); } } }
@Override public void process(Element element, ComponentLibrary library) throws CdkProcessingException { SourceUtils utils = getSourceUtils(); AnnotationMirror validator = utils.getAnnotationMirror(element, JsfValidator.class); ValidatorModel validatorModel = new ValidatorModel(); utils.setModelProperty(validatorModel, validator, "id"); setClassNames((TypeElement) element, validatorModel, validator); setDescription(validatorModel, validator, getDocComment(element)); setTagInfo(validator, validatorModel); library.getValidators().add(validatorModel); }
ValidatorProcessor extends ProcessorBase implements CdkAnnotationProcessor { @Override public void process(Element element, ComponentLibrary library) throws CdkProcessingException { SourceUtils utils = getSourceUtils(); AnnotationMirror validator = utils.getAnnotationMirror(element, JsfValidator.class); ValidatorModel validatorModel = new ValidatorModel(); utils.setModelProperty(validatorModel, validator, "id"); setClassNames((TypeElement) element, validatorModel, validator); setDescription(validatorModel, validator, getDocComment(element)); setTagInfo(validator, validatorModel); library.getValidators().add(validatorModel); } }
ValidatorProcessor extends ProcessorBase implements CdkAnnotationProcessor { @Override public void process(Element element, ComponentLibrary library) throws CdkProcessingException { SourceUtils utils = getSourceUtils(); AnnotationMirror validator = utils.getAnnotationMirror(element, JsfValidator.class); ValidatorModel validatorModel = new ValidatorModel(); utils.setModelProperty(validatorModel, validator, "id"); setClassNames((TypeElement) element, validatorModel, validator); setDescription(validatorModel, validator, getDocComment(element)); setTagInfo(validator, validatorModel); library.getValidators().add(validatorModel); }  }
ValidatorProcessor extends ProcessorBase implements CdkAnnotationProcessor { @Override public void process(Element element, ComponentLibrary library) throws CdkProcessingException { SourceUtils utils = getSourceUtils(); AnnotationMirror validator = utils.getAnnotationMirror(element, JsfValidator.class); ValidatorModel validatorModel = new ValidatorModel(); utils.setModelProperty(validatorModel, validator, "id"); setClassNames((TypeElement) element, validatorModel, validator); setDescription(validatorModel, validator, getDocComment(element)); setTagInfo(validator, validatorModel); library.getValidators().add(validatorModel); }  @Override void process(Element element, ComponentLibrary library); @Override Class<? extends Annotation> getProcessedAnnotation(); }
ValidatorProcessor extends ProcessorBase implements CdkAnnotationProcessor { @Override public void process(Element element, ComponentLibrary library) throws CdkProcessingException { SourceUtils utils = getSourceUtils(); AnnotationMirror validator = utils.getAnnotationMirror(element, JsfValidator.class); ValidatorModel validatorModel = new ValidatorModel(); utils.setModelProperty(validatorModel, validator, "id"); setClassNames((TypeElement) element, validatorModel, validator); setDescription(validatorModel, validator, getDocComment(element)); setTagInfo(validator, validatorModel); library.getValidators().add(validatorModel); }  @Override void process(Element element, ComponentLibrary library); @Override Class<? extends Annotation> getProcessedAnnotation();  }