@Override public List<WebserviceDescriptionImpl> createInitialObjects() throws InterruptedException { final List<WebserviceDescriptionImpl> result = new ArrayList<WebserviceDescriptionImpl>(); helper.getAnnotationScanner().findAnnotations("javax.jws.WebService", EnumSet.of(ElementKind.CLASS), new AnnotationHandler() { // NOI18N @Override public void handleAnnotation(TypeElement type, Element element, AnnotationMirror annotation) { result.add(new WebserviceDescriptionImpl(helper, type)); } }); helper.getAnnotationScanner().findAnnotations("javax.xml.ws.WebServiceProvider", EnumSet.of(ElementKind.CLASS), new AnnotationHandler() { // NOI18N @Override public void handleAnnotation(TypeElement type, Element element, AnnotationMirror annotation) { result.add(new WebserviceDescriptionImpl(helper, type)); } }); return result; }
public static List<Element> getAnnotatedMembers( final String annotationName, final AnnotationModelHelper helper ) { final List<Element> result = new LinkedList<Element>(); try { helper.getAnnotationScanner().findAnnotations( annotationName, EnumSet.of(ElementKind.FIELD, ElementKind.METHOD), new AnnotationHandler() { @Override public void handleAnnotation(TypeElement type, Element element, AnnotationMirror annotation) { result.add(element); } }); } catch (InterruptedException e) { FieldInjectionPointLogic.LOGGER.warning("Finding annotation "+ annotationName+" was interrupted"); // NOI18N } return result; }
@Override public List<T> createInitialObjects() throws InterruptedException { final List<T> result = new LinkedList<T>(); for (String annotationName : getAnnotationTypeNames()) { helper.getAnnotationScanner().findAnnotations(annotationName, EnumSet.of(ElementKind.CLASS), new AnnotationHandler() { @Override public void handleAnnotation(TypeElement type, Element element, AnnotationMirror annotation) { result.add(createObject(helper, type)); } }); } return result; }
private void findAnnotations ( String annotationType, EnumSet<ElementKind> kinds, final Map<TypeElement, RestApplicationImpl> result) throws InterruptedException { helper.getAnnotationScanner().findAnnotations(annotationType, kinds, new AnnotationHandler() { public void handleAnnotation(TypeElement type, Element element, AnnotationMirror annotation) { if (!result.containsKey(type)) { result.put(type, new RestApplicationImpl(helper, type)); } } }); }
public List<T> createInitialObjects() throws InterruptedException { final List<T> result = new LinkedList<T>(); getHelper().getAnnotationScanner().findAnnotations(getAnnotationName(), EnumSet.of( ElementKind.CLASS ), new AnnotationHandler() { public void handleAnnotation(TypeElement type, Element element, AnnotationMirror annotation) { if ( checkType ( type )){ result.add(createObject(getHelper(), type)); } } }); return result; }
new LinkedList<SystemEventListener>(); try { helper.getAnnotationScanner().findAnnotations( "javax.faces.event.ListenersFor", // NOI18N EnumSet.of(ElementKind.CLASS),
private Set<Element> getAllProductions( ){ final Set<Element> result = new HashSet<Element>(); try { getModel().getHelper().getAnnotationScanner().findAnnotations( PRODUCER_ANNOTATION, EnumSet.of( ElementKind.FIELD, ElementKind.METHOD), new AnnotationHandler() { @Override public void handleAnnotation( TypeElement type, Element element,AnnotationMirror annotation ) { result.add( element ); } }); } catch (InterruptedException e) { LOGGER.warning("Finding annotation "+PRODUCER_ANNOTATION+ " was interrupted"); // NOI18N } return result; }
private void findAnnotation( String annotationType, EnumSet<ElementKind> kinds, final Map<TypeElement, RestProviderDescriptionImpl> result) throws InterruptedException { helper.getAnnotationScanner().findAnnotations(annotationType, kinds, new AnnotationHandler() { public void handleAnnotation(TypeElement type, Element element, AnnotationMirror annotation) { if (type== null ) { return; } if (!result.containsKey(type)) { result.put(type, new RestProviderDescriptionImpl(helper, type)); } } }); } }
@Override public List<T> createInitialObjects() throws InterruptedException { final List<T> result = new LinkedList<T>(); getHelper().getAnnotationScanner().findAnnotations( getAnnotation(), EnumSet.of(ElementKind.CLASS, ElementKind.INTERFACE), new AnnotationHandler() { @Override public void handleAnnotation(TypeElement type, Element element, AnnotationMirror annotation) { result.add(createTypeElement(type)); } }); return result; }
private void findAnnotation( String annotationType, EnumSet<ElementKind> kinds, final Map<TypeElement, RestServiceDescriptionImpl> result) throws InterruptedException { helper.getAnnotationScanner().findAnnotations(annotationType, kinds, new AnnotationHandler() { @Override public void handleAnnotation(TypeElement type, Element element, AnnotationMirror annotation) { if (type == null || type.getModifiers().contains(Modifier.ABSTRACT)) { return; } Utils.checkForJsr311Bootstrap(type, project, helper); if (!result.containsKey(type)) { result.put(type, new RestServiceDescriptionImpl(helper, type)); } } }); } }
@Override public List<NamedStereotype> createInitialObjects() throws InterruptedException { final List<NamedStereotype> result = new LinkedList<NamedStereotype>(); getHelper().getAnnotationScanner().findAnnotations( getAnnotation(), EnumSet.of(ElementKind.ANNOTATION_TYPE), new AnnotationHandler() { @Override public void handleAnnotation(TypeElement type, Element element, AnnotationMirror annotation) { if ( hasNamed( type , getHelper() )) { result.add(createTypeElement(type)); } } }); return result; }
private List<VariableElement> getEventInjectionPoints( ) { final List<VariableElement> eventInjection = new LinkedList<VariableElement>(); try { getModel().getHelper().getAnnotationScanner().findAnnotations(INJECT_ANNOTATION, EnumSet.of( ElementKind.FIELD), new AnnotationHandler() { @Override public void handleAnnotation( TypeElement type, Element element, AnnotationMirror annotation ) { Element typeElement = getCompilationController().getTypes(). asElement( element.asType() ); if ( typeElement instanceof TypeElement && element instanceof VariableElement ) { Name name = ((TypeElement)typeElement).getQualifiedName(); if ( EVENT_INTERFACE.contentEquals( name )){ eventInjection.add( (VariableElement) element); } } } }); } catch (InterruptedException e) { LOGGER.warning("Finding annotation @Inject was interrupted"); // NOI18N } return eventInjection; }
final List<BindingQualifier> result = new LinkedList<BindingQualifier>(); final Set<TypeElement> set = new HashSet<TypeElement>(); getHelper().getAnnotationScanner().findAnnotations(getAnnotationName(), AnnotationScanner.TYPE_KINDS, new AnnotationHandler() {
getModel().getHelper().getAnnotationScanner().findAnnotations( annotationFQN, EnumSet.of( ElementKind.FIELD, ElementKind.METHOD),