scale.test
Class AnnotationFile

java.lang.Object
  extended by scale.test.AnnotationFile

public class AnnotationFile
extends java.lang.Object

This class reads Annotations from a file.

$Id: AnnotationFile.java,v 1.18 2007-10-04 19:58:39 burrill Exp $

Copyright 2008 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

Each annotation in the file has the following form:

   annotation-class declaration-class declaration-name parameter parameter ... ;
 
Annotations may span multiple lines and more than one annotation can be on a single line.

The example annotation:

   scale.clef.PureFunctionAnnotation scale.clef.decl.RoutineDecl my_sqrt PURE ;
 
applies the PureFunctionAnnotation to the my_sqrt routine declaration with parameter "PURE" as with
   scale.clef.PureFunctionAnnotation.create(my_sqrt_decl, creator, support, "PURE");
 


Field Summary
protected  Creator creator
          The creator of the annotations is "user".
static int FOUND
          Announce added annotations.
static int NOERRORS
          Do not announce errors.
static int NORMAL
          Warn about errors only.
static int NOTFOUND
          Announce un-added annotations.
protected  Support support
          User belief is true.
 
Constructor Summary
AnnotationFile(int warningLevel)
           
 
Method Summary
protected  void processAnnotationFile(Suite suite, java.lang.String aFile)
          Apply the annotations in a file to the declarations in the Suite.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

creator

protected Creator creator
The creator of the annotations is "user".


support

protected Support support
User belief is true.


NORMAL

public static final int NORMAL
Warn about errors only.

See Also:
Constant Field Values

FOUND

public static final int FOUND
Announce added annotations.

See Also:
Constant Field Values

NOTFOUND

public static final int NOTFOUND
Announce un-added annotations.

See Also:
Constant Field Values

NOERRORS

public static final int NOERRORS
Do not announce errors.

See Also:
Constant Field Values
Constructor Detail

AnnotationFile

public AnnotationFile(int warningLevel)
Method Detail

processAnnotationFile

protected void processAnnotationFile(Suite suite,
                                     java.lang.String aFile)
Apply the annotations in a file to the declarations in the Suite.

Parameters:
suite - is queried for the declarations
aFile - is the pathname of the annotation file