protected PartialCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, String type, String variable) { super(tc, df, mustache, variable, type); // Use the name of the parent to get the name of the partial String file = tc.file(); int dotindex = file.lastIndexOf("."); extension = dotindex == -1 ? "" : file.substring(dotindex); int slashindex = file.lastIndexOf("/"); dir = file.substring(0, slashindex + 1); recrusionLimit = df.getRecursionLimit(); }
protected PartialCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, String type, String variable) { super(tc, df, mustache, variable, type); // Use the name of the parent to get the name of the partial String file = tc.file(); int dotindex = file.lastIndexOf("."); extension = dotindex == -1 ? "" : file.substring(dotindex); int slashindex = file.lastIndexOf("/"); dir = file.substring(0, slashindex + 1); recrusionLimit = df.getRecursionLimit(); }
protected PartialCode(TemplateContext tc, DefaultMustacheFactory df, Mustache mustache, String type, String variable) { super(tc, df, mustache, variable, type); // Use the name of the parent to get the name of the partial String file = tc.file(); int dotindex = file.lastIndexOf("."); extension = dotindex == -1 ? "" : file.substring(dotindex); int slashindex = file.lastIndexOf("/"); dir = file.substring(0, slashindex + 1); recrusionLimit = df.getRecursionLimit(); }