public <R> R runReadAction(final MetadataModelAction<RestApplications, R> action) throws MetadataModelException, IOException { return helper.runJavaSourceTask(new Callable<R>() { public R call() throws Exception { return action.run(metadata); } }); }
public <R> Future<R> runReadActionWhenReady(final MetadataModelAction<RestApplications, R> action) throws MetadataModelException, IOException { return helper.runJavaSourceTaskWhenScanFinished(new Callable<R>() { public R call() throws Exception { return action.run(metadata); } }); }
@Override public Collection<? extends RestProviderDescription> getProviders() { return restProviderManager.getObjects(); }
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)); } } }); }
/** * Initializing outside the constructor to avoid escaping "this" from * the constructor. */ private void initialize() { webserviceManager = helper.createPersistentObjectManager(new WebserviceProvider()); webserviceManager.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { propChangeSupport.firePropertyChange("/webservices", null, null); // NOI18N } }); }
public boolean isReady() { return !helper.isJavaScanInProgress(); }
static boolean isProvider(TypeElement type, AnnotationModelHelper helper) { if (type.getKind() != ElementKind.INTERFACE) { // don't consider interfaces if (helper.hasAnnotation(type.getAnnotationMirrors(), RestConstants.PROVIDER_ANNOTATION)) { // NOI18N return true; } } return false; }
public WebserviceDescriptionImpl(AnnotationModelHelper helper, TypeElement typeElement) { super(helper, typeElement); helper.addJavaContextListener(this); boolean valid = refresh(typeElement); assert valid; }
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)); } } }); } }
public <R> R runReadAction(final MetadataModelAction<WebservicesMetadata, R> action) throws IOException { return helper.runJavaSourceTask(new Callable<R>() { public R call() throws Exception { return action.run(metadata); } }); }
public <R> Future<R> runReadActionWhenReady(final MetadataModelAction<WebservicesMetadata, R> action) throws IOException { return helper.runJavaSourceTaskWhenScanFinished(new Callable<R>() { public R call() throws Exception { return action.run(metadata); } }); } }
public boolean isReady() { return !helper.isJavaScanInProgress(); }
static boolean isRestApplication(TypeElement type, AnnotationModelHelper helper) { boolean isRest = false; if (type != null && type.getKind() != ElementKind.INTERFACE) { // don't consider interfaces if (helper.hasAnnotation(type.getAnnotationMirrors(), RestConstants.APPLICATION_PATH)) { // NOI18N isRest = true; } } return isRest; }
public <R> R runReadAction(final MetadataModelAction<RestServicesMetadata, R> action) throws IOException { return helper.runJavaSourceTask(new Callable<R>() { public R call() throws Exception { return action.run(metadata); } }); }
public <R> Future<R> runReadActionWhenReady(final MetadataModelAction<RestServicesMetadata, R> action) throws IOException { return helper.runJavaSourceTaskWhenScanFinished(new Callable<R>() { public R call() throws Exception { return action.run(metadata); } }); }
public boolean isReady() { return !helper.isJavaScanInProgress(); }
@Override public <R> R runReadAction( final MetadataModelAction<WebBeansModel, R> action ) throws MetadataModelException, IOException { return getHelper().runJavaSourceTask(new Callable<R>() { @Override public R call() throws Exception { return action.run(getModel()); } }); }
public <R> Future<R> runReadActionWhenReady( final MetadataModelAction<JsfModel, R> action ) throws MetadataModelException, IOException { return getHelper().runJavaSourceTaskWhenScanFinished(new Callable<R>() { public R call() throws Exception { return action.run(getModel()); } }); }
public <R> R runReadAction(final MetadataModelAction<JsfModel, R> action ) throws MetadataModelException, IOException { return getHelper().runJavaSourceTask(new Callable<R>() { public R call() throws Exception { return action.run(getModel()); } }); }
@Override public <R> Future<R> runReadActionWhenReady( final MetadataModelAction<WebBeansModel, R> action ) throws MetadataModelException, IOException { return getHelper().runJavaSourceTaskWhenScanFinished(new Callable<R>() { @Override public R call() throws Exception { return action.run(getModel()); } }); }