xtc.parser
Class ProductionOverride
java.lang.Object
xtc.tree.Node
xtc.parser.Production
xtc.parser.PartialProduction
xtc.parser.ProductionOverride
- All Implemented Interfaces:
- java.lang.Iterable<java.lang.Object>, Locatable
public class ProductionOverride
- extends PartialProduction
A production override. This class represents a modification that
replaces a production's alternatives. It can also specify new
attributes for a production. Either the attributes or the choice
may be null, in which case the original production's
attributes or choice, respectively, remain unmodified. If the
choice is not null, the isComplete flag
specifies whether the choice replaces the original production's
choice or only specific alternatives.
- Version:
- $Revision: 1.7 $
- Author:
- Robert Grimm
|
Field Summary |
boolean |
isComplete
The flag for whether the choice overrides the entire production
or only specific alternatives. |
| Methods inherited from class xtc.tree.Node |
add, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, get, getBoolean, getBooleanProperty, getGeneric, getList, getLocation, getName, getNode, getProperty, getString, getStringProperty, getTokenText, hasLocation, hasName, hasProperty, hasTraversal, hasVariable, indexOf, isAnnotation, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, properties, remove, removeProperty, set, setLocation, setLocation, setProperty, size, strip, toAnnotation, toList, toString, toToken, write |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
isComplete
public boolean isComplete
- The flag for whether the choice overrides the entire production
or only specific alternatives.
ProductionOverride
public ProductionOverride(java.util.List<Attribute> attributes,
java.lang.String dType,
NonTerminal name)
- Create a new production override.
- Parameters:
attributes - The attributes.dType - The declared type.name - The name.
ProductionOverride
public ProductionOverride(java.lang.String dType,
NonTerminal name,
OrderedChoice choice,
boolean isComplete)
- Create a new production override.
- Parameters:
dType - The declared type.name - The name.choice - The choice.isComplete - The completeness flag.
isOverride
public boolean isOverride()
- Description copied from class:
Production
- Determine whether this production is a
production override.
- Overrides:
isOverride in class Production
- Returns:
true if this production is a production
override.
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
Copyright © 2012. All Rights Reserved.