chord.project
Class ChordAnnotParser

java.lang.Object
  extended by chord.project.ChordAnnotParser

public class ChordAnnotParser
extends java.lang.Object

Parser for Chord annotations on classes defining program analyses. The annotation specifies aspects of the analysis such as its name, its consumed and produced targets, etc.

Author:
Mayur Naik (mhn@cs.stanford.edu)

Constructor Summary
ChordAnnotParser(java.lang.Class type)
          Constructor.
 
Method Summary
 java.util.List<java.lang.String> getConsumes()
          Provides the names of data targets specified by this Chord annotation as consumed by the associated analysis.
 java.util.List<java.lang.String> getControls()
          Provides the names of control targets specified by this Chord annotation as produced by the associated analysis.
 java.lang.String getName()
          Provides the name specified by this Chord annotation of the associated analysis.
 java.util.Map<java.lang.String,RelSign> getNameToSignMap()
          Provides a partial map specified by this Chord annotation from names of program relation targets consumed/produced by the associated analysis to their signatures.
 java.util.Map<java.lang.String,java.lang.Class> getNameToTypeMap()
          Provides a partial map specified by this Chord annotation from names of data targets consumed/produced by the associated analysis to their types.
 java.lang.String getPrescriber()
          Provides the name of the control target specified by this Chord annotation as prescribing the associated analysis.
 java.util.List<java.lang.String> getProduces()
          Provides the names of data targets specified by this Chord annotation as produced by the associated analysis.
 boolean parse()
          Parses this Chord annotation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChordAnnotParser

public ChordAnnotParser(java.lang.Class type)
Constructor.

Parameters:
type - A class annotated with a Chord annotation.
Method Detail

parse

public boolean parse()
Parses this Chord annotation.

Returns:
true iff the Chord annotation parses successfully.

getName

public java.lang.String getName()
Provides the name specified by this Chord annotation of the associated analysis.

Returns:
The name specified by this Chord annotation of the associated analysis.

getPrescriber

public java.lang.String getPrescriber()
Provides the name of the control target specified by this Chord annotation as prescribing the associated analysis.

Returns:
The name of the control target specified by this Chord annotation as prescribing the associated analysis.

getConsumes

public java.util.List<java.lang.String> getConsumes()
Provides the names of data targets specified by this Chord annotation as consumed by the associated analysis.

Returns:
The names of data targets specified by this Chord annotation as consumed by the associated analysis.

getProduces

public java.util.List<java.lang.String> getProduces()
Provides the names of data targets specified by this Chord annotation as produced by the associated analysis.

Returns:
The names of data targets specified by this Chord annotation as produced by the associated analysis.

getControls

public java.util.List<java.lang.String> getControls()
Provides the names of control targets specified by this Chord annotation as produced by the associated analysis.

Returns:
The names of control targets specified by this Chord annotation as produced by the associated analysis.

getNameToSignMap

public java.util.Map<java.lang.String,RelSign> getNameToSignMap()
Provides a partial map specified by this Chord annotation from names of program relation targets consumed/produced by the associated analysis to their signatures.

Returns:
A partial map specified by this Chord annotation from names of program relation targets consumed/produced by the associated analysis to their signatures.

getNameToTypeMap

public java.util.Map<java.lang.String,java.lang.Class> getNameToTypeMap()
Provides a partial map specified by this Chord annotation from names of data targets consumed/produced by the associated analysis to their types.

Returns:
A partial map specified by this Chord annotation from names of data targets consumed/produced by the associated analysis to their types.