Class DefaultErrorTypeBuilder
java.lang.Object
org.mule.runtime.ast.internal.error.DefaultErrorTypeBuilder
- All Implemented Interfaces:
ErrorTypeBuilder
Builder for
ErrorType. This must be the only mechanism to create an instance of ErrorType.- Since:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDefault and only implementation ofErrorType -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionorg.mule.runtime.api.message.ErrorTypebuild()Creates a new instance of the configured error type.static DefaultErrorTypeBuilderbuilder()identifier(String identifier) Sets the error type identifier.Sets the error type namespace.parentErrorType(org.mule.runtime.api.message.ErrorType parentErrorType) Sets the parent error type.
-
Field Details
-
CORE_NAMESPACE_NAME
-
ANY_IDENTIFIER
Wild card that matches with any error and is on top of the error hierarchy for those that allow handling -
CRITICAL_IDENTIFIER
-
-
Method Details
-
builder
- Returns:
- the
ErrorTypeBuilderimplementation. This must be the only mechanism to create an instance ofErrorType
-
identifier
Sets the error type identifier. @seeErrorType.getIdentifier(). The identifier must be unique within the same namespace.- Specified by:
identifierin interfaceErrorTypeBuilder- Parameters:
identifier- the string representation- Returns:
thisbuilder
-
namespace
Sets the error type namespace. @seeErrorType.getNamespace()- Specified by:
namespacein interfaceErrorTypeBuilder- Parameters:
namespace- the error type namespace- Returns:
thisbuilder
-
parentErrorType
public DefaultErrorTypeBuilder parentErrorType(org.mule.runtime.api.message.ErrorType parentErrorType) Sets the parent error type. @seeErrorType.getParentErrorType()- Specified by:
parentErrorTypein interfaceErrorTypeBuilder- Parameters:
parentErrorType- the parent error type- Returns:
thisbuilder
-
build
public org.mule.runtime.api.message.ErrorType build()Creates a new instance of the configured error type.- Specified by:
buildin interfaceErrorTypeBuilder- Returns:
- the error type with the provided configuration.
-