org.jikesrvm.adaptive.util
Class CompilerAdviceInfoReader

java.lang.Object
  extended by org.jikesrvm.adaptive.util.CompilerAdviceInfoReader

 class CompilerAdviceInfoReader
extends Object

Utility to read compiler advice annotations from file in ascii format. Takes a single argument: the name of the file containing the ascii annotations. Each line of the file corresponds to an annotation for one method and has the following format:

     
 
Where the types and meanings of the fields is as follows:

See Also:
CompilerAdvice, CompilerAdviceAttribute

Constructor Summary
CompilerAdviceInfoReader()
           
 
Method Summary
static List<CompilerAdviceAttribute> readCompilerAdviceFile(String file)
          Read annotations from a specified file.
private static CompilerAdviceAttribute readOneAttribute(StringTokenizer st)
          Actual reading is done here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompilerAdviceInfoReader

CompilerAdviceInfoReader()
Method Detail

readCompilerAdviceFile

public static List<CompilerAdviceAttribute> readCompilerAdviceFile(String file)
Read annotations from a specified file. Reads all annotations at once and returns a collection of compiler advice attributes.

Parameters:
file - The annotation file to be read
Returns:
A list of compiler advice attributes

readOneAttribute

private static CompilerAdviceAttribute readOneAttribute(StringTokenizer st)
Actual reading is done here. This method reads one attribute from a single line of an input stream. There are six elements per line corresponding to each call site. First three are strings, class name, method name, method signature, followed by one number, compiler advice.

Parameters:
st - an input stream
Returns:
an compileration advice atribute