class Rule extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
args |
protected boolean |
bang |
protected String |
block |
protected Grammar |
enclosingGrammar |
protected String |
initAction |
protected String |
name |
protected IndexedVector |
options |
protected String |
returnValue |
protected String |
throwsSpec |
protected String |
visibility |
Constructor and Description |
---|
Rule(String n,
String b,
IndexedVector options,
Grammar gr) |
Modifier and Type | Method and Description |
---|---|
String |
getArgs() |
boolean |
getBang() |
String |
getName() |
String |
getReturnValue() |
String |
getVisibility() |
boolean |
narrowerVisibility(Rule rule)
If 'rule' narrows the visible of 'this', return true;
For example, 'this' is public and 'rule' is private,
true is returned.
|
boolean |
sameSignature(Rule rule)
Two rules have the same signature if they have:
same name
same return value
same args
I do a simple string compare now, but later
the type could be pulled out so it is insensitive
to names of args etc...
|
void |
setArgs(String a) |
void |
setBang() |
void |
setEnclosingGrammar(Grammar g) |
void |
setInitAction(String a) |
void |
setOptions(IndexedVector options) |
void |
setReturnValue(String ret) |
void |
setThrowsSpec(String t) |
void |
setVisibility(String v) |
String |
toString() |
protected String name
protected String block
protected String args
protected String returnValue
protected String throwsSpec
protected String initAction
protected IndexedVector options
protected String visibility
protected Grammar enclosingGrammar
protected boolean bang
public Rule(String n, String b, IndexedVector options, Grammar gr)
public String getArgs()
public boolean getBang()
public String getName()
public String getReturnValue()
public String getVisibility()
public boolean narrowerVisibility(Rule rule)
public boolean sameSignature(Rule rule)
public void setArgs(String a)
public void setBang()
public void setEnclosingGrammar(Grammar g)
public void setInitAction(String a)
public void setOptions(IndexedVector options)
public void setReturnValue(String ret)
public void setThrowsSpec(String t)
public void setVisibility(String v)