public Function exportFunction(String name) throws NotFunctionException {
Object func = get(name, false);
if (func instanceof MethodDeclare) {
return new Function(this.template, (MethodDeclare) func, this.encoding, this.isByteStream);
}
throw new NotFunctionException(func);
}