Package relaxngcc.builder

## Class ScopeInfo

- java.lang.Object
- - relaxngcc.builder.ScopeInfo

-     public final class ScopeInfo
      extends java.lang.Object

  information about a scope

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `ScopeInfo.Action` | User-defined code fragment.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `NGCCGrammar` | `_grammar` |
    `Scope` | `_scope` | Scope object to which this object is attached.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ScopeInfo​(NGCCGrammar g, Scope scope)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Alias` | `addAlias​(CDType type, java.lang.String name)` |
    `void` | `addNSURI​(java.lang.String nsuri)` |
    `void` | `addState​(State state)` |
    `void` | `appendHeaderSection​(java.lang.String c)` |
    `void` | `calcAFOLLOW()` | Computes the AFOLLOW set of this _scope
    `ScopeInfo.Action` | `createAction​(java.lang.String code)` | Creates a new Action object inside this _scope.
    `ScopeInfo.Action` | `createAction​(java.lang.StringBuffer code)` |
    `void` | `dump​(java.io.PrintStream strm)` |
    `void` | `dumpAutomaton​(java.io.File target)` | Writes the automaton by using GraphViz.
    `java.lang.String` | `getClassName()` |
    `Alias[]` | `getConstructorParams()` |
    `java.lang.String` | `getHeaderSection()` |
    `State` | `getInitialState()` |
    `java.lang.String` | `getNSStringConstant​(java.lang.String uri)` |
    `int` | `getStateCount()` |
    `java.util.Set` | `head()` | Computes the HEAD set of this _scope (that doesn't include EVERYTHING_ELSE token) and returns them in a new set.
    `void` | `head​(java.util.Set result)` | Computes the HEAD set of this _scope (that doesn't include EVERYTHING_ELSE token.) See `Head` for the definition.
    `boolean` | `isNullable()` |
    `boolean` | `isRoot()` | Returns true if this is the start pattern.
    `boolean` | `isUserDefinedField​(java.lang.String name)` |
    `java.util.Iterator` | `iterateAcceptableStates()` |
    `java.util.Iterator` | `iterateActions()` |
    `java.util.Iterator` | `iterateAliases()` | Iterate all the aliases.
    `java.util.Iterator` | `iterateAllStates()` |
    `java.util.Iterator` | `iterateNSURIConstants()` |
    `java.util.Iterator` | `iterateStatesHaving​(int alphabetTypes)` | Iterates states that have transitions with one of specified alphabets.
    `void` | `minimizeStates()` | Makes the automaton smaller.
    `void` | `setInitialState​(State s)` |
    `void` | `setNullable​(boolean v)` |
    `void` | `simplifyAutomaton()` |

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### _grammar

          public final NGCCGrammar _grammar

    - #### _scope

          public final Scope _scope

      Scope object to which this object is attached.

  - ### Constructor Detail

    - #### ScopeInfo

          public ScopeInfo​(NGCCGrammar g,
                           Scope scope)

  - ### Method Detail

    - #### iterateNSURIConstants

          public java.util.Iterator iterateNSURIConstants()

    - #### getInitialState

          public State getInitialState()

    - #### setInitialState

          public void setInitialState​(State s)

    - #### isNullable

          public boolean isNullable()

    - #### setNullable

          public void setNullable​(boolean v)

    - #### getStateCount

          public int getStateCount()

    - #### getClassName

          public java.lang.String getClassName()

    - #### getConstructorParams

          public Alias[] getConstructorParams()

    - #### minimizeStates

          public void minimizeStates()

      Makes the automaton smaller. In actuality, this method only removes unreachable states.

    - #### appendHeaderSection

          public void appendHeaderSection​(java.lang.String c)

    - #### getHeaderSection

          public java.lang.String getHeaderSection()

    - #### isUserDefinedField

          public boolean isUserDefinedField​(java.lang.String name)

    - #### iterateActions

          public java.util.Iterator iterateActions()

    - #### createAction

          public ScopeInfo.Action createAction​(java.lang.String code)

      Creates a new Action object inside this _scope.

    - #### createAction

          public ScopeInfo.Action createAction​(java.lang.StringBuffer code)

    - #### iterateAliases

          public final java.util.Iterator iterateAliases()

      Iterate all the aliases.

    - #### simplifyAutomaton

          public void simplifyAutomaton()

    - #### addNSURI

          public void addNSURI​(java.lang.String nsuri)

    - #### getNSStringConstant

          public java.lang.String getNSStringConstant​(java.lang.String uri)

    - #### iterateStatesHaving

          public java.util.Iterator iterateStatesHaving​(int alphabetTypes)

      Iterates states that have transitions with one of specified alphabets.

    - #### iterateAcceptableStates

          public java.util.Iterator iterateAcceptableStates()

    - #### iterateAllStates

          public java.util.Iterator iterateAllStates()

    - #### addState

          public void addState​(State state)

    - #### addAlias

          public Alias addAlias​(CDType type,
                                java.lang.String name)

    - #### isRoot

          public boolean isRoot()

      Returns true if this is the start pattern.

    - #### dump

          public void dump​(java.io.PrintStream strm)

    - #### dumpAutomaton

          public void dumpAutomaton​(java.io.File target)
                             throws java.io.IOException,
                                    java.lang.InterruptedException

      Writes the automaton by using GraphViz.
      Throws:
        `java.io.IOException`
        `java.lang.InterruptedException`

    - #### head

          public void head​(java.util.Set result)

      Computes the HEAD set of this _scope (that doesn't include EVERYTHING_ELSE token.) See `Head` for the definition.

    - #### head

          public java.util.Set head()

      Computes the HEAD set of this _scope (that doesn't include EVERYTHING_ELSE token) and returns them in a new set.

    - #### calcAFOLLOW

          public void calcAFOLLOW()

      Computes the AFOLLOW set of this _scope