public abstract class BaseTrainer<S extends BaseTrainer<S,T>,T> extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
BaseTrainer.BaseWhen<R> |
protected class |
BaseTrainer.StubArrayBuilder<R> |
protected class |
BaseTrainer.WhenBooleanArray |
protected class |
BaseTrainer.WhenByteArray |
protected class |
BaseTrainer.WhenCharArray |
protected class |
BaseTrainer.WhenClass
Intermediate result of a when(Class) call.
|
protected class |
BaseTrainer.WhenDoubleArray |
protected class |
BaseTrainer.WhenFloatArray |
protected class |
BaseTrainer.WhenIntArray |
protected class |
BaseTrainer.WhenLongArray |
protected class |
BaseTrainer.WhenObject<R> |
protected class |
BaseTrainer.WhenObjectArray<R> |
protected class |
BaseTrainer.WhenShortArray |
Modifier and Type | Field and Description |
---|---|
Class<T> |
traineeType |
Modifier | Constructor and Description |
---|---|
protected |
BaseTrainer()
Create a new
BaseTrainer instance. |
protected |
BaseTrainer(Class<T> traineeType) |
Modifier and Type | Method and Description |
---|---|
protected <R> R |
any(Class<R> type) |
protected <R> R |
argThat(ArgumentMatcher<R> matcher) |
protected <R> R |
eq(R value) |
protected <R> R |
isInstance(Class<R> type) |
protected S |
self() |
protected void |
thenThrow(Exception e) |
protected void |
thenThrow(ObjectProvider<? extends Exception> provider) |
protected abstract void |
train(T trainee) |
protected org.apache.commons.proxy2.stub.TrainingContext |
trainingContext() |
BaseTrainer.WhenBooleanArray |
when(boolean[] expression) |
BaseTrainer.WhenByteArray |
when(byte[] expression) |
BaseTrainer.WhenCharArray |
when(char[] expression) |
BaseTrainer.WhenClass |
when(Class<?> expression) |
BaseTrainer.WhenDoubleArray |
when(double[] expression) |
BaseTrainer.WhenFloatArray |
when(float[] expression) |
BaseTrainer.WhenIntArray |
when(int[] expression) |
BaseTrainer.WhenLongArray |
when(long[] expression) |
<R> BaseTrainer.WhenObject<R> |
when(R expression) |
<R> BaseTrainer.WhenObjectArray<R> |
when(R[] expression) |
BaseTrainer.WhenShortArray |
when(short[] expresssion) |
public final Class<T> traineeType
protected BaseTrainer()
BaseTrainer
instance. This constructor should only be called by classes that explicitly
assign the T parameter in the class definition. This should include basically any runtime-usable class.protected BaseTrainer(Class<T> traineeType)
protected <R> R eq(R value)
protected <R> R isInstance(Class<R> type)
protected <R> R argThat(ArgumentMatcher<R> matcher)
protected void thenThrow(ObjectProvider<? extends Exception> provider)
protected org.apache.commons.proxy2.stub.TrainingContext trainingContext()
public <R> BaseTrainer.WhenObject<R> when(R expression)
public BaseTrainer.WhenClass when(Class<?> expression)
public BaseTrainer.WhenByteArray when(byte[] expression)
public BaseTrainer.WhenBooleanArray when(boolean[] expression)
public BaseTrainer.WhenIntArray when(int[] expression)
public BaseTrainer.WhenShortArray when(short[] expresssion)
public BaseTrainer.WhenLongArray when(long[] expression)
public BaseTrainer.WhenFloatArray when(float[] expression)
public BaseTrainer.WhenDoubleArray when(double[] expression)
public <R> BaseTrainer.WhenObjectArray<R> when(R[] expression)
public BaseTrainer.WhenCharArray when(char[] expression)
Copyright © 2005–2014 The Apache Software Foundation. All rights reserved.