/** * Set the current writer. * * @param out - current writer */ public Context setOut(Writer out) { checkThread(); this.out = out; return this; }
/** * Set the current output stream. * * @param out - current output stream */ public Context setOut(OutputStream out) { checkThread(); this.out = out; return this; }
/** * Get the parent context. * * @return parent context * @see #getContext() */ public Context getParent() { checkThread(); return parent; }
/** * Get the current engine. * * @return current engine * @see #getContext() */ public Engine getEngine() { checkThread(); return engine; }
/** * Get the context level. * * @return context level * @see #getContext() */ public int getLevel() { checkThread(); return level; }
/** * Get the current out. * * @return current out * @see #getContext() */ public Object getOut() { checkThread(); return out; }
/** * Get the context level. * * @see #getContext() * @return context level */ public int getLevel() { checkThread(); return level; }
/** * Get the current out. * * @see #getContext() * @return current out */ public Object getOut() { checkThread(); return out; }
/** * Set the current writer. * * @param out - current writer */ public Context setOut(Writer out) { checkThread(); this.out = out; return this; }
/** * Get the current template. * * @return current template * @see #getContext() */ public Template getTemplate() { checkThread(); return template; }
/** * Set the current output stream. * * @param out - current output stream */ public Context setOut(OutputStream out) { checkThread(); this.out = out; return this; }
@SuppressWarnings("unchecked") public Set<String> keySet() { checkThread(); return current == null ? Collections.EMPTY_SET : current.keySet(); }
@SuppressWarnings("unchecked") public Set<String> keySet() { checkThread(); return current == null ? Collections.EMPTY_SET : current.keySet(); }
@SuppressWarnings("unchecked") public Collection<Object> values() { checkThread(); return current == null ? Collections.EMPTY_SET : current.values(); }
@SuppressWarnings("unchecked") public Set<Map.Entry<String, Object>> entrySet() { checkThread(); return current == null ? Collections.EMPTY_SET : current.entrySet(); }
public void clear() { checkThread(); if (current != null) { current.clear(); } }
public void clear() { checkThread(); if (current != null) { current.clear(); } }
public Object put(String key, Object value) { checkThread(); if (current == null) { current = new HashMap<String, Object>(); } return current.put(key, value); }
/** * Set the current template. * * @param template - current template */ public Context setTemplate(Template template) { checkThread(); if (template != null) { setEngine(template.getEngine()); } this.template = template; return this; }
/** * Set the current template. * * @param template - current template */ public Context setTemplate(Template template) { checkThread(); this.template = template; if (template != null) { setEngine(template.getEngine()); } return this; }