graphql.Assert.assertNotNull()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(245)

本文整理了Java中graphql.Assert.assertNotNull()方法的一些代码示例,展示了Assert.assertNotNull()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assert.assertNotNull()方法的具体详情如下:
包路径:graphql.Assert
类名称:Assert
方法名:assertNotNull

Assert.assertNotNull介绍

暂无

代码示例

代码示例来源:origin: graphql-java/graphql-java

/**
 * The producing code can provide a callback to know when the subscriber attaches
 *
 * @param subscriptionCallback the callback when some ones
 */
public SingleSubscriberPublisher(OnSubscriptionCallback subscriptionCallback) {
  this.subscriptionCallback = assertNotNull(subscriptionCallback);
}

代码示例来源:origin: graphql-java/graphql-java

private Builder putImpl(Object... kvs) {
  for (int i = 0; i < kvs.length; i = i + 2) {
    Object k = kvs[i];
    Object v = kvs[i + 1];
    map.put(assertNotNull(k), assertNotNull(v));
  }
  return this;
}

代码示例来源:origin: graphql-java/graphql-java

public Builder fields(List<GraphQLFieldDefinition> fieldDefinitions) {
  assertNotNull(fieldDefinitions, "fieldDefinitions can't be null");
  fieldDefinitions.forEach(this::field);
  return this;
}

代码示例来源:origin: graphql-java/graphql-java

private DataFetcherResult(T data, List<GraphQLError> errors, Object localContext) {
  this.data = data;
  this.errors = unmodifiableList(assertNotNull(errors));
  this.localContext = localContext;
}

代码示例来源:origin: graphql-java/graphql-java

private ExecutionPath(ExecutionPath parent, PathSegment segment) {
  this.parent = assertNotNull(parent, "Must provide a parent path");
  this.segment = assertNotNull(segment, "Must provide a sub path");
  pathList = toListImpl();
}

代码示例来源:origin: graphql-java/graphql-java

public Builder replaceChild(String key, int index, Node newChild) {
  assertNotNull(newChild);
  this.children.get(key).set(index, newChild);
  return this;
}

代码示例来源:origin: graphql-java/graphql-java

public GraphQL build() {
    assertNotNull(graphQLSchema, "graphQLSchema must be non null");
    return new GraphQL(this);
  }
}

代码示例来源:origin: graphql-java/graphql-java

private static boolean hasDataFetcherImpl(FieldCoordinates coords, Map<FieldCoordinates, DataFetcherFactory> dataFetcherMap, Map<String, DataFetcherFactory> systemDataFetcherMap) {
  assertNotNull(coords);
  DataFetcherFactory dataFetcherFactory = systemDataFetcherMap.get(coords.getFieldName());
  if (dataFetcherFactory == null) {
    dataFetcherFactory = dataFetcherMap.get(coords);
  }
  return dataFetcherFactory != null;
}

代码示例来源:origin: graphql-java/graphql-java

public Builder withDirective(GraphQLDirective directive) {
  assertNotNull(directive, "directive can't be null");
  directives.put(directive.getName(), directive);
  return this;
}

代码示例来源:origin: graphql-java/graphql-java

public Builder field(GraphQLFieldDefinition fieldDefinition) {
  assertNotNull(fieldDefinition, "fieldDefinition can't be null");
  this.fields.put(fieldDefinition.getName(), fieldDefinition);
  return this;
}

代码示例来源:origin: graphql-java/graphql-java

private GraphQL(GraphQLSchema graphQLSchema, ExecutionStrategy queryStrategy, ExecutionStrategy mutationStrategy, ExecutionStrategy subscriptionStrategy, ExecutionIdProvider idProvider, Instrumentation instrumentation, PreparsedDocumentProvider preparsedDocumentProvider) {
  this.graphQLSchema = assertNotNull(graphQLSchema, "graphQLSchema must be non null");
  this.queryStrategy = queryStrategy != null ? queryStrategy : new AsyncExecutionStrategy();
  this.mutationStrategy = mutationStrategy != null ? mutationStrategy : new AsyncSerialExecutionStrategy();
  this.subscriptionStrategy = subscriptionStrategy != null ? subscriptionStrategy : new SubscriptionExecutionStrategy();
  this.idProvider = assertNotNull(idProvider, "idProvider must be non null");
  this.instrumentation = checkInstrumentation(assertNotNull(instrumentation));
  this.preparsedDocumentProvider = assertNotNull(preparsedDocumentProvider, "preparsedDocumentProvider must be non null");
}

代码示例来源:origin: graphql-java/graphql-java

public GraphQLNonNull(GraphQLType wrappedType) {
  assertNotNull(wrappedType, "wrappedType can't be null");
  assertNonNullWrapping(wrappedType);
  this.wrappedType = wrappedType;
}

代码示例来源:origin: graphql-java/graphql-java

public TypeMismatchError(ExecutionPath path, GraphQLType expectedType) {
  this.path = assertNotNull(path).toList();
  this.expectedType = assertNotNull(expectedType);
  this.message = mkMessage(path, expectedType);
}

代码示例来源:origin: graphql-java/graphql-java

public Builder withDirectives(GraphQLDirective... directives) {
  assertNotNull(directives, "directives can't be null");
  for (GraphQLDirective directive : directives) {
    withDirective(directive);
  }
  return this;
}

代码示例来源:origin: graphql-java/graphql-java

public Builder withDirective(GraphQLDirective directive) {
  assertNotNull(directive, "directive can't be null");
  directives.put(directive.getName(), directive);
  return this;
}

代码示例来源:origin: graphql-java/graphql-java

public Builder field(GraphQLInputObjectField field) {
  assertNotNull(field, "field can't be null");
  fields.put(field.getName(), field);
  return this;
}

代码示例来源:origin: graphql-java/graphql-java

public Builder withDirective(GraphQLDirective directive) {
  assertNotNull(directive, "directive can't be null");
  directives.put(directive.getName(), directive);
  return this;
}

代码示例来源:origin: graphql-java/graphql-java

public Builder argument(GraphQLArgument argument) {
  Assert.assertNotNull(argument, "argument must not be null");
  arguments.put(argument.getName(), argument);
  return this;
}

代码示例来源:origin: graphql-java/graphql-java

public ListExecutionResultNode(FetchedValueAnalysis fetchedValueAnalysis,
                List<ExecutionResultNode> children) {
  super(fetchedValueAnalysis, ResultNodesUtil.newNullableException(fetchedValueAnalysis, children));
  this.children = Assert.assertNotNull(children);
  children.forEach(Assert::assertNotNull);
}

代码示例来源:origin: graphql-java/graphql-java

@Override
public void execute(final Runnable command) {
  final RunNode newNode = new RunNode(assertNotNull(command, "Runnable must not be null"));
  final RunNode prevLast = last.getAndSet(newNode);
  if (prevLast != null)
    prevLast.lazySet(newNode);
  else
    runAll(newNode);
}

相关文章