Package org.easymock.internal
Class Result
- java.lang.Object
-
- org.easymock.internal.Result
-
- All Implemented Interfaces:
java.io.Serializable
,IAnswer<java.lang.Object>
public final class Result extends java.lang.Object implements IAnswer<java.lang.Object>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
private boolean
shouldFillInStackTrace
private IAnswer<?>
value
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
answer()
Is called by EasyMock to answer an expected call.static Result
createAnswerResult(IAnswer<?> answer)
static Result
createDelegatingResult(java.lang.Object value)
static Result
createReturnResult(java.lang.Object value)
static Result
createThrowResult(java.lang.Throwable throwable)
boolean
shouldFillInStackTrace()
java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
value
private final IAnswer<?> value
-
shouldFillInStackTrace
private final boolean shouldFillInStackTrace
-
-
Constructor Detail
-
Result
private Result(IAnswer<?> value, boolean shouldFillInStackTrace)
-
-
Method Detail
-
createThrowResult
public static Result createThrowResult(java.lang.Throwable throwable)
-
createReturnResult
public static Result createReturnResult(java.lang.Object value)
-
createDelegatingResult
public static Result createDelegatingResult(java.lang.Object value)
-
answer
public java.lang.Object answer() throws java.lang.Throwable
Description copied from interface:IAnswer
Is called by EasyMock to answer an expected call. The answer may be to return a value, or to throw an exception. The arguments of the call for which the answer is generated are available viaEasyMock.getCurrentArguments()
- be careful here, using the arguments is not refactoring-safe.
-
shouldFillInStackTrace
public boolean shouldFillInStackTrace()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-