BeforeAfterMetaData (@Nullable PostfixTemplate template) { if (template == null) return EMPTY_METADATA; if (template instanceof PostfixTemplateWrapper) { return new PostfixTemplateWrapperMetaData((PostfixTemplateWrapper)template); } if (template instanceof EditablePostfixTemplate && !template.isBuiltin()) { return new EditablePostfixTemplateMetaData((EditablePostfixTemplate)template); } return new PostfixTemplateMetaData(template); }