public class TUExecutionResult extends ExecutionResult<TransformationUtility,TUExecutionResult,TUExecutionResult.Type>
TransformationUtility
instance has been executed.TUExecutionResult
Modifier and Type | Class and Description |
---|---|
static class |
TUExecutionResult.Type
The type of result after the
TransformationUtility instance has been executed. |
Modifier and Type | Method and Description |
---|---|
R |
addWarning(Exception warning)
Add a new warning associated with this result.
|
protected void |
changeTypeOnWarning()
This method is used to notify subclasses that
the result type might have to change due to the
addition of a warning.
|
protected boolean |
dependencyFailureCheck()
Returns true if this result type falls to the dependency failure criteria,
which is stated in
TransformationUtility.dependsOn(String...) |
static TUExecutionResult |
error(TransformationUtility transformationUtility,
Exception exception) |
static TUExecutionResult |
error(TransformationUtility transformationUtility,
Exception exception,
Object value) |
static TUExecutionResult |
error(TransformationUtility transformationUtility,
Object value,
Exception exception,
String details) |
String |
getDetails()
Return the result details
|
Exception |
getException()
Return the exception object in case of types such as ERROR
|
S |
getSource()
Returns the source of this result, which could be for example
a transformation utility instance or a transformation
operation instance
|
T |
getType()
Returns the result type
|
Object |
getValue()
Returns the value returned by the transformation utility, which can be null
|
List<Exception> |
getWarnings()
Return a list of warnings associated with this result.
|
protected boolean |
isExceptionType()
Returns true if this result type is supposed to contain an exception,
such ERROR
|
static TUExecutionResult |
nullResult(TransformationUtility transformationUtility) |
static TUExecutionResult |
nullResult(TransformationUtility transformationUtility,
String details) |
R |
setDetails(String details) |
protected R |
setException(Exception exception)
Set the exception associated with this result.
|
protected R |
setType(T type) |
static TUExecutionResult |
value(TransformationUtility transformationUtility,
Object value) |
static TUExecutionResult |
value(TransformationUtility transformationUtility,
String details,
Object value) |
static TUExecutionResult |
warning(TransformationUtility transformationUtility,
Exception exception,
Object value) |
static TUExecutionResult |
warning(TransformationUtility transformationUtility,
Exception exception,
String details,
Object value) |
static TUExecutionResult |
warning(TransformationUtility transformationUtility,
String details,
Object value) |
public static TUExecutionResult nullResult(TransformationUtility transformationUtility)
public static TUExecutionResult nullResult(TransformationUtility transformationUtility, String details)
public static TUExecutionResult value(TransformationUtility transformationUtility, Object value)
public static TUExecutionResult value(TransformationUtility transformationUtility, String details, Object value)
public static TUExecutionResult warning(TransformationUtility transformationUtility, String details, Object value)
public static TUExecutionResult warning(TransformationUtility transformationUtility, Exception exception, Object value)
public static TUExecutionResult warning(TransformationUtility transformationUtility, Exception exception, String details, Object value)
public static TUExecutionResult error(TransformationUtility transformationUtility, Exception exception)
public static TUExecutionResult error(TransformationUtility transformationUtility, Exception exception, Object value)
public static TUExecutionResult error(TransformationUtility transformationUtility, Object value, Exception exception, String details)
protected void changeTypeOnWarning()
public Object getValue()
protected boolean isExceptionType()
protected boolean dependencyFailureCheck()
TransformationUtility.dependsOn(String...)
protected R setType(T type)
public R setDetails(String details)
protected R setException(Exception exception)
IllegalArgumentException
will be thrownexception
- associated with the execution resultpublic R addWarning(Exception warning)
warning
- the warning to be addedpublic S getSource()
public T getType()
public String getDetails()
public Exception getException()
Copyright © 2018. All rights reserved.