PostfixTemplate (@Nullable TreePath path) { if (path == null || !(path.getLastPathComponent() instanceof PostfixTemplateCheckedTreeNode)) { return null; } return ((PostfixTemplateCheckedTreeNode)path.getLastPathComponent()).getTemplate(); }