relaxngcc.grammar

## Class Scope

- java.lang.Object
- - relaxngcc.grammar.Pattern
  - - relaxngcc.grammar.Scope

Direct Known Subclasses:
  Grammar

    public class Scope
    extends Pattern

A pattern defined by a <define> and <start>. A start pattern is represented by `name==null`.

Author:
  Kohsuke Kawaguchi (kk@kohsuke.org)

### Field Summary

Fields
`java.lang.String` `name` Name of this pattern.

### Constructor Summary

Constructors
Constructor and Description
`Scope(ParserRuntime rt, java.lang.String name_)`

### Method Summary

Methods
`void` `append(Pattern pattern, java.lang.String method)` Incorporates the newly discovered <define>.
`void` `appendBody(java.lang.String code)`
`void` `appendImport(java.lang.String code)`
`java.lang.Object` `apply(PatternFunction f)`
`void` `clear()`
`java.lang.String` `getBody()`
`java.lang.String` `getImport()`
`NGCCDefineParam` `getParam()` NGCC parameters associated to this scope.
`int` `getParamCount()`
`Pattern` `getPattern()`
`void` `setParam(NGCCDefineParam p)`

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

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

### Field Detail

#### name

    public final java.lang.String name

Name of this pattern. Copied from the name attribute of the <define> element.

For the start pattern, this field is null.

### Constructor Detail

#### Scope

    public Scope(ParserRuntime rt,
         java.lang.String name_)

### Method Detail

#### setParam

    public void setParam(NGCCDefineParam p)

#### getParam

    public NGCCDefineParam getParam()

NGCC parameters associated to this scope.

#### getPattern

    public Pattern getPattern()

#### appendImport

    public void appendImport(java.lang.String code)

#### getImport

    public java.lang.String getImport()

#### appendBody

    public void appendBody(java.lang.String code)

#### getBody

    public java.lang.String getBody()

#### append

    public void append(Pattern pattern,
              java.lang.String method)

Incorporates the newly discovered <define>.

#### apply

    public java.lang.Object apply(PatternFunction f)

Specified by:
  `apply` in class `Pattern`

#### getParamCount

    public int getParamCount()

#### clear

    public void clear()