/** * Check whether a fatal error is present in the list of all messages. * * @return {@code true} if there are any fatal issues in this error context, {@code false} otherwise. */ public static boolean fatalIssuesFound() { for (final ErrorMessage message : getInstance().issues) { if (message.getSeverity() == Severity.FATAL) { return true; } } return false; }
private void setOSGiServiceFinderIteratorProvider() { ServiceFinder.setIteratorProvider(new OsgiServiceFinder()); }
/** * Removes all issues that have been added since the last marked position as well as * removes the last mark. */ public static void reset() { getInstance()._reset(); }
/** * Remove a previously set mark, if any. */ public static void unmark() { getInstance()._unmark(); }
private static void fail(final String serviceName, final String msg, final Throwable cause) throws ServiceConfigurationError { final ServiceConfigurationError sce = new ServiceConfigurationError(serviceName + ": " + msg); sce.initCause(cause); throw sce; }
/** * Invoke given producer task and gather errors. * <p/> * After the task is complete all gathered errors are logged. No exception is thrown * even if there is a fatal error present in the list of errors. * * @param producer producer task to be invoked. * @return the result produced by the task. */ public static <T> T process(final Producer<T> producer) { return process(producer, false); }
/** * Add a warning to the list of messages. * * @param source source of the error. * @param message message of the error. */ public static void warning(final Object source, final String message) { error(source, message, Severity.WARNING); }
/** * Get the list of all error messages. * * @return non-null error message list. */ public static List<ErrorMessage> getErrorMessages() { return getErrorMessages(false); }
@Override public Enumeration<URL> getResources(final String packagePath, final ClassLoader classLoader) throws IOException { return osgiRegistry.getPackageResources(packagePath, classLoader, recursive); } });
/** * Create new immutable copy of the original runtime configuration. * * @param config original runtime configuration. */ public ImmutableCommonConfig(final CommonConfig config) { this(config, LocalizationMessages.CONFIGURATION_NOT_MODIFIABLE()); }
/** * Gets an instance of {@link MessageBodyWorkers}. * * @return {@code MessageBodyWorkers} instance. */ public MessageBodyWorkers getMessageBodyWorkers() { requireNonNull(messageBodyWorkers, MessageBodyWorkers.class); return messageBodyWorkers; }
/** * Check whether a fatal error is present in the list of all messages. * * @return {@code true} if there are any fatal issues in this error context, {@code false} otherwise. */ public static boolean fatalIssuesFound() { for (final ErrorMessage message : getInstance().issues) { if (message.getSeverity() == Severity.FATAL) { return true; } } return false; }
private void setOSGiServiceFinderIteratorProvider() { ServiceFinder.setIteratorProvider(new OsgiServiceFinder()); }
/** * Remove a previously set mark, if any. */ public static void unmark() { getInstance()._unmark(); }
@Override public Enumeration<URL> getResources(final String packagePath, final ClassLoader classLoader) throws IOException { return osgiRegistry.getPackageResources(packagePath, classLoader, recursive); } });
/** * Gets an instance of {@link ContextResolvers}. * * @return {@code ContextResolvers} instance. */ public ContextResolvers getContextResolvers() { requireNonNull(contextResolvers, ContextResolvers.class); return contextResolvers; }
/** * Gets an instance of {@link Configuration}. * * @return {@code Configuration} instance. */ public Configuration getConfiguration() { requireNonNull(configuration, Configuration.class); return configuration; }
/** * Gets an instance of {@link ExceptionMappers}. * * @return {@code ExceptionMappers} instance. */ public ExceptionMappers getExceptionMappers() { requireNonNull(exceptionMappers, ExceptionMappers.class); return exceptionMappers; }
/** * Gets an instance of {@link ExceptionMappers}. * * @return {@code ExceptionMappers} instance. */ public ExceptionMappers getExceptionMappers() { requireNonNull(exceptionMappers, ExceptionMappers.class); return exceptionMappers; }
/** * Gets an instance of {@link ContextResolvers}. * * @return {@code ContextResolvers} instance. */ public ContextResolvers getContextResolvers() { requireNonNull(contextResolvers, ContextResolvers.class); return contextResolvers; }