org.basex.query
Class StaticDecl

java.lang.Object
  extended by org.basex.data.ExprInfo
      extended by org.basex.query.StaticScope
          extended by org.basex.query.StaticDecl
All Implemented Interfaces:
Scope
Direct Known Subclasses:
StaticFunc, StaticVar

public abstract class StaticDecl
extends StaticScope

Common superclass for static functions and variables.

Author:
BaseX Team 2005-12, BSD License, Leo Woerteler

Field Summary
 Ann ann
          Annotations.
 SeqType declType
          Declared type, null if not specified.
protected  boolean dontEnter
          Flag that is set during compilation and execution and prevents infinite loops.
 QNm name
          This declaration's name.
 StaticContext sc
          Static context of this declaration.
 
Fields inherited from class org.basex.query.StaticScope
compiled, expr, info, scope
 
Constructor Summary
StaticDecl(StaticContext sctx, Ann a, QNm nm, SeqType t, VarScope scp, java.lang.String xqdoc, InputInfo ii)
          Constructor.
 
Method Summary
abstract  byte[] id()
          Returns a unique identifier for this declaration.
 SeqType type()
          Returns the type of this expression.
 
Methods inherited from class org.basex.query.StaticScope
compiled, doc
 
Methods inherited from class org.basex.data.ExprInfo
addPlan, addPlan, description, info, plan, planAttr, planElem, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.basex.query.Scope
compile, visit
 

Field Detail

sc

public final StaticContext sc
Static context of this declaration.


ann

public final Ann ann
Annotations.


name

public final QNm name
This declaration's name.


declType

public final SeqType declType
Declared type, null if not specified.


dontEnter

protected boolean dontEnter
Flag that is set during compilation and execution and prevents infinite loops.

Constructor Detail

StaticDecl

public StaticDecl(StaticContext sctx,
                  Ann a,
                  QNm nm,
                  SeqType t,
                  VarScope scp,
                  java.lang.String xqdoc,
                  InputInfo ii)
Constructor.

Parameters:
sctx - static context
a - annotations
nm - name
t - declared return type
scp - variable scope
xqdoc - documentation
ii - input info
Method Detail

id

public abstract byte[] id()
Returns a unique identifier for this declaration.

Returns:
a byte sequence that uniquely identifies this declaration

type

public SeqType type()
Returns the type of this expression. If no type has been declare in the expression, it is derived from the expression type.

Returns:
return type