Class ParserUtils
- java.lang.Object
-
- com.googlecode.cqengine.query.parser.common.ParserUtils
-
public class ParserUtils extends Object
- Author:
- niall.gallagher
-
-
Constructor Summary
Constructors Constructor Description ParserUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.antlr.v4.runtime.ParserRuleContext
getParentContextOfType(org.antlr.v4.runtime.ParserRuleContext currentContext, Class<?>... parentContextTypes)
Examines the parent rule contexts of the given context, and returns the first parent context which is assignable from (i.e.static void
validateAllQueriesParsed(int numQueriesEncountered, int numQueriesParsed)
static void
validateExpectedNumberOfChildQueries(int expected, int actual)
static void
validateObjectTypeParameter(Class<?> expectedType, String actualType)
-
-
-
Method Detail
-
getParentContextOfType
public static org.antlr.v4.runtime.ParserRuleContext getParentContextOfType(org.antlr.v4.runtime.ParserRuleContext currentContext, Class<?>... parentContextTypes)
Examines the parent rule contexts of the given context, and returns the first parent context which is assignable from (i.e. is a, or is a subclass of) one of the given context types.- Parameters:
currentContext
- The starting context whose parent contexts should be examinedparentContextTypes
- The types of parent context sought- Returns:
- The first parent context which is assignable from one of the given context types, or null if there is no such parent in the tree
-
validateObjectTypeParameter
public static void validateObjectTypeParameter(Class<?> expectedType, String actualType)
-
validateExpectedNumberOfChildQueries
public static void validateExpectedNumberOfChildQueries(int expected, int actual)
-
validateAllQueriesParsed
public static void validateAllQueriesParsed(int numQueriesEncountered, int numQueriesParsed)
-
-