|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antlr.BaseAST | +--antlr.CommonAST | +--antlr.CommonASTWithHiddenTokens | +--com.octagroup.foregej.antlr.BaseAST | +--com.octagroup.foregej.java.lang.JavaAST
Field Summary | |
protected JavaRecognizer |
javaRecognizer_
the java recognizer used to parse data |
Fields inherited from class com.octagroup.foregej.antlr.BaseAST |
astFactory_, WRAP_PREF_NO, WRAP_PREF_NONE, WRAP_PREF_OK |
Fields inherited from class antlr.CommonASTWithHiddenTokens |
hiddenAfter, hiddenBefore |
Fields inherited from class antlr.BaseAST |
down, right |
Constructor Summary | |
JavaAST()
|
Method Summary | |
java.util.List |
getCommentsAfter()
Returns all the comments after this node. |
java.util.List |
getCommentsBefore()
Returns all the comments before this node. |
TOK_JAVA_COMMENT |
getJavadoc()
Returns the javadoc associated with this JavaAST. |
AST_JAVADOC |
getJavadocAst()
Returns the javadoc AST associated with this JavaAST. |
boolean |
hasCommentsAfter()
Returns true if this node has any comments attached after it. |
boolean |
hasCommentsBefore()
Returns true if this node has any comments attached before it. |
void |
initialize(antlr.collections.AST ast)
Adds functionality when initializing an AST from another ast. |
void |
setJavadoc(TOK_JAVA_COMMENT javadoc)
Sets the javadoc asociated with this AST. |
void |
setJavadocAst(AST_JAVADOC javadoc)
Sets the javadoc asociated with this AST. |
void |
setupRecognizer(java.lang.String s)
Sets up the recognized so that it parses the supplied string. |
void |
setupRecognizer(java.lang.String fileName,
java.io.Reader source)
Sets up the recognizer so that it parses the supplied source. |
void |
stealCommentsFromFirstChild(java.lang.Class type)
This method steals comments from the first child. |
void |
stealJavadocFromFirstChild()
This method steals the javadoc from the first child. |
java.lang.String |
toString()
Returns a string representation of the AST. |
Methods inherited from class com.octagroup.foregej.antlr.BaseAST |
deepCopy, deepCopy, equals, equals, getChildAST, getChildASTs, getChildASTsExcluding, getParentAst, getWrappingPreference, insertAfter, insertFirst, replaceAST, setASTFactory, setFirstChild, setFirstChildForced, setHiddenAfter, setHiddenBefore, setNextSibling, setNextSiblingForced, setParentAst, setType, toString, write |
Methods inherited from class antlr.CommonASTWithHiddenTokens |
getHiddenAfter, getHiddenBefore, initialize |
Methods inherited from class antlr.CommonAST |
getText, getType, initialize, setText |
Methods inherited from class antlr.BaseAST |
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, removeChildren, setVerboseStringConversion, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected JavaRecognizer javaRecognizer_
Constructor Detail |
public JavaAST()
Method Detail |
public void initialize(antlr.collections.AST ast)
This is done by the DynASTFactory when it discovers that an AST instance is not of the correct class.
initialize
in class antlr.CommonAST
ast
- public TOK_JAVA_COMMENT getJavadoc()
public void setJavadoc(TOK_JAVA_COMMENT javadoc)
javadoc
- the javadoc to set.public AST_JAVADOC getJavadocAst()
This method fetches the javadoc token an returns the ast from that token. If there is no javadok token associated with this ast or we failed to parse the javadoc null will be returned.
public void setJavadocAst(AST_JAVADOC javadoc)
If there is a javadoc token associated with this ast it will be replaced.
javadoc
- the javadoc to set.public java.util.List getCommentsBefore()
public java.util.List getCommentsAfter()
public boolean hasCommentsBefore()
public boolean hasCommentsAfter()
public void stealCommentsFromFirstChild(java.lang.Class type)
This metod is normally invoked from an abstract AST that combines some other asts. ie CompilationUnit or AST_METHOD_DEF
type
- public void stealJavadocFromFirstChild()
public void setupRecognizer(java.lang.String s)
s
- the string to parsepublic void setupRecognizer(java.lang.String fileName, java.io.Reader source)
fileName
- the name of the source.source
- the source to parse.public java.lang.String toString()
toString
in class BaseAST
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |