Package 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
Modifier and Type
Field
Description
`final String`
`name`
Name of this pattern.

## Constructor Summary

Constructors
Constructor
Description
`Scope(ParserRuntime rt, String name_)`

## Method Summary

Modifier and Type
Method
Description
`void`
`append(Pattern pattern, String method)`
Incorporates the newly discovered <define>.
`void`
`appendBody(String code)`
`void`
`appendImport(String code)`
`Object`
`apply(PatternFunction f)`
`void`
`clear()`
`String`
`getBody()`
`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 Details

### name

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

For the start pattern, this field is null.

## Constructor Details

### Scope

public Scope(ParserRuntime rt, String name_)

## Method Details

### setParam

public void setParam(NGCCDefineParam p)

### getParam

public NGCCDefineParam getParam()
NGCC parameters associated to this scope.

### getPattern

public Pattern getPattern()

### appendImport

public void appendImport(String code)

### getImport

public String getImport()

### appendBody

public void appendBody(String code)

### getBody

public String getBody()

### append

public void append(Pattern pattern, String method)
Incorporates the newly discovered <define>.

### apply

public Object apply(PatternFunction f)

Specified by:
  `apply` in class `Pattern`

### getParamCount

public int getParamCount()

### clear

public void clear()