Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.query.util
Class Variables

    java.lang.Object
      org.basex.query.ExprInfo
          org.basex.query.util.Variables

    public final class Variables

extends ExprInfo

Variables.

Author:
  Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen

Constructor Summary
`Variables()`

Method Summary
`void` | `add(Var v)` Indexes a local variable.
`void` | `addGlobal(Var v)` Indexes a global variable.
`void` | `comp(QueryContext ctx)` Compiles the variables.
`Var` | `get(Var var)` Finds the specified variable.
`Vars` | `getGlobal()` Returns the global variables.
`void` | `plan(Serializer ser)` Recursively sends the abstract syntax of this expression to the specified serializer.
`void` | `reset(int s)` Resets the number of local variables.
`int` | `size()` Returns the current number of local variables.
`String` | `toString()`

Methods inherited from class org.basex.query.ExprInfo
`color, info, name`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Variables

    public Variables()

Method Detail

### addGlobal

    public void addGlobal(Var v)

  Indexes a global variable.

  Parameters:
    `v` - variable

### getGlobal

    public Vars getGlobal()

  Returns the global variables.

  Returns:
    global variables

### add

    public void add(Var v)

  Indexes a local variable.

  Parameters:
    `v` - variable

### get

    public Var get(Var var)

  Finds the specified variable.

  Parameters:
    `var` - variable
  Returns:
    variable

### size

    public int size()

  Returns the current number of local variables.

  Returns:
    number of variables

### reset

    public void reset(int s)

  Resets the number of local variables.

  Parameters:
    `s` - number of variables to be set

### comp

    public void comp(QueryContext ctx)
              throws QueryException

  Compiles the variables.

  Parameters:
    `ctx` - query context
  Throws:
    `QueryException` - query exception

### toString

    public String toString()

  Specified by:
    `toString` in class `ExprInfo`

### plan

    public void plan(Serializer ser)
              throws IOException

  Description copied from class: `ExprInfo`
  Recursively sends the abstract syntax of this expression to the specified serializer.

  Specified by:
    `plan` in class `ExprInfo`
  Parameters:
    `ser` - serializer
  Throws:
    `IOException` - I/O exception

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD