public class ExceptionMapperFactory extends Object implements ExceptionMappers
Exception mappers implementation that aggregates
exception mappers and server as the main entry point for exception mapper
instance lookup.| Modifier and Type | Class and Description |
|---|---|
static class |
ExceptionMapperFactory.Binder
Exception mapper factory injection binder.
|
| Constructor and Description |
|---|
ExceptionMapperFactory(ServiceLocator locator)
Create new exception mapper factory initialized with
HK2 service locator instance that will be used to look up all providers implementing
ExceptionMapper interface. |
| Modifier and Type | Method and Description |
|---|---|
<T extends Throwable> |
find(Class<T> type)
Get an exception mapping provider for a particular class of exception.
|
@Inject public ExceptionMapperFactory(ServiceLocator locator)
HK2 service locator instance that will be used to look up all providers implementing
ExceptionMapper interface.locator - HK2 service locator.public <T extends Throwable> ExceptionMapper<T> find(Class<T> type)
ExceptionMapperstype.find in interface ExceptionMappersT - type of the exception handled by the exception mapping provider.type - the class of exception.ExceptionMapper for the supplied type or null
if none is found.Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.