public final class HelperValidator extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
getFirstDeterminingEqualsCharPosition(String part) |
static void |
checkHash(Class<? extends Helper> helperClazz,
HelperDefinition definition,
int hashSize) |
static void |
checkHash(HelperDefinition definition,
BasicHelper helper) |
static void |
checkParams(Class<? extends Helper> helperClazz,
HelperDefinition definition,
int paramSize) |
static void |
checkType(Class<? extends Helper> helperClazz,
HelperDefinition definition,
MustacheTagType... allowedTypes) |
static MustacheException |
newValidationException(String msg,
Class<? extends Helper> helperClazz,
HelperDefinition definition) |
static Iterator<String> |
splitHelperName(String name,
Segment segment)
Extracts parts from an input string.
|
public static void checkParams(Class<? extends Helper> helperClazz, HelperDefinition definition, int paramSize)
helperClazz - definition - paramSize - MustacheException - If the helper expects more paramspublic static void checkType(Class<? extends Helper> helperClazz, HelperDefinition definition, MustacheTagType... allowedTypes)
helperClazz - definition - allowedTypes - MustacheException - If the helper tag type does not match any one of the
specified typespublic static void checkHash(Class<? extends Helper> helperClazz, HelperDefinition definition, int hashSize)
helperClazz - definition - hashSize - MustacheException - If the helper expects more hash entriespublic static void checkHash(HelperDefinition definition, BasicHelper helper)
definition - hashSize - checkHash(Class, HelperDefinition, int)@Internal public static Iterator<String> splitHelperName(String name, Segment segment)
name - segment - MustacheException - If a compilation problem occurspublic static int getFirstDeterminingEqualsCharPosition(String part)
part - -1 if no such char is foundpublic static MustacheException newValidationException(String msg, Class<? extends Helper> helperClazz, HelperDefinition definition)
Copyright © 2015. All rights reserved.