@Component public class MockResult extends AbstractResult
Modifier and Type | Field and Description |
---|---|
protected Proxifier |
proxifier |
protected java.lang.Class<?> |
typeToUse |
Constructor and Description |
---|
MockResult() |
MockResult(Proxifier proxifier) |
Modifier and Type | Method and Description |
---|---|
Result |
include(java.lang.Object value)
Uses the type name to include.
|
Result |
include(java.lang.String key,
java.lang.Object value)
Stores an attribute in the result.
|
java.util.Map<java.lang.String,java.lang.Object> |
included()
Return all included attributes via Result.include();
|
<T> T |
included(java.lang.String key) |
Result |
on(java.lang.Class<? extends java.lang.Exception> exception)
Add an
Exception to be handled by Exception Handler. |
protected <T> MethodInvocation<T> |
returnOnFinalMethods(java.lang.Class<T> view) |
<T extends View> |
use(java.lang.Class<T> view)
Force result to use the defined view.
|
boolean |
used()
Whether this result was used.
|
forwardTo, forwardTo, forwardTo, notFound, nothing, of, of, permanentlyRedirectTo, permanentlyRedirectTo, permanentlyRedirectTo, redirectTo, redirectTo, redirectTo
protected java.lang.Class<?> typeToUse
protected final Proxifier proxifier
public MockResult(Proxifier proxifier)
public MockResult()
public Result include(java.lang.String key, java.lang.Object value)
Result
key
- a String specifying the key of the attributevalue
- the object to be storedpublic Result on(java.lang.Class<? extends java.lang.Exception> exception)
Result
Exception
to be handled by Exception Handler.exception
- The exception to handle.public <T extends View> T use(java.lang.Class<T> view)
Result
protected <T> MethodInvocation<T> returnOnFinalMethods(java.lang.Class<T> view)
public boolean used()
Result
public <T> T included(java.lang.String key)
key
- public java.util.Map<java.lang.String,java.lang.Object> included()
Result
public Result include(java.lang.Object value)
value
- the object to be storedTypeNameExtractor
Copyright © 2013 Caelum. All Rights Reserved.