Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.conversation.base
Class BasicCpStateMachineWriter

    java.lang.Object
      com.ibm.conversation.base.BasicCpStateMachineWriter

public class BasicCpStateMachineWriter
extends java.lang.Object

The BasicCpStateMachineWriter class frites a human-readable, multi-line, English-language description of a CpStateMachine.

This is defined for debugging and unit testing purposes.

Method Summary
`static java.lang.String` | `stringForm(CpStateMachine stateMachine)` Returns a string containing a human-friendly English-language description of the given CpStateMachine.
`static void` | `writeMessageDescription(java.io.Writer writer, java.lang.String linePrefix, MessageDescription desc)` Writes out, on the given writer, a human-friendly English-language description of the given MessageDescription.
`static void` | `writeState(java.io.Writer writer, java.lang.String linePrefix, CpState state, java.util.Collection parentRoles)` Writes out, on the given writer, a human-friendly English-language description of the given state.
`static void` | `writeStateMachine(java.io.Writer writer, java.lang.String linePrefix, CpStateMachine stateMachine)` Writes, on the given writer, a human-friendly English-language description of the given CpStateMachine.
`static void` | `writeStateTransition(java.io.Writer writer, java.lang.String linePrefix, CpStateTransition trans)` Writes out, on the given writer, a human-friendly English-language description of the given CpStateTransition.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### stringForm

    public static java.lang.String stringForm(CpStateMachine stateMachine)

  Returns a string containing a human-friendly English-language description of the given CpStateMachine.

  Parameters:
    `stateMachine` - The state machine to be described.
  Returns:
    The description of the state machine.

### writeStateMachine

    public static void writeStateMachine(java.io.Writer writer,
                                         java.lang.String linePrefix,
                                         CpStateMachine stateMachine)
                                  throws java.io.IOException

  Writes, on the given writer, a human-friendly English-language description of the given CpStateMachine.

  The description is multi-line, and intented. Each new line is prefixed with the `linePrefix` string followed by an appropriate amount of indentation.

  Parameters:
    `writer` - The Writer on which to write the description.
    `linePrefix` - The String to add to the start of each new line.
    `stateMachine` - The state machine to be described.
  Throws:
    `java.io.IOException` - If thrown by the Writer.

### writeState

    public static void writeState(java.io.Writer writer,
                                  java.lang.String linePrefix,
                                  CpState state,
                                  java.util.Collection parentRoles)
                           throws java.io.IOException

  Writes out, on the given writer, a human-friendly English-language description of the given state.

  It's necessary to pass in the policy's roles in order to provide parent-role names for in-child states' role-maps.

  Parameters:
    `writer` - The Writer on which to write the description.
    `linePrefix` - The string to add to the start of each new line (e.g., for indentation).
    `state` - The CpState to describe.
    `parentRoles` - The roles defined in the CpStateMachine that owns the given state.
  Throws:
    `java.io.IOException` - If thrown by the Writer.

### writeStateTransition

    public static void writeStateTransition(java.io.Writer writer,
                                            java.lang.String linePrefix,
                                            CpStateTransition trans)
                                     throws java.io.IOException

  Writes out, on the given writer, a human-friendly English-language description of the given CpStateTransition.

  Parameters:
    `writer` - The Writer on which to write the description.
    `linePrefix` - The string to add to the start of each new line (e.g., for indentation).
    `trans` - The CpStateTransition to describe.
  Throws:
    `java.io.IOException` - If thrown by the Writer.

### writeMessageDescription

    public static void writeMessageDescription(java.io.Writer writer,
                                               java.lang.String linePrefix,
                                               MessageDescription desc)
                                        throws java.io.IOException

  Writes out, on the given writer, a human-friendly English-language description of the given MessageDescription.

  Parameters:
    `writer` - The Writer on which to write the description.
    `linePrefix` - The string to add to the start of each new line (e.g., for indentation).
    `desc` - The MessageDescription to be written out.
  Throws:
    `java.io.IOException` - If thrown by the Writer.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005