Package relaxngcc.datatype

# Class Macro

java.lang.Object
relaxngcc.datatype.Macro

public class Macro extends Object
A string with some free variables

Author:
  Kohsuke Kawaguchi (kk@kohsuke.org)

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`Macro.Variable`
Variable.

## Constructor Summary

Constructors
Constructor
Description
`Macro()`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(String str)`
Adds a new literal string to the token list.
`void`
`add(Macro.Variable tkn)`
Adds a new macro to the token list.
`String`
`toString(Map dictionary)`
Expands all the variables with a given dictionary

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

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

## Constructor Details

### Macro

public Macro()

## Method Details

### add

public void add(String str)
Adds a new literal string to the token list.

### add

public void add(Macro.Variable tkn)
Adds a new macro to the token list.

### toString

public String toString(Map dictionary) throws NoDefinitionException
Expands all the variables with a given dictionary

Parameters:
  `String` - to string dictionary.
Throws:
  `NoDefinitionException` - thrown when there's a variable whose definition is not given by the specified dictionary.