|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.model.ClassAndInterfaceFinder
public class ClassAndInterfaceFinder
Class with getClassName method for finding the name of the first class or interface defined in a file
| Field Summary | |
|---|---|
private StreamTokenizer |
tokenizer
|
| 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. |
(package private) String |
getName(boolean interfaceOK)
Finds the the name of the first class or interface in this file, respecting the value of the interfaceOK flag. |
private void |
initialize(Reader r)
|
private boolean |
isClassOrInterfaceWord(int tt,
boolean interfaceOK)
returns true iff the token is "class" or we're at the end of the file |
private static boolean |
isEOF(int tt)
|
private boolean |
isPackageWord(int tt)
returns true iff the token is "package" or we're at the end of the file |
private static boolean |
isWord(int tt)
returns true iff the token is a word (as defined by StreamTokenizer) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private StreamTokenizer tokenizer
| Constructor Detail |
|---|
public ClassAndInterfaceFinder(Reader r)
public ClassAndInterfaceFinder(File f)
| Method Detail |
|---|
private void initialize(Reader r)
public String getClassOrInterfaceName()
public String getClassName()
String getName(boolean interfaceOK)
private static boolean isWord(int tt)
private static boolean isEOF(int tt)
private boolean isClassOrInterfaceWord(int tt,
boolean interfaceOK)
private boolean isPackageWord(int tt)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||