本文整理匯總了Java中org.onlab.rest.exceptions.ServerErrorMapper類的典型用法代碼示例。如果您正苦於以下問題:Java ServerErrorMapper類的具體用法?Java ServerErrorMapper怎麽用?Java ServerErrorMapper使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ServerErrorMapper類屬於org.onlab.rest.exceptions包,在下文中一共展示了ServerErrorMapper類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getClasses
import org.onlab.rest.exceptions.ServerErrorMapper; //導入依賴的package包/類
/**
* Returns the aggregate set of resources, writers and mappers combined
* with a default set of such web entities.
*
* @param classes set of resources, writers and mappers
* @return combined set of web entities
*/
protected Set<Class<?>> getClasses(Class<?>... classes) {
ImmutableSet.Builder<Class<?>> builder = ImmutableSet.builder();
builder.add(ServiceNotFoundMapper.class,
EntityNotFoundMapper.class,
NotFoundMapper.class,
ServerErrorMapper.class,
BadRequestMapper.class,
WebApplicationExceptionMapper.class,
IllegalArgumentExceptionMapper.class,
IllegalStateExceptionMapper.class,
JsonBodyWriter.class);
builder.add(classes);
return builder.build();
}