@Immutable public class SingleError extends Object implements IError
IError.Error because this would conflict with
the default Java Exception class.| Modifier and Type | Class and Description |
|---|---|
static class |
SingleError.AbstractBuilder<T extends SingleError,IMPLTYPE extends SingleError.AbstractBuilder<T,IMPLTYPE>>
Abstract builder class for
SingleError and derived classes. |
static class |
SingleError.SingleErrorBuilder |
| Constructor and Description |
|---|
SingleError(IErrorLevel aErrorLevel,
String sErrorID,
String sErrorFieldName,
IErrorLocation aErrorLocation,
IHasErrorText aErrorText,
Throwable aLinkedException) |
| Modifier and Type | Method and Description |
|---|---|
static SingleError.SingleErrorBuilder |
builder()
Create a new empty error builder with the default error level from
SingleError.SingleErrorBuilder. |
static SingleError.SingleErrorBuilder |
builder(IError aError)
Create a new error builder containing all the data from the provided error.
|
static SingleError.SingleErrorBuilder |
builderError()
Create a new empty error builder with the ERROR error level.
|
static SingleError.SingleErrorBuilder |
builderFatalError()
Create a new empty error builder with the FATAL ERROR error level.
|
static SingleError.SingleErrorBuilder |
builderInfo()
Create a new empty error builder with the INFO error level.
|
static SingleError.SingleErrorBuilder |
builderSuccess()
Create a new empty error builder with the SUCCESS error level.
|
static SingleError.SingleErrorBuilder |
builderWarn()
Create a new empty error builder with the WARN error level.
|
boolean |
equals(Object o) |
protected boolean |
equalsLinkedException(Throwable t1,
Throwable t2)
Overridable implementation of Throwable for the Linked exception field.
|
String |
getErrorFieldName() |
String |
getErrorID() |
IErrorLevel |
getErrorLevel() |
IErrorLocation |
getErrorLocation() |
IHasErrorText |
getErrorTexts() |
Throwable |
getLinkedException() |
int |
hashCode() |
protected void |
hashCodeLinkedException(HashCodeGenerator aHCG,
Throwable t)
Overridable implementation of Throwable for the Linked exception field.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAsString, getErrorText, getLinkedExceptionCause, getLinkedExceptionMessage, getLinkedExceptionStackTrace, hasErrorLocation, hasLinkedExceptionisEqualSevereThan, isLessOrEqualSevereThan, isLessSevereThan, isMoreOrEqualSevereThan, isMoreSevereThanhasErrorLevel, isError, isFailure, isNoError, isSuccessand, orthisAsTgetComparatorErrorID, hasErrorID, hasErrorID, hasNoErrorIDgetComparatorErrorFieldName, hasErrorFieldName, hasErrorFieldName, hasNoErrorFieldNamepublic SingleError(@Nonnull IErrorLevel aErrorLevel, @Nullable String sErrorID, @Nullable String sErrorFieldName, @Nullable IErrorLocation aErrorLocation, @Nullable IHasErrorText aErrorText, @Nullable Throwable aLinkedException)
@Nonnull public IErrorLevel getErrorLevel()
getErrorLevel in interface IHasErrorLevelnull.@Nullable public String getErrorID()
IErrorgetErrorID in interface IHasErrorIDgetErrorID in interface IErrornull.@Nullable public String getErrorFieldName()
getErrorFieldName in interface IHasErrorFieldgetErrorFieldName in interface IErrornull.@Nonnull public IErrorLocation getErrorLocation()
getErrorLocation in interface IErrornull location of the error. Use
ErrorLocation.NO_LOCATION to indicate no location is
available.IError.hasErrorLocation()@Nullable public IHasErrorText getErrorTexts()
getErrorTexts in interface IErrornull.IError.getErrorText(Locale)@Nullable public Throwable getLinkedException()
getLinkedException in interface IErrornull if no such exception is
available.IError.hasLinkedException(),
IError.getLinkedExceptionMessage(),
IError.getLinkedExceptionStackTrace(),
IError.getLinkedExceptionCause()@OverrideOnDemand protected boolean equalsLinkedException(@Nullable Throwable t1, @Nullable Throwable t2)
hashCodeLinkedException(HashCodeGenerator, Throwable)!t1 - First Throwable. May be null.t2 - Second Throwable. May be null.true if they are equals (or both null)@OverrideOnDemand protected void hashCodeLinkedException(@Nonnull HashCodeGenerator aHCG, @Nullable Throwable t)
equalsLinkedException(Throwable, Throwable)!aHCG - The hash code generator to append to. Never null.t - The Throwable to append. May be null.@Nonnull public static SingleError.SingleErrorBuilder builder()
SingleError.SingleErrorBuilder.null.@Nonnull public static SingleError.SingleErrorBuilder builder(@Nonnull IError aError)
aError - The error to copy the data fromnull.@Nonnull public static SingleError.SingleErrorBuilder builderSuccess()
EErrorLevel.SUCCESS. Never null.@Nonnull public static SingleError.SingleErrorBuilder builderInfo()
EErrorLevel.INFO. Never null.@Nonnull public static SingleError.SingleErrorBuilder builderWarn()
EErrorLevel.WARN. Never null.@Nonnull public static SingleError.SingleErrorBuilder builderError()
EErrorLevel.ERROR. Never null.@Nonnull public static SingleError.SingleErrorBuilder builderFatalError()
EErrorLevel.FATAL_ERROR. Never null.Copyright © 2014–2017 Philip Helger. All rights reserved.