org.quattor.pan.template
Class FunctionMap
java.lang.Object
org.quattor.pan.template.FunctionMap
public class FunctionMap
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FunctionMap
public FunctionMap()
get
public FunctionDefinition get(String name)
- Return the function definition associated with the given name or null if
it doesn't exist. It will always return null if the argument is null.
- Parameters:
name - name of the function to retrieve
- Returns:
- FunctionDefinition associated with the given name or null if it
doesn't exist
put
public void put(String name,
Operation function,
Template template,
SourceRange sourceRange)
throws EvaluationException
- Define the given DML block as a function with the given name in this
context. Note that functions may not be redefined; attempting to do so
will throw an EvaluationException.
- Parameters:
name - name for the functionfunction - code for the function as a DML blocktemplate - template in which this function is defined (used for error
handling)sourceRange - location in the template where this function is defined (used
for error handling)
- Throws:
EvaluationException - if a function with the given name already exists
Copyright © 2011 Quattor. All Rights Reserved.