@Override public FunctionResponse getFunctionMeta( RpcController controller, GetFunctionMetaRequest request) { FunctionDescProto function = null; try { if (request.hasFunctionType()) { if (containFunction( request.getSignature(), request.getFunctionType(), request.getParameterTypesList())) { function = findFunction( request.getSignature(), request.getFunctionType(), request.getParameterTypesList(), true); } } else { function = findFunction(request.getSignature(), request.getParameterTypesList()); } if (function != null) { return FunctionResponse.newBuilder().setState(OK).setFunction(function).build(); } else { return FunctionResponse.newBuilder() .setState( errUndefinedFunction( buildSimpleFunctionSignature( request.getSignature(), request.getParameterTypesList()))) .build(); } } catch (Throwable t) { printStackTraceIfError(LOG, t); return FunctionResponse.newBuilder().setState(returnError(t)).build(); } }
public static FunctionSignature create(GetFunctionMetaRequest proto) { return new FunctionSignature( proto.getSignature(), proto.getFunctionType(), proto.getParameterTypesList()); }