public class MockPolicyInterceptionSettingsImpl extends java.lang.Object implements MockPolicyInterceptionSettings
| Constructor and Description |
|---|
MockPolicyInterceptionSettingsImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFieldToSuppress(java.lang.reflect.Field[] fields)
Add specific fields that should be suppressed upon invocation.
|
void |
addFieldToSuppress(java.lang.reflect.Field firstField,
java.lang.reflect.Field... fields)
Add specific fields that should be suppressed upon invocation.
|
void |
addFieldTypesToSuppress(java.lang.String[] fieldTypes)
Add field types that should be suppressed.
|
void |
addFieldTypesToSuppress(java.lang.String firstType,
java.lang.String... additionalFieldTypes)
Add field types that should be suppressed.
|
void |
addMethodsToSuppress(java.lang.reflect.Method[] methods)
Add methods to suppress upon invocation.
|
void |
addMethodsToSuppress(java.lang.reflect.Method methodToSuppress,
java.lang.reflect.Method... additionalMethodsToSuppress)
Add methods to suppress upon invocation.
|
void |
addSubtituteReturnValue(java.lang.reflect.Method method,
java.lang.Object returnObject)
Add a method that should be intercepted and return another value (
returnObject). |
java.lang.reflect.Field[] |
getFieldsToSuppress() |
java.lang.String[] |
getFieldTypesToSuppress() |
java.lang.reflect.Method[] |
getMethodsToSuppress() |
java.util.Map<java.lang.reflect.Method,java.lang.reflect.InvocationHandler> |
getProxiedMethods()
Get all methods that should be proxied and the invocation handler for
each method.
|
java.util.Map<java.lang.reflect.Method,java.lang.Object> |
getStubbedMethods()
Get all substitute return values and also returns an unmodifiable map of
all method-object pairs the were initialized.
|
java.util.Map<java.lang.reflect.Method,java.lang.Object> |
getSubstituteReturnValues()
Get all substitute return values and also returns an unmodifiable map of
all method-object pairs the were initialized.
|
void |
proxyMethod(java.lang.reflect.Method method,
java.lang.reflect.InvocationHandler invocationHandler)
Proxy a method with the given invocation handler.
|
void |
setFieldsSuppress(java.lang.reflect.Field[] fields)
Set specific fields that should be suppressed upon invocation.
|
void |
setFieldTypesToSuppress(java.lang.String[] fieldTypes)
Set which field types that should be suppressed.
|
void |
setMethodsToProxy(java.util.Map<java.lang.reflect.Method,java.lang.reflect.InvocationHandler> proxies)
Set the methods to proxy.
|
void |
setMethodsToStub(java.util.Map<java.lang.reflect.Method,java.lang.Object> substituteReturnValues)
Set the substitute return values.
|
void |
setMethodsToSuppress(java.lang.reflect.Method[] methods)
Set which methods to suppress.
|
void |
setSubtituteReturnValues(java.util.Map<java.lang.reflect.Method,java.lang.Object> substituteReturnValues)
Set the substitute return values.
|
void |
stubMethod(java.lang.reflect.Method method,
java.lang.Object returnObject)
Add a method that should be intercepted and return another value (
returnObject) (i.e. |
public void addFieldTypesToSuppress(java.lang.String firstType,
java.lang.String... additionalFieldTypes)
MockPolicyInterceptionSettingsaddFieldTypesToSuppress in interface MockPolicyInterceptionSettingspublic void addFieldTypesToSuppress(java.lang.String[] fieldTypes)
MockPolicyInterceptionSettingsaddFieldTypesToSuppress in interface MockPolicyInterceptionSettingspublic void setFieldTypesToSuppress(java.lang.String[] fieldTypes)
MockPolicyInterceptionSettingssetFieldTypesToSuppress in interface MockPolicyInterceptionSettingspublic java.lang.reflect.Field[] getFieldsToSuppress()
getFieldsToSuppress in interface MockPolicyInterceptionSettingsnull or other default values).public java.lang.reflect.Method[] getMethodsToSuppress()
getMethodsToSuppress in interface MockPolicyInterceptionSettingspublic java.util.Map<java.lang.reflect.Method,java.lang.Object> getStubbedMethods()
MockPolicyInterceptionSettingsgetStubbedMethods in interface MockPolicyInterceptionSettingspublic void addFieldToSuppress(java.lang.reflect.Field firstField,
java.lang.reflect.Field... fields)
MockPolicyInterceptionSettingsaddFieldToSuppress in interface MockPolicyInterceptionSettingspublic void addFieldToSuppress(java.lang.reflect.Field[] fields)
MockPolicyInterceptionSettingsaddFieldToSuppress in interface MockPolicyInterceptionSettingspublic void addMethodsToSuppress(java.lang.reflect.Method methodToSuppress,
java.lang.reflect.Method... additionalMethodsToSuppress)
MockPolicyInterceptionSettingsaddMethodsToSuppress in interface MockPolicyInterceptionSettingspublic void addMethodsToSuppress(java.lang.reflect.Method[] methods)
MockPolicyInterceptionSettingsaddMethodsToSuppress in interface MockPolicyInterceptionSettingspublic void stubMethod(java.lang.reflect.Method method,
java.lang.Object returnObject)
MockPolicyInterceptionSettingsreturnObject) (i.e. the method is stubbed).stubMethod in interface MockPolicyInterceptionSettingspublic void setFieldsSuppress(java.lang.reflect.Field[] fields)
MockPolicyInterceptionSettingssetFieldsSuppress in interface MockPolicyInterceptionSettingspublic void setMethodsToSuppress(java.lang.reflect.Method[] methods)
MockPolicyInterceptionSettingssetMethodsToSuppress in interface MockPolicyInterceptionSettingspublic void setMethodsToStub(java.util.Map<java.lang.reflect.Method,java.lang.Object> substituteReturnValues)
MockPolicyInterceptionSettingsNote that this overrides all previous configurations.
setMethodsToStub in interface MockPolicyInterceptionSettingspublic java.lang.String[] getFieldTypesToSuppress()
getFieldTypesToSuppress in interface MockPolicyInterceptionSettingspublic void addSubtituteReturnValue(java.lang.reflect.Method method,
java.lang.Object returnObject)
MockPolicyInterceptionSettingsreturnObject). The substitute return values is a key-value
map where each key is a method that should be intercepted and each value
is the new return value for that method when it's intercepted.addSubtituteReturnValue in interface MockPolicyInterceptionSettingspublic void setSubtituteReturnValues(java.util.Map<java.lang.reflect.Method,java.lang.Object> substituteReturnValues)
MockPolicyInterceptionSettingsNote that this overrides all previous configurations.
setSubtituteReturnValues in interface MockPolicyInterceptionSettingspublic java.util.Map<java.lang.reflect.Method,java.lang.Object> getSubstituteReturnValues()
MockPolicyInterceptionSettingsgetSubstituteReturnValues in interface MockPolicyInterceptionSettingspublic java.util.Map<java.lang.reflect.Method,java.lang.reflect.InvocationHandler> getProxiedMethods()
MockPolicyInterceptionSettingsgetProxiedMethods in interface MockPolicyInterceptionSettingspublic void proxyMethod(java.lang.reflect.Method method,
java.lang.reflect.InvocationHandler invocationHandler)
MockPolicyInterceptionSettingsproxyMethod in interface MockPolicyInterceptionSettingspublic void setMethodsToProxy(java.util.Map<java.lang.reflect.Method,java.lang.reflect.InvocationHandler> proxies)
MockPolicyInterceptionSettingsNote that this overrides all previous configurations.
setMethodsToProxy in interface MockPolicyInterceptionSettings