com.objectwave.sourceParser
Class VariableDefParser

java.lang.Object
  |
  +--com.objectwave.sourceParser.VariableDefParser
All Implemented Interfaces:
ClassParser

public class VariableDefParser
extends java.lang.Object
implements ClassParser

Parse source for a variable definition.


Constructor Summary
VariableDefParser()
           
 
Method Summary
 void finishParsing(java.lang.StringBuffer buf, java.lang.String[] identifier, java.io.Reader rdr)
          We've accepted ownership of parsing ths source code, now finish the job.
 ClassElement getDataObject()
          When we have finished parsing, the resulting ClassElement returned by getDataObject should represent our meta-model of that element.
 boolean isMyArea(java.lang.String identifier)
          When parsing source code we never know what ClassElement will be next, so we ask all possible class elements isMyArea(String) for one of them to say yes.
static void main(java.lang.String[] argv)
           
 void parseTheRest(java.lang.StringBuffer buf, java.io.Reader rdr)
          The buffer is used to contain the 'fullText' of the variable declaration.
 void parseTrailingComment(java.lang.StringBuffer buf, java.io.Reader rdr)
          The buffer is used to contain the 'fullText' of the variable declaration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableDefParser

public VariableDefParser()
Method Detail

finishParsing

public void finishParsing(java.lang.StringBuffer buf,
                          java.lang.String[] identifier,
                          java.io.Reader rdr)
                   throws java.io.IOException
Description copied from interface: ClassParser
We've accepted ownership of parsing ths source code, now finish the job.

Specified by:
finishParsing in interface ClassParser
java.io.IOException

getDataObject

public ClassElement getDataObject()
Description copied from interface: ClassParser
When we have finished parsing, the resulting ClassElement returned by getDataObject should represent our meta-model of that element.

Specified by:
getDataObject in interface ClassParser

isMyArea

public boolean isMyArea(java.lang.String identifier)
When parsing source code we never know what ClassElement will be next, so we ask all possible class elements isMyArea(String) for one of them to say yes. Once one of the parser acknowledges ownership, we hand off the parsing routine to that class parser.

Specified by:
isMyArea in interface ClassParser
See Also:
finishParsing(java.lang.StringBuffer, java.lang.String[], java.io.Reader)

main

public static void main(java.lang.String[] argv)

parseTheRest

public void parseTheRest(java.lang.StringBuffer buf,
                         java.io.Reader rdr)
                  throws java.io.IOException
The buffer is used to contain the 'fullText' of the variable declaration.

java.io.IOException

parseTrailingComment

public void parseTrailingComment(java.lang.StringBuffer buf,
                                 java.io.Reader rdr)
                          throws java.io.IOException
The buffer is used to contain the 'fullText' of the variable declaration.

java.io.IOException