Package com.helger.commons.error
Class SingleError.AbstractBuilder<T extends SingleError,IMPLTYPE extends SingleError.AbstractBuilder<T,IMPLTYPE>>
- java.lang.Object
-
- com.helger.commons.error.SingleError.AbstractBuilder<T,IMPLTYPE>
-
- Type Parameters:
T- Result typeIMPLTYPE- Implementation type
- All Implemented Interfaces:
IGenericImplTrait<IMPLTYPE>
- Direct Known Subclasses:
SingleError.SingleErrorBuilder
- Enclosing class:
- SingleError
public abstract static class SingleError.AbstractBuilder<T extends SingleError,IMPLTYPE extends SingleError.AbstractBuilder<T,IMPLTYPE>> extends Object implements IGenericImplTrait<IMPLTYPE>
Abstract builder class forSingleErrorand derived classes.- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static IErrorLevelDEFAULT_ERROR_LEVELprotected IErrorLevelm_aErrorLevelprotected ILocationm_aErrorLocationprotected IHasErrorTextm_aErrorTextprotected Throwablem_aLinkedExceptionprotected Stringm_sErrorFieldNameprotected Stringm_sErrorID
-
Constructor Summary
Constructors Constructor Description AbstractBuilder()AbstractBuilder(IError aError)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Tbuild()IMPLTYPEsetErrorFieldName(String sErrorFieldName)IMPLTYPEsetErrorID(String sErrorID)IMPLTYPEsetErrorLevel(IErrorLevel aErrorLevel)IMPLTYPEsetErrorLocation(ILocation aErrorLocation)IMPLTYPEsetErrorLocation(String sErrorLocation)Set a simple error location without line and column numberIMPLTYPEsetErrorText(IHasErrorText aErrorText)IMPLTYPEsetErrorText(IMultilingualText aMLT)IMPLTYPEsetErrorText(String sErrorText)IMPLTYPEsetLinkedException(Throwable aLinkedException)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.helger.commons.traits.IGenericImplTrait
thisAsT
-
-
-
-
Field Detail
-
DEFAULT_ERROR_LEVEL
public static final IErrorLevel DEFAULT_ERROR_LEVEL
-
m_aErrorLevel
protected IErrorLevel m_aErrorLevel
-
m_sErrorID
protected String m_sErrorID
-
m_sErrorFieldName
protected String m_sErrorFieldName
-
m_aErrorLocation
protected ILocation m_aErrorLocation
-
m_aErrorText
protected IHasErrorText m_aErrorText
-
m_aLinkedException
protected Throwable m_aLinkedException
-
-
Method Detail
-
setErrorLevel
@Nonnull public final IMPLTYPE setErrorLevel(@Nonnull IErrorLevel aErrorLevel)
-
setErrorFieldName
@Nonnull public final IMPLTYPE setErrorFieldName(@Nullable String sErrorFieldName)
-
setErrorLocation
@Nonnull public final IMPLTYPE setErrorLocation(@Nullable String sErrorLocation)
Set a simple error location without line and column number- Parameters:
sErrorLocation- Error location string- Returns:
- this for chaining
- Since:
- 9.0.2
-
setErrorLocation
@Nonnull public final IMPLTYPE setErrorLocation(@Nullable ILocation aErrorLocation)
-
setErrorText
@Nonnull public final IMPLTYPE setErrorText(@Nullable IMultilingualText aMLT)
-
setErrorText
@Nonnull public final IMPLTYPE setErrorText(@Nullable IHasErrorText aErrorText)
-
setLinkedException
@Nonnull public final IMPLTYPE setLinkedException(@Nullable Throwable aLinkedException)
-
-