com.objectwave.sourceParser
Class MethodDefParser

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

public class MethodDefParser
extends java.lang.Object
implements ClassParser

Used to parse java source code for methods.

Version:
$Id: MethodDefParser.java,v 2.1 2002/03/23 14:03:00 dave_hoag Exp $
Author:
Dave Hoag

Nested Class Summary
static class MethodDefParser.Test
           
 
Constructor Summary
MethodDefParser()
           
 
Method Summary
 void defineArguments(java.lang.StringBuffer buff, java.io.Reader rdr)
          Today the arguments simply define what type of objects this method is going to deal with.
 void finishParsing(java.lang.StringBuffer buf, java.lang.String[] identifier, java.io.Reader rdr)
          At the point this method is called, the parser has identified the method up to the opening '(' character.
 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.
 boolean settingIdentifier(java.lang.String str)
          While determining if this is the correct parser to use, we need to gather information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodDefParser

public MethodDefParser()
Method Detail

defineArguments

public void defineArguments(java.lang.StringBuffer buff,
                            java.io.Reader rdr)
                     throws java.io.IOException
Today the arguments simply define what type of objects this method is going to deal with.

Parameters:
buff -
rdr -
Throws:
java.io.IOException

finishParsing

public void finishParsing(java.lang.StringBuffer buf,
                          java.lang.String[] identifier,
                          java.io.Reader rdr)
                   throws java.io.IOException
At the point this method is called, the parser has identified the method up to the opening '(' character. This completes the parsing of the method.

Specified by:
finishParsing in interface ClassParser
Parameters:
buf -
identifier -
rdr -
Throws:
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
Returns:
The DataObject value

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
Parameters:
identifier -
Returns:
The MyArea value
See Also:
finishParsing(java.lang.StringBuffer, java.lang.String[], java.io.Reader)

settingIdentifier

public boolean settingIdentifier(java.lang.String str)
While determining if this is the correct parser to use, we need to gather information. This method is used to gather that information.

Parameters:
str -
Returns: