com.objectwave.sourceParser
Class ImportDefParser

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

public class ImportDefParser
extends PackageDefParser

This class happens to look exactly like package def, except it is for imports.

Author:
Dave Hoag

Constructor Summary
ImportDefParser()
           
 
Method Summary
 void finishParsing(java.lang.StringBuffer buf, java.lang.String[] identifier, java.io.Reader rdr)
          Finish parsing the import.
 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)
          Test routine.
 
Methods inherited from class com.objectwave.sourceParser.PackageDefParser
getDataObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportDefParser

public ImportDefParser()
Method Detail

finishParsing

public void finishParsing(java.lang.StringBuffer buf,
                          java.lang.String[] identifier,
                          java.io.Reader rdr)
                   throws java.io.IOException
Finish parsing the import. Go all of the way until the ';'.

Specified by:
finishParsing in interface ClassParser
Overrides:
finishParsing in class PackageDefParser
java.io.IOException

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. This is my area if the identifier = 'import'

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

main

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