Package com.sun.tools.txw2.model
Class Define
- java.lang.Object
-
- com.sun.tools.txw2.model.Leaf
-
- com.sun.tools.txw2.model.Node
-
- com.sun.tools.txw2.model.WriterNode
-
- com.sun.tools.txw2.model.Define
-
- All Implemented Interfaces:
java.lang.Iterable<Leaf>
,ParsedPattern
- Direct Known Subclasses:
Grammar
public class Define extends WriterNode
A named pattern.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
name
Grammar
scope
-
Fields inherited from class com.sun.tools.txw2.model.WriterNode
alternativeName
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isInline()
Returns true if this define only contains one child (and thus considered inlinable.) A pattern definition is also inlineable if it's the start of the grammar (because "start" isn't a meaningful name)java.lang.String
toString()
-
Methods inherited from class com.sun.tools.txw2.model.Node
addChild, hasOneChild, iterator
-
Methods inherited from class com.sun.tools.txw2.model.Leaf
createDataMethod, getNext, getPrev, merge, siblings
-
-
-
-
Field Detail
-
scope
public final Grammar scope
-
name
public final java.lang.String name
-
-
Constructor Detail
-
Define
public Define(Grammar scope, java.lang.String name)
-
-
Method Detail
-
isInline
public boolean isInline()
Returns true if this define only contains one child (and thus considered inlinable.) A pattern definition is also inlineable if it's the start of the grammar (because "start" isn't a meaningful name)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-