|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<ValueType>
org.mockcentral.server.ValueType
public enum ValueType
An enum declaring the available value types for an Object (or primitive
value) created using the SignaturePartBuilder.extractObject
method.
| Enum Constant Summary | |
|---|---|
ARRAY
The result will be a new Array. |
|
COLLECTION
The result will be a new instance of a java.util.Collection
class. |
|
CONSTANT
The result will be an constant value. |
|
ENUM
The result will be an Enum constant value. |
|
INSTANCE
The result will be a newly created class instance. |
|
MOCK_OBJECT
The result will be a Mock Object definied within the current Fixture. |
|
NULL
The result will be null. |
|
OBJECT
The result will be a wrapped primitive(Integer, Long, Short, Float or Double) or String. |
|
PRIMITIVE
The result will be a primitive (boolean or int). |
|
THROWABLE
The result will be a newly created Throwable class instance. |
|
VARIABLE
The result will be a runtime variable supplied to the server. |
|
| Method Summary | |
|---|---|
java.lang.String |
getLabel()
Returns the label for this Enum value. |
static ValueType |
getValueType(java.lang.String label)
Returns the ValueType corresponding to the supplied label. |
static ValueType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static ValueType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final ValueType PRIMITIVE
FullConstraintMatcher class, which is used to
set the parameters for the mock object method expectations, cannot accept
primitives). The result will be constructed from the corresponding
"valueClassName" and "value" field values.
Note that since java 1.5 it is not necessary to use this value type as unboxing of OBJECT value types will be handled automatically.
public static final ValueType OBJECT
public static final ValueType MOCK_OBJECT
Fixture. The "value" field value is used to look up the
specific entry from the map contained in the current Fixture
.
public static final ValueType INSTANCE
SignaturePartBean.addConstructorArg
method. The Object will be constructed from the corresponding
"valueClassName" and "contructorArgs" field values.
public static final ValueType VARIABLE
HashTable supplied to the MockCentralServer.
public static final ValueType THROWABLE
Throwable class instance.
Constructor arguments are supplied using the
SignaturePartBean.addConstructorArg method. The Object will
be constructed from the corresponding "valueClassName" and
"contructorArgs" field values.
public static final ValueType COLLECTION
java.util.Collection
class. Entries for the collection are supplied using the
SignaturePartBean.addCollectionEntry method. The Object will
be constructed from the corresponding "valueClassName" and
"collectionEntries" field values.
public static final ValueType ARRAY
SignaturePartBean.addCollectionEntry method. The Object
will be constructed from the corresponding "valueClassName" and
"collectionEntries" field values.
public static final ValueType ENUM
public static final ValueType CONSTANT
public static final ValueType NULL
| Method Detail |
|---|
public static ValueType[] values()
for (ValueType c : ValueType.values()) System.out.println(c);
public static ValueType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is nullpublic java.lang.String getLabel()
public static ValueType getValueType(java.lang.String label)
throws MockCentralServerException
ValueType corresponding to the supplied label.
label - the label for the ValueType
ValueType corresponding to the supplied label.
throws MockCentralServerException if there is no
ValueType with the supplied label.
MockCentralServerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||