oracle.cle.util.statemachine
Class StateMachineViolation

java.lang.Object
  |
  +--oracle.cle.util.statemachine.StateMachineViolation
All Implemented Interfaces:
java.io.Serializable

public class StateMachineViolation
extends java.lang.Object
implements java.io.Serializable

Represents a violation of a StateMachine principle as discovered through use of the StateMachineValidator. These violations are generated by the StateMachineValidator and can be retrieved via the getViolations() method on the validator.

See Also:
StateMachineValidator, Serialized Form

Field Summary
protected  TransitionCondition condition
          reference to TransitionCondition in question
protected  State fromState
          reference to source State in question
static java.lang.String NO_DESTINATION_FOR_STATE
          Constant String for StateMachine design Violation
static java.lang.String NO_ROUTE_TO_END_STATE
          Constant String for StateMachine design Violation
static java.lang.String NO_TRANSITION_FOR_CONDITION
          Constant String for StateMachine design Violation
static java.lang.String NO_TRANSITION_TABLE
          Constant String for StateMachine design Violation
protected  java.lang.String specificMessage
          The specific message for this violation.
protected  State toState
          reference to destination State in question
static java.lang.String UNSPECIFIED
          Constant String for StateMachine design Violation
protected  java.lang.String violationCode
          The possible values for this code are found as constants in this class
 
Constructor Summary
StateMachineViolation(State fromState, State toState, TransitionCondition condition, java.lang.String violationCode, java.lang.String specificMessage)
          Construct a violation.
 
Method Summary
 java.lang.String getViolationCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_TRANSITION_FOR_CONDITION

public static final java.lang.String NO_TRANSITION_FOR_CONDITION
Constant String for StateMachine design Violation

NO_DESTINATION_FOR_STATE

public static final java.lang.String NO_DESTINATION_FOR_STATE
Constant String for StateMachine design Violation

NO_ROUTE_TO_END_STATE

public static final java.lang.String NO_ROUTE_TO_END_STATE
Constant String for StateMachine design Violation

NO_TRANSITION_TABLE

public static final java.lang.String NO_TRANSITION_TABLE
Constant String for StateMachine design Violation

UNSPECIFIED

public static final java.lang.String UNSPECIFIED
Constant String for StateMachine design Violation

violationCode

protected java.lang.String violationCode
The possible values for this code are found as constants in this class

specificMessage

protected java.lang.String specificMessage
The specific message for this violation. This is apart from the violationCode

fromState

protected State fromState
reference to source State in question

toState

protected State toState
reference to destination State in question

condition

protected TransitionCondition condition
reference to TransitionCondition in question
Constructor Detail

StateMachineViolation

public StateMachineViolation(State fromState,
                             State toState,
                             TransitionCondition condition,
                             java.lang.String violationCode,
                             java.lang.String specificMessage)
Construct a violation. Most arguments are self explanatory. violationCode should be one of the constants in this class.

  eg. NO_TRANSITION_FOR_CONDITION
      NO_DESTINATION_FOR_STATE
      NO_ROUTE_TO_END_STATE
      NO_TRANSITION_TABLE
      UNSPECIFIED
 

Method Detail

getViolationCode

public java.lang.String getViolationCode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003 ORACLE Corp. All Rights Reserved.