org.mockcentral.editor.nodes.expectation.part
Enum SignaturePartElementCreationStrategy

java.lang.Object
  extended by java.lang.Enum<SignaturePartElementCreationStrategy>
      extended by org.mockcentral.editor.nodes.expectation.part.SignaturePartElementCreationStrategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SignaturePartElementCreationStrategy>

public enum SignaturePartElementCreationStrategy
extends java.lang.Enum<SignaturePartElementCreationStrategy>

An enum declaring the available strategies for building method signature parts based on various input.


Enum Constant Summary
ANY_PARAMS
          Strategy for use when "any" parameters are to be accepted by the method expectation.
DEDUCE_PARAMS
          Strategy for use when the method parameters are to be deduced according to the method signature.
DEDUCE_RESULT
          Strategy for use when the expected result is to be deduced according to the method signature.
DEDUCE_THROWABLE_RESULT
          Strategy for use when the throwable expected result is to be deduced according to the "throws" clause of the method signature.
USE_NULL_PARAMS
          Strategy for use when null values can be used for any non-primitive parameters.
USE_NULL_RESULT
          Strategy for use when a null value can be used for the method result.
USE_SUPPLIED_THROWABLE_RESULT
          Strategy for use when a specific throwable class has been supplied to use for the result.
 
Method Summary
 java.lang.String getLabel()
          Returns the label for this value.
static SignaturePartElementCreationStrategy getStrategy(java.lang.String label)
          Returns the enum value identified by the supplied label.
static SignaturePartElementCreationStrategy valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SignaturePartElementCreationStrategy[] 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

ANY_PARAMS

public static final SignaturePartElementCreationStrategy ANY_PARAMS
Strategy for use when "any" parameters are to be accepted by the method expectation.


DEDUCE_PARAMS

public static final SignaturePartElementCreationStrategy DEDUCE_PARAMS
Strategy for use when the method parameters are to be deduced according to the method signature.


USE_NULL_PARAMS

public static final SignaturePartElementCreationStrategy USE_NULL_PARAMS
Strategy for use when null values can be used for any non-primitive parameters.


DEDUCE_RESULT

public static final SignaturePartElementCreationStrategy DEDUCE_RESULT
Strategy for use when the expected result is to be deduced according to the method signature.


USE_NULL_RESULT

public static final SignaturePartElementCreationStrategy USE_NULL_RESULT
Strategy for use when a null value can be used for the method result.


DEDUCE_THROWABLE_RESULT

public static final SignaturePartElementCreationStrategy DEDUCE_THROWABLE_RESULT
Strategy for use when the throwable expected result is to be deduced according to the "throws" clause of the method signature.


USE_SUPPLIED_THROWABLE_RESULT

public static final SignaturePartElementCreationStrategy USE_SUPPLIED_THROWABLE_RESULT
Strategy for use when a specific throwable class has been supplied to use for the result.

Method Detail

values

public static SignaturePartElementCreationStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SignaturePartElementCreationStrategy c : SignaturePartElementCreationStrategy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SignaturePartElementCreationStrategy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getStrategy

public static SignaturePartElementCreationStrategy getStrategy(java.lang.String label)
Returns the enum value identified by the supplied label.

Parameters:
label - the label for the value.
Returns:
the enum value identified by the supplied label.

getLabel

public java.lang.String getLabel()
Returns the label for this value.

Returns:
the label for this value.