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

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

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

Arguments.mustNotBeCompatibleWithValue介绍

暂无

代码示例

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

Arguments.mustNotBeNull("clazz", clazz);
Arguments.mustBeCompatibleWithValue("clazz", clazz, Singleton.class);
Arguments.mustNotBeCompatibleWithValue("clazz", clazz, Externalizable.class);
Arguments.mustNotBeAbstract("clazz", clazz);
Constructor<?> constructor = null;

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

public CompoundSelectionImpl(
    XCriteriaBuilder criteriaBuilder,
    Class<? extends X> javaType,
    Iterable<Selection<?>> compoundSelectionItems) {
  super(criteriaBuilder);
  Arguments.mustNotBeNull("javaType", javaType);
  List<Selection<?>> list;
  if (compoundSelectionItems != null) {
    if (compoundSelectionItems instanceof Collection<?>) {
      list = new ArrayList<>(((Collection<?>)compoundSelectionItems).size());
    } else {
      list = new ArrayList<>();
    }
    int index = 0;
    for (Selection<?> selection : compoundSelectionItems) {
      if (selection != null) {
        Class<?> subJavaType = selection.getJavaType();
        Arguments.mustNotBeArray("compoundSelectionItems[" + index + ']', subJavaType);
        Arguments.mustNotBeCompatibleWithValue("compoundSelectionItems[" + index + ']', subJavaType, Tuple.class);
        this.mustUnderSameCriteriaBuilder("compoundSelectionItems[" + index + ']', selection);
        list.add(selection);
      }
      index++;
    }
  } else {
    list = MACollections.emptyList();
  }
  this.javaType = javaType;
  this.compoundSelectionItems = MACollections.unmodifiable(list);
}

相关文章