antlr.preprocessor
Class Rule

java.lang.Object
  |
  +--antlr.preprocessor.Rule

class Rule
extends Object


Field Summary
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 Summary
Rule(String n, String b, IndexedVector options, Grammar gr)
           
 
Method Summary
 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()
          Suppressed: Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name

block

protected String block

args

protected String args

returnValue

protected String returnValue

throwsSpec

protected String throwsSpec

initAction

protected String initAction

options

protected IndexedVector options

visibility

protected String visibility

enclosingGrammar

protected Grammar enclosingGrammar

bang

protected boolean bang
Constructor Detail

Rule

public Rule(String n,
            String b,
            IndexedVector options,
            Grammar gr)
Method Detail

getArgs

public String getArgs()

getBang

public boolean getBang()

getName

public String getName()

getReturnValue

public String getReturnValue()

getVisibility

public String getVisibility()

narrowerVisibility

public 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. You cannot narrow the vis. of a rule.


sameSignature

public 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...


setArgs

public void setArgs(String a)

setBang

public void setBang()

setEnclosingGrammar

public void setEnclosingGrammar(Grammar g)

setInitAction

public void setInitAction(String a)

setOptions

public void setOptions(IndexedVector options)

setReturnValue

public void setReturnValue(String ret)

setThrowsSpec

public void setThrowsSpec(String t)

setVisibility

public void setVisibility(String v)

toString

public String toString()
Description copied from class: Object
Suppressed: Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class Object
Returns:
a string representation of the object.


comments?