Class Checks
- java.lang.Object
-
- org.hansken.plugin.extraction.runtime.grpc.common.Checks
-
public final class Checks extends Object
Collection of functions for validation or conditional checking utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
isMetaContext
public static boolean isMetaContext(DataContext context)
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
public static void assertIsNotMeta(String dataType)
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'
-
-