Assert.
AssertFactory decorator that casts the input value to the given type before invoking the decorated factory.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final AssertFactory | |
| private final Class | |
| private final Type |
| Access | Constructor and Description |
|---|---|
| public | InstanceOfAssertFactory(Class<T>
the type, AssertFactory<T, ASSERT> Class instance of the given type.the delegate)AssertFactory to decorate.Instantiates a new |
| public | InstanceOfAssertFactory(Class<T>
the raw rawClass, Type[] Class instance of the given type.the typeArguments, AssertFactory<T, ASSERT> Type arguments of the given type.the delegate)AssertFactory to decorate.Instantiates a new |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ASSERT | Returns: the customAssert instance for the given valuethe input value for the actual)Assert instanceImplements org. Assert instance for the given value.
|
| public ASSERT | Returns: the customAssert instance for the provided valuethe value provider for the valueProviderAssert instanceOverrides default org. Implements org. Assert instance for the value provided by the
given valueProvider.
|
| pack-priv Class | |
| public String |
| delegate | back to summary |
|---|---|
| private final AssertFactory<T, ASSERT> delegate | |
| rawClass | back to summary |
|---|---|
| private final Class<T> rawClass | |
| type | back to summary |
|---|---|
| private final Type type | |
| InstanceOfAssertFactory | back to summary |
|---|---|
| public InstanceOfAssertFactory(Class<T> type, AssertFactory<T, ASSERT> delegate) Instantiates a new
| |
| InstanceOfAssertFactory | back to summary |
|---|---|
| public InstanceOfAssertFactory(Class<T> rawClass, Type[] typeArguments, AssertFactory<T, ASSERT> delegate) Instantiates a new
| |
| InstanceOfAssertFactory | back to summary |
|---|---|
| private InstanceOfAssertFactory(Type type, Class<T> rawClass, AssertFactory<T, ASSERT> delegate) | |
| createAssert | back to summary |
|---|---|
| public ASSERT createAssert(Object actual) Implements org. Creates the custom
Before invoking the delegate, the factory casts the value to the raw
| |
| createAssert | back to summary |
|---|---|
| public ASSERT createAssert(AssertFactory. Overrides default org. Implements org. Creates the custom This is typically used by custom assertions that want to leverage existing factories and need to manipulate the value upfront.
This implementation requests a value compatible with the
| |
| getRawClass | back to summary |
|---|---|
| pack-priv Class | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public Type[] | getActualTypeArguments()
Implements java. Type objects representing the actual type
arguments to this type.
|
| public Type | getOwnerType()
Implements java. Type object representing the type that this type
is a member of.
|
| public Class | getRawType()
Implements java. Type object representing the class or interface
that declared this type.
|
| public String | getTypeName()
Overrides default java. |
| public int | |
| public String |
| rawClass | back to summary |
|---|---|
| private final Class<?> rawClass | |
| typeArguments | back to summary |
|---|---|
| private final Type[] typeArguments | |
| SyntheticParameterizedType | back to summary |
|---|---|
| public SyntheticParameterizedType(Class<?> rawClass, Type[] typeArguments) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getActualTypeArguments | back to summary |
|---|---|
| public Type[] getActualTypeArguments() Implements java. Doc from java. Returns an array of Note that in some cases, the returned array be empty. This can occur if this type represents a non-parameterized type nested within a parameterized type. | |
| getOwnerType | back to summary |
|---|---|
| public Type getOwnerType() Implements java. Doc from java. Returns a If this type is a top-level type, | |
| getRawType | back to summary |
|---|---|
| public Class Implements java. Doc from java. Returns the | |
| getTypeName | back to summary |
|---|---|
| public String getTypeName() Overrides default java. Doc from java. Returns a string describing this type, including information about any type parameters. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |