org.mockcentral.editor.nodes
Enum MockCentralNodeType

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

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

An enum specifying the various types of MockCentralNode.

Author:
David Hutchinson

Enum Constant Summary
DELETED
          The node has been deleted
EXPECTATION
          The node type for a method expectation.
EXPECTATION_GROUP
          The node type for a group of method expectations.
FIXTURE
          The node type for a fixture.
FIXTURE_GROUP
          The node type for a group of fixtures.
MOCK_OBJECT
          The node type for a Mock Object
MOCK_OBJECT_GROUP
          The node type for a group of Mock Objects
 
Method Summary
protected  java.lang.String getElementName()
          Returns the JDOM Element name corresponding to this value.
protected  java.lang.Class<?> getNodeClass()
          Returns the MockCentralNode class corresponding to this value.
static MockCentralNodeType getNodeType(java.lang.String elementName)
          Returns a value from this enum based on the supplied element name.
static MockCentralNodeType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MockCentralNodeType[] 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

FIXTURE_GROUP

public static final MockCentralNodeType FIXTURE_GROUP
The node type for a group of fixtures.


FIXTURE

public static final MockCentralNodeType FIXTURE
The node type for a fixture.


MOCK_OBJECT_GROUP

public static final MockCentralNodeType MOCK_OBJECT_GROUP
The node type for a group of Mock Objects


MOCK_OBJECT

public static final MockCentralNodeType MOCK_OBJECT
The node type for a Mock Object


EXPECTATION_GROUP

public static final MockCentralNodeType EXPECTATION_GROUP
The node type for a group of method expectations.


EXPECTATION

public static final MockCentralNodeType EXPECTATION
The node type for a method expectation.


DELETED

public static final MockCentralNodeType DELETED
The node has been deleted

Method Detail

values

public static MockCentralNodeType[] 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 (MockCentralNodeType c : MockCentralNodeType.values())
    System.out.println(c);

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

valueOf

public static MockCentralNodeType 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

getElementName

protected java.lang.String getElementName()
Returns the JDOM Element name corresponding to this value.

Returns:
the JDOM Element name corresponding to this value.

getNodeClass

protected java.lang.Class<?> getNodeClass()
Returns the MockCentralNode class corresponding to this value.

Returns:
the MockCentralNode class corresponding to this value.

getNodeType

public static MockCentralNodeType getNodeType(java.lang.String elementName)
Returns a value from this enum based on the supplied element name.

Parameters:
elementName - the JDOM Element name corresponding to the value.
Returns:
a value from this enum based on the supplied element name.