Class Checks
java.lang.Object
org.hansken.plugin.extraction.runtime.grpc.common.Checks
Collection of functions for validation or conditional checking utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertIsNotMeta(String dataType) Assert that the givendataTypeis not'meta', else throw an exception.static booleanisMetaContext(DataContext context) Check if thisDataContextis a'meta'context, meaning there is no associated data to read.
-
Method Details
-
isMetaContext
Check if thisDataContextis a'meta'context, meaning there is no associated data to read.- Parameters:
context- the context to check- Returns:
trueif it is such a context, otherwisefalse
-
assertIsNotMeta
Assert that the givendataTypeis not'meta', else throw an exception.- Parameters:
dataType- the data type to check- Throws:
IllegalStateException- if the data type is'meta'
-