org.babyfish.lang.Arguments.mustNotBeNull()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(118)

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

Arguments.mustNotBeNull介绍

暂无

代码示例

代码示例来源:origin: babyfish-ct/babyfish

@SuppressWarnings({ "unchecked", "rawtypes" })
protected KeySetImpl(AbstractXMap<K, V> parentMap) {
  super((BaseEntries)parentMap.baseEntries);
  this.parentMap = Arguments.mustNotBeNull("parentMap", parentMap);
}

代码示例来源:origin: babyfish-ct/babyfish

protected AbstractEntryImpl(
    AbstractMAMap<K, V> parentMap, 
    BaseEntry<K, V> baseEntry) throws NoEntryException {
  super (baseEntry);
  this.parentMap = Arguments.mustNotBeNull("parentMap", parentMap);
}

代码示例来源:origin: babyfish-ct/babyfish

public boolean contains(PropertyVersion version) {
    if (version == PropertyVersion.DETACH) {
      return this != ATTACH;
    } else if (version == PropertyVersion.ATTACH) {
      return this != DETACH;
    }
    Arguments.mustNotBeNull("version", version);
    return false;
  }
}

代码示例来源:origin: babyfish-ct/babyfish

public T getValue(PropertyVersion version) {
  switch (Arguments.mustNotBeNull("version", version)) {
  case DETACH:
    return this.detachedValue;
  case ATTACH:
    return this.attachedValue;
  default:
    throw new AssertionError("Internal bug");
  }
}

代码示例来源:origin: babyfish-ct/babyfish

public Object getValue(PropertyVersion version) {
  switch (Arguments.mustNotBeNull("version", version)) {
  case DETACH:
    return this.detachedValue;
  case ATTACH:
    return this.attachedValue;
  default:
    throw new AssertionError("Internal bug");
  }
}

代码示例来源:origin: babyfish-ct/babyfish

public E getElement(PropertyVersion version) {
  switch (Arguments.mustNotBeNull("version", version)) {
  case DETACH:
    return this.detachedElement;
  case ATTACH:
    return this.attachedElement;
  default:
    throw new AssertionError("Internal bug");
  }
}

代码示例来源:origin: babyfish-ct/babyfish

public AsExpression(XCriteriaBuilder criteriaBuilder, Expression<?> expression, Class<T> javaType) {
  super(criteriaBuilder);
  this.expression = Arguments.mustNotBeNull("expression", expression);
  this.javaType = Arguments.mustNotBeNull("javaType", javaType);
  this.mustUnderSameCriteriaBuilder("expression", expression);
}

代码示例来源:origin: babyfish-ct/babyfish

public WhenClause(C condition, Expression<? extends R> result) {
  this.condition = Arguments.mustNotBeNull("condition", condition);
  this.result = Arguments.mustNotBeInstanceOfAnyOfValue(
      "result", 
      Arguments.mustNotBeNull("result", result), 
      ParameterExpression.class,
      LiteralExpression.class);
}

代码示例来源:origin: babyfish-ct/babyfish

protected AbstractFunction(
    XCriteriaBuilder criteriaBuilder, 
    String functionName, 
    Collection<Expression<?>> argumentExpressions) {
  super(criteriaBuilder);
  Arguments.mustNotBeNull("functionName", functionName);
  Arguments.mustNotBeNull("argumentExpressions", argumentExpressions);
  this.functionName = functionName;
  this.initArgumentExpressions(
      argumentExpressions.toArray(
          new Expression[argumentExpressions.size()]));
}

代码示例来源:origin: babyfish-ct/babyfish

private UncheckedException(Throwable cause) {
  super(
      Arguments.mustNotBeInstanceOfAnyOfValue(
          "cause", 
          Arguments.mustNotBeNull("cause", cause), 
          RuntimeException.class, 
          Error.class
      )
  );
}

代码示例来源:origin: babyfish-ct/babyfish

public ExistsPredicate(XCriteriaBuilder criteriaBuilder, Subquery<?> subquery) {
  super(criteriaBuilder);
  Arguments.mustNotBeNull("subquery", subquery);
  this.mustUnderSameCriteriaBuilder("subquery", subquery);
  this.subquery = subquery;
}

代码示例来源:origin: babyfish-ct/babyfish

protected CriteriaQueryImpl(
    XCriteriaBuilder criteriaBuilder, 
    Class<T> resultType) {
  super(criteriaBuilder);
  this.queryStructure = new QueryStructure<T>(
      this, 
      Arguments.mustNotBeNull("resultType", resultType));
}

代码示例来源:origin: babyfish-ct/babyfish

public IsEmptyPredicate(XCriteriaBuilder criteriaBuilder, PluralAttributePath<C> collection) {
  super(criteriaBuilder);
  Arguments.mustNotBeNull("collection", collection);
  this.mustUnderSameCriteriaBuilder("collection", collection);
  this.collection = collection;
}

代码示例来源:origin: babyfish-ct/babyfish

@SuppressWarnings("unchecked")
public static <T> Validator<T> instanceOf(Class<? extends T> restrictionType) {
  return (Validator<T>)InstanceOfImpl.of(
      Arguments.mustNotBeNull("restrictionType", restrictionType)
  );
}

代码示例来源:origin: babyfish-ct/babyfish

public MACollectionProperties(JPAModelProperty modelProperty, Properties properties) {
  this.modelProperty = Arguments.mustNotBeNull("modelProperty", modelProperty);
  if (properties != null) {
    this.putAll(properties);
  }
}

代码示例来源:origin: babyfish-ct/babyfish

@Override
public SimpleCase<C, R> when(C condition, Expression<? extends R> result) {
  this.checkState();
  Arguments.mustNotBeNull("condition", condition);
  Arguments.mustNotBeNull("result", result);
  this.mustUnderSameCriteriaBuilder("result", result);
  this.whenClauses.add(new WhenClause<C, R>(condition, result));
  return this;
}

代码示例来源:origin: babyfish-ct/babyfish

public ObjectModelMergeEventListener(Iterable<MergeEventListener> listeners) {
  Arguments.mustNotContainSpecialElements(
      "listeners", 
      Arguments.mustNotBeEmpty("listeners", Arguments.mustNotBeNull("listeners", listeners)), 
      ObjectModelMergeEventListener.class
  );
  List<MergeEventListener> list = new ArrayList<>();
  for (MergeEventListener listener : listeners) {
    list.add(listener);
  }
  this.listeners = list.toArray(new MergeEventListener[list.size()]);
}

代码示例来源:origin: babyfish-ct/babyfish

@Override
public <V> DependencyPredicateBuilder<S, T> excludeAll(SingularAttribute<? super T, V> valueAttribute, Iterable<V> values) {
  this.excludeImpl(Arguments.mustNotBeNull("valueAttribute", valueAttribute), orderedSet(values));
  return this;
}

代码示例来源:origin: babyfish-ct/babyfish

protected ClassEnhancer(Class<?> clazz) {
  Arguments.mustNotBeNull("clazz", clazz);
  Arguments.mustBeClass("clazz", clazz);
  Arguments.mustNotBeFinal("clazz", clazz);
  this.clazz = clazz;
}

代码示例来源:origin: babyfish-ct/babyfish

protected SubListImpl(AbstractMAList<E> parentList, int fromIndex, int toIndex) {
  super(Arguments.mustNotBeNull("parentList", parentList).baseElements);
  this.parentList = parentList;
  Arguments.indexMustBeGreaterThanOrEqualToValue("fromIndex", fromIndex, 0);
  Arguments.indexMustBeLessThanOrEqualToValue("fromIndex", fromIndex, parentList.size());
  Arguments.indexMustBeLessThanOrEqualToOther("fromIndex", fromIndex, "toIndex", toIndex);
  this.headHide = parentList.headHide() + fromIndex;
  this.tailHide =  this.baseElements.allSize() - parentList.headHide() - toIndex;
  this.expectedModCount = this.baseElements.modCount();
}

相关文章