jcaas.script_nodes
Class AnnotationFunctions

java.lang.Object
  extended by jcaas.script_nodes.AnnotationFunctions
Direct Known Subclasses:
EvalFunctions

public class AnnotationFunctions
extends java.lang.Object

This class defines several functions which can be called in an annotation script.


Constructor Summary
AnnotationFunctions()
           
 
Method Summary
static void annotateLoops()
           
static NumericValue countInstructions(java.lang.String instruction)
          Gets the number of occurances a the named instruction in the current match.
static NumericValue pow(NumericValue x, NumericValue n)
          Given an integer x and integer n returns a new integer, x^n.
static void print(java.lang.Object s)
          Prints a given string to the standard out.
static void update(java.lang.String v, NumericValue value)
          Geiven a variable name, updates that variable in on the BlackBoard to have the given value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationFunctions

public AnnotationFunctions()
Method Detail

print

public static void print(java.lang.Object s)
Prints a given string to the standard out.

Parameters:
c - the context of the annotation script.
s - the string to print.

countInstructions

public static NumericValue countInstructions(java.lang.String instruction)
Gets the number of occurances a the named instruction in the current match.

Parameters:
c - the context of the annotation script.
instruction - the instruction to find occurances of.
Returns:
the number of occurances of the given instruction

pow

public static NumericValue pow(NumericValue x,
                               NumericValue n)
Given an integer x and integer n returns a new integer, x^n.

Parameters:
c - the context of the script.
x - the base.
n - the power.
Returns:
x^n

annotateLoops

public static void annotateLoops()

update

public static void update(java.lang.String v,
                          NumericValue value)
Geiven a variable name, updates that variable in on the BlackBoard to have the given value.

Parameters:
c - the context.
v - the name of the variable in the BlackBoard.
value - the value to assign the variable.