|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Util.ParseUtil
public abstract class ParseUtil
ParseUtil
implements simple parsers for common string
data types. Input is from named resource files.
Nested Class Summary | |
---|---|
static class |
ParseUtil.BadLineException
Exception thrown by the methods in ParseUtil
to indicate an unparsable line in an input file. |
static interface |
ParseUtil.StringParser
Callback interface for the resource parsing routines. |
Constructor Summary | |
---|---|
ParseUtil()
|
Method Summary | |
---|---|
static HClass |
parseClass(Linker l,
String className)
Parse a string as a class name. |
static HField |
parseField(Linker l,
String fieldName)
Parse a string as a field name. |
static HMethod |
parseMethod(Linker l,
String methodName)
Parse a string as a method name + descriptor string. |
static void |
parseSet(String s,
ParseUtil.StringParser sp)
Parse a string as a set. |
static void |
readResource(String resourceName,
ParseUtil.StringParser sp)
Reads from the given resource, ignoring '#' comments and blank lines, obeying 'include' directives, and invoking the given StringParser on any other lines. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParseUtil()
Method Detail |
---|
public static void readResource(String resourceName, ParseUtil.StringParser sp) throws IOException
StringParser
on any other lines.
IOException
public static HClass parseClass(Linker l, String className) throws ParseUtil.BadLineException
ParseUtil.BadLineException
public static HField parseField(Linker l, String fieldName) throws ParseUtil.BadLineException
ParseUtil.BadLineException
public static HMethod parseMethod(Linker l, String methodName) throws ParseUtil.BadLineException
ParseUtil.BadLineException
public static void parseSet(String s, ParseUtil.StringParser sp) throws ParseUtil.BadLineException
StringParser
is invoked
on each element in the set.
ParseUtil.BadLineException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |