org.jawk.jrt
Interface VariableManager

All Known Implementing Classes:
AVM

public interface VariableManager

The AWK Variable Manager. It provides getter/setter methods for global AWK variables. Its purpose is to expose a variable management interface to the JRT, even though the implementation is provided by the AWK script at script compile-time.

The getters/setters here do not access all special AWK variables, such as RSTART and ENVIRON. That's because these variables are not referred to within the JRT.

See Also:
JRT, AwkCompiler, AwkCompilerImpl

Method Summary
 void assignVariable(java.lang.String name, java.lang.Object value)
          Set the contents of a user-defined AWK variable.
 java.lang.Object getARGC()
          Retrieve the contents of the ARGC variable.
 java.lang.Object getARGV()
          Retrieve the contents of the ARGV variable.
 java.lang.Object getCONVFMT()
          Retrieve the contents of the CONVFMT variable.
 java.lang.Object getFS()
          Retrieve the contents of the FS variable.
 java.lang.Object getOFS()
          Retrieve the contents of the OFS variable.
 java.lang.Object getRS()
          Retrieve the contents of the RS variable.
 java.lang.Object getSUBSEP()
          Retrieve the contents of the SUBSEP variable.
 void incFNR()
          Increases the FNR variable by 1.
 void incNR()
          Increases the NR variable by 1.
 void resetFNR()
          Resets the FNR variable to 0.
 void setFILENAME(java.lang.String new_filename)
          Set the contents of the FILENAME variable.
 void setNF(java.lang.Integer new_nf)
          Set the contents of the NF variable.
 

Method Detail

getARGC

java.lang.Object getARGC()
Retrieve the contents of the ARGC variable.


getARGV

java.lang.Object getARGV()
Retrieve the contents of the ARGV variable.


getCONVFMT

java.lang.Object getCONVFMT()
Retrieve the contents of the CONVFMT variable.


getFS

java.lang.Object getFS()
Retrieve the contents of the FS variable.


getRS

java.lang.Object getRS()
Retrieve the contents of the RS variable.


getOFS

java.lang.Object getOFS()
Retrieve the contents of the OFS variable.


getSUBSEP

java.lang.Object getSUBSEP()
Retrieve the contents of the SUBSEP variable.


setFILENAME

void setFILENAME(java.lang.String new_filename)
Set the contents of the FILENAME variable.


setNF

void setNF(java.lang.Integer new_nf)
Set the contents of the NF variable.


incNR

void incNR()
Increases the NR variable by 1.


incFNR

void incFNR()
Increases the FNR variable by 1.


resetFNR

void resetFNR()
Resets the FNR variable to 0.


assignVariable

void assignVariable(java.lang.String name,
                    java.lang.Object value)
Set the contents of a user-defined AWK variable. Used when processing name=value command-line arguments (either via -v or via ARGV).

Parameters:
name - The AWK variable name.
value - The new contents of the variable.