gnu.kawa.functions
Class ConstantFunction0

java.lang.Object
  extended by gnu.mapping.PropertySet
      extended by gnu.mapping.Procedure
          extended by gnu.mapping.Procedure0
              extended by gnu.kawa.functions.ConstantFunction0
All Implemented Interfaces:
CanInline, Named

public class ConstantFunction0
extends Procedure0
implements CanInline

A 0-argument function that returns a constant value. Used for false() and true() in XQuery.


Constructor Summary
ConstantFunction0(java.lang.String name, java.lang.Object value)
           
ConstantFunction0(java.lang.String name, QuoteExp constant)
           
 
Method Summary
 java.lang.Object apply0()
           
 Expression inline(ApplyExp exp, ExpWalker walker)
          Inline an application of this Procedure and return result.
 
Methods inherited from class gnu.mapping.Procedure0
apply1, apply2, apply3, apply4, applyN, numArgs
 
Methods inherited from class gnu.mapping.Procedure
apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getSetter, getSourceLocation, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString
 
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstantFunction0

public ConstantFunction0(java.lang.String name,
                         java.lang.Object value)

ConstantFunction0

public ConstantFunction0(java.lang.String name,
                         QuoteExp constant)
Method Detail

apply0

public java.lang.Object apply0()
Specified by:
apply0 in class Procedure0

inline

public Expression inline(ApplyExp exp,
                         ExpWalker walker)
Description copied from interface: CanInline
Inline an application of this Procedure and return result. Can return original expression.

Specified by:
inline in interface CanInline