public class MatchRuleRegistry extends Object
| Modifier and Type | Field and Description |
|---|---|
private static HashMap<Class<? extends NodeLIRBuilder>,Map<Class<? extends Node>,List<MatchStatement>>> |
registry |
| Constructor and Description |
|---|
MatchRuleRegistry() |
| Modifier and Type | Method and Description |
|---|---|
static Map<Class<? extends Node>,List<MatchStatement>> |
createRules(Class<? extends NodeLIRBuilder> theClass) |
static Position[] |
findPositions(NodeClass<? extends Node> nodeClass,
String[] names)
Convert a list of field names into
Position objects that can
be used to read them during a match. |
static Map<Class<? extends Node>,List<MatchStatement>> |
lookup(Class<? extends NodeLIRBuilder> theClass)
Collect all the
MatchStatements defined by the superclass chain of theClass. |
private static final HashMap<Class<? extends NodeLIRBuilder>,Map<Class<? extends Node>,List<MatchStatement>>> registry
public MatchRuleRegistry()
public static Position[] findPositions(NodeClass<? extends Node> nodeClass, String[] names)
Position objects that can
be used to read them during a match. The names should already have been confirmed to exist in
the type.nodeClass - names - public static Map<Class<? extends Node>,List<MatchStatement>> lookup(Class<? extends NodeLIRBuilder> theClass)
MatchStatements defined by the superclass chain of theClass.theClass - MatchStatements applicable to theClass.public static Map<Class<? extends Node>,List<MatchStatement>> createRules(Class<? extends NodeLIRBuilder> theClass)