org.apache.flink.api.java.typeutils.TypeExtractionUtils.LambdaExecutable Java Examples

The following examples show how to use org.apache.flink.api.java.typeutils.TypeExtractionUtils.LambdaExecutable. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TypeExtractor.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
private static void validateInputContainsExecutable(LambdaExecutable exec, TypeInformation<?> typeInfo) {
	List<Method> methods = getAllDeclaredMethods(typeInfo.getTypeClass());
	for (Method method : methods) {
		if (exec.executablesEquals(method)) {
			return;
		}
	}
	Constructor<?>[] constructors = typeInfo.getTypeClass().getDeclaredConstructors();
	for (Constructor<?> constructor : constructors) {
		if (exec.executablesEquals(constructor)) {
			return;
		}
	}
	throw new InvalidTypesException("Type contains no executable '" + exec.getName() + "'.");
}
 
Example #2
Source File: TypeExtractor.java    From flink with Apache License 2.0 5 votes vote down vote up
private static void validateInputContainsExecutable(LambdaExecutable exec, TypeInformation<?> typeInfo) {
	List<Method> methods = getAllDeclaredMethods(typeInfo.getTypeClass());
	for (Method method : methods) {
		if (exec.executablesEquals(method)) {
			return;
		}
	}
	Constructor<?>[] constructors = typeInfo.getTypeClass().getDeclaredConstructors();
	for (Constructor<?> constructor : constructors) {
		if (exec.executablesEquals(constructor)) {
			return;
		}
	}
	throw new InvalidTypesException("Type contains no executable '" + exec.getName() + "'.");
}
 
Example #3
Source File: TypeExtractor.java    From flink with Apache License 2.0 5 votes vote down vote up
private static void validateInputContainsExecutable(LambdaExecutable exec, TypeInformation<?> typeInfo) {
	List<Method> methods = getAllDeclaredMethods(typeInfo.getTypeClass());
	for (Method method : methods) {
		if (exec.executablesEquals(method)) {
			return;
		}
	}
	Constructor<?>[] constructors = typeInfo.getTypeClass().getDeclaredConstructors();
	for (Constructor<?> constructor : constructors) {
		if (exec.executablesEquals(constructor)) {
			return;
		}
	}
	throw new InvalidTypesException("Type contains no executable '" + exec.getName() + "'.");
}