edu.rice.cs.drjava.model
Class ClassAndInterfaceFinder

java.lang.Object
  extended by edu.rice.cs.drjava.model.ClassAndInterfaceFinder

public class ClassAndInterfaceFinder
extends Object

Class with getClassName method for finding the name of the first class or interface defined in a file


Constructor Summary
ClassAndInterfaceFinder(File f)
           
ClassAndInterfaceFinder(Reader r)
           
 
Method Summary
 String getClassName()
          Finds the the name of the first class (excluding interfaces) defined in this file.
 String getClassOrInterfaceName()
          Finds the the name of the first class or interface defined in this file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassAndInterfaceFinder

public ClassAndInterfaceFinder(Reader r)

ClassAndInterfaceFinder

public ClassAndInterfaceFinder(File f)
Method Detail

getClassOrInterfaceName

public String getClassOrInterfaceName()
Finds the the name of the first class or interface defined in this file.

Returns:
the String containing this name or "" if no such class or interface is found.

getClassName

public String getClassName()
Finds the the name of the first class (excluding interfaces) defined in this file.

Returns:
the String containing this name or "" if no such class or interface is found.