public class ErrorsCatalog extends Object
resolveName(Class)
,
ErrorCodeCatalog
Constructor and Description |
---|
ErrorsCatalog(Class<? extends ErrorExtEnum> type,
ErrorExtEnum[] codes)
Constructor to create
ErrorsCatalog based upon type and error code entries. |
ErrorsCatalog(ErrorExtEnum[] codes)
Default constructor to create error catalog based upon registered error codes.
|
ErrorsCatalog(String name,
ErrorExtEnum[] codes)
Constructor to create
ErrorsCatalog based upon name and error code entries. |
Modifier and Type | Method and Description |
---|---|
ErrorExtEnum[] |
getCodes()
Get error codes of catalog.
|
String |
getName()
Get name of error catalog.
|
String |
resolveName(Class clazz)
Resolves name of catalog based upon error catalog entry.
|
public ErrorsCatalog(ErrorExtEnum[] codes) throws IllegalArgumentException
codes
- as error code entriesIllegalArgumentException
- if codes
does not contain some entryErrorExtEnum
public ErrorsCatalog(String name, ErrorExtEnum[] codes) throws IllegalArgumentException
ErrorsCatalog
based upon name and error code entries.name
- as name of catalogcodes
- as error code entriesIllegalArgumentException
- if name
is emptypublic ErrorsCatalog(Class<? extends ErrorExtEnum> type, ErrorExtEnum[] codes)
ErrorsCatalog
based upon type and error code entries.type
- of error codecodes
- as entries of error codesresolveName(Class)
public String getName()
public ErrorExtEnum[] getCodes()
public String resolveName(Class clazz) throws IllegalArgumentException
clazz
- that represents type of error catalog entryIllegalArgumentException
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.