org.webmacro.engine
Class UndefinedMacro

java.lang.Object
  extended byorg.webmacro.engine.UndefinedMacro
All Implemented Interfaces:
Macro, Visitable

public final class UndefinedMacro
extends java.lang.Object
implements Macro, Visitable

Looks like a Macro, but really it's an undefined variable.


Method Summary
 void accept(TemplateVisitor v)
           
 java.lang.Object evaluate(Context context)
          Returns the wrapped object, context is ignored.
 java.lang.Object get(java.lang.Object key)
           
static UndefinedMacro getInstance()
           
 java.lang.String toString()
           
 void write(FastWriter out, Context context)
          Throws an exception -- cannot write an undefined
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static UndefinedMacro getInstance()

toString

public final java.lang.String toString()

accept

public void accept(TemplateVisitor v)
Specified by:
accept in interface Visitable

evaluate

public final java.lang.Object evaluate(Context context)
Returns the wrapped object, context is ignored.

Specified by:
evaluate in interface Macro

get

public java.lang.Object get(java.lang.Object key)

write

public final void write(FastWriter out,
                        Context context)
                 throws PropertyException
Throws an exception -- cannot write an undefined

Specified by:
write in interface Macro
Throws:
PropertyException - if required data was missing from context