Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.togethersoft.openapi.sci.visitor
Class SciVisitorUtil

public class SciVisitorUtil

This class contains a set of useful static methods for accepting a visitor by an enumeration of elements, expressions, statements or references.

Methods `acceptToAll` just accept visitor by a specified enumeration of elements, expressions, statements or references.

Methods `acceptUntilStop` behave more delicately, allowing to stop the process of accepting when the result of acception the visitor by an element of enumeration equals to the static variable `STOP`.

Author:
  TogetherSoft

Field Summary
`final static Object` | `STOP` This static variable is used to keep the "stop-sign" object.

Method Summary
`static void` | `acceptToAll(SciElementEnumeration enum, SciElementVisitor visitor)` Makes each `SciElement` from the specified enumeration accept the specified visitor.
`static void` | `acceptToAll(SciReferenceEnumeration enum, SciReferenceVisitor visitor)` Makes each `SciReference` from the specified enumeration accept the specified visitor.
`static void` | `acceptToAll(SciStatementEnumeration enum, SciStatementVisitor visitor)` Makes each `SciStatement` from the specified enumeration accept the specified visitor.
`static void` | `acceptToAll(SciExpressionEnumeration enum, SciExpressionVisitor visitor)` Makes each `SciExpression` from the specified enumeration accept the specified visitor.
`static Object` | `acceptUntilStop(SciElementEnumeration enum, SciElementVisitor visitor)` Makes each `SciElement` from the specified enumeration accept the specified visitor until the result of accepting is equal to the static variable `STOP`.
`static Object` | `acceptUntilStop(SciReferenceEnumeration enum, SciReferenceVisitor visitor)` Makes each `SciReference` from the specified enumeration accept the specified visitor until the result of accepting is equal to the static variable `STOP`.
`static Object` | `acceptUntilStop(SciStatementEnumeration enum, SciStatementVisitor visitor)` Makes each `SciStatement` from the specified enumeration accept the specified visitor until the result of accepting is equal to the static variable `STOP`.
`static Object` | `acceptUntilStop(SciExpressionEnumeration enum, SciExpressionVisitor visitor)` Makes each `SciExpression` from the specified enumeration accept the specified visitor until the result of accepting is equal to the static variable `STOP`.

Field Detail

### STOP

    public final static Object STOP

  This static variable is used to keep the "stop-sign" object.

Method Detail

### acceptToAll

    public static void acceptToAll(SciElementEnumeration enum, SciElementVisitor visitor)

  Makes each `SciElement` from the specified enumeration accept the specified visitor.
  Parameters:
    enum - `SciElementEnumeration` of `SciElement`s
    visitor - the `SciElementVisitor` to perform desired actions

### acceptToAll

    public static void acceptToAll(SciReferenceEnumeration enum, SciReferenceVisitor visitor)

  Makes each `SciReference` from the specified enumeration accept the specified visitor.
  Parameters:
    enum - `SciReferenceEnumeration` of `SciReference`s
    visitor - the `SciReferenceVisitor` to perform desired actions

### acceptToAll

    public static void acceptToAll(SciStatementEnumeration enum, SciStatementVisitor visitor)

  Makes each `SciStatement` from the specified enumeration accept the specified visitor.
  Parameters:
    enum - `SciStatementEnumeration` of `SciStatement`s
    visitor - the `SciStatementVisitor` to perform desired actions

### acceptToAll

    public static void acceptToAll(SciExpressionEnumeration enum, SciExpressionVisitor visitor)

  Makes each `SciExpression` from the specified enumeration accept the specified visitor.
  Parameters:
    enum - `SciExpressionEnumeration` of `SciExpression`s
    visitor - the `SciExpressionVisitor` to perform desired actions

### acceptUntilStop

    public static Object acceptUntilStop(SciElementEnumeration enum, SciElementVisitor visitor)

  Makes each `SciElement` from the specified enumeration accept the specified visitor until the result of accepting is equal to the static variable `STOP`.
  Parameters:
    enum - `SciElementEnumeration` of `SciElement`s
    visitor - the `SciElementVisitor` to perform desired actions
  Returns: `STOP` variable if `visitor`'s returned result is equal to the static variable `STOP`, `null` otherwise
  See Also:
    STOP

### acceptUntilStop

    public static Object acceptUntilStop(SciReferenceEnumeration enum, SciReferenceVisitor visitor)

  Makes each `SciReference` from the specified enumeration accept the specified visitor until the result of accepting is equal to the static variable `STOP`.
  Parameters:
    enum - `SciReferenceEnumeration` of `SciReference`s
    visitor - the `SciReferenceVisitor` to perform desired actions
  Returns: `STOP` variable if `visitor`'s returned result is equal to the static variable `STOP`, `null` otherwise
  See Also:
    STOP

### acceptUntilStop

    public static Object acceptUntilStop(SciStatementEnumeration enum, SciStatementVisitor visitor)

  Makes each `SciStatement` from the specified enumeration accept the specified visitor until the result of accepting is equal to the static variable `STOP`.
  Parameters:
    enum - `SciStatementEnumeration` of `SciStatement`s
    visitor - the `SciStatementVisitor` to perform desired actions
  Returns: `STOP` variable if `visitor`'s returned result is equal to the static variable `STOP`, `null` otherwise
  See Also:
    STOP

### acceptUntilStop

    public static Object acceptUntilStop(SciExpressionEnumeration enum, SciExpressionVisitor visitor)

  Makes each `SciExpression` from the specified enumeration accept the specified visitor until the result of accepting is equal to the static variable `STOP`.
  Parameters:
    enum - `SciExpressionEnumeration` of `SciExpression`s
    visitor - the `SciExpressionVisitor` to perform desired actions
  Returns: `STOP` variable if `visitor`'s returned result is equal to the static variable `STOP`, `null` otherwise
  See Also:
    STOP

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD