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

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

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

Arguments.mustNotBeEmpty介绍

暂无

代码示例

代码示例来源: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

public static Class<?> forName(String className) {
  Arguments.mustNotBeEmpty("className", Arguments.mustNotBeNull("className", className));
  if (className.charAt(0) == '[') {
    return Array.newInstance(forName(className.substring(1)), 0).getClass();
  }
  if (className.endsWith("[]")) {
    return Array.newInstance(forName(className.substring(0, className.length() - 2)), 0).getClass();
  }
  try {
    try {
      return Thread.currentThread().getContextClassLoader().loadClass(className);
    } catch (ClassNotFoundException ex) {
      return Class.forName(className);
    }
  } catch (ClassNotFoundException ex) {
    throw new NoSuchClassException(ex);
  }
}

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

public AnnualLeaveRequest(String name, Date startTime, Date endTime) {
  this.name = Arguments.mustNotBeEmpty(
      "name", 
      Arguments.mustNotBeNull("name", name)
  );
  this.state = AnnualLeaveRequestState.CREATED;
  this.modify(startTime, endTime);
}

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

@Override
public SimpleOrderPath.Builder get(String nodeName, GetterType getterType) {
  Arguments.mustNotBeEmpty("nodeName", Arguments.mustNotBeNull("nodeName", nodeName));
  Arguments.mustNotBeNull("getterType", getterType);
  Object[] arr = this.arr;
  int len = this.len;
  if (len + 2 > arr.length) {
    Object[] newArr = new Object[len << 1];
    System.arraycopy(arr, 0, newArr, 0, len);
    this.arr = arr = newArr;
  }
  arr[len] = nodeName;
  arr[len + 1] = getterType;
  this.len += 2;
  return this;
}

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

public static Class<?> forInternalName(String internalNameOrDescriptor) {
  Arguments.mustNotBeEmpty("internalName", Arguments.mustNotBeNull("internalName", internalNameOrDescriptor));
  if (internalNameOrDescriptor.charAt(0) == '[') {
    return Array.newInstance(forInternalName(internalNameOrDescriptor.substring(1)), 0).getClass();

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

protected final void init(String jpql, Collection<LiteralParameter> implictParameters) {
  Arguments.mustNotBeNull("jpql", jpql);
  Arguments.mustNotBeEmpty("jpql", jpql);
  this.jpql = jpql;
  if (implictParameters == null) {
  this.literalParameters = MACollections.emptySet();
  } else {
    this.literalParameters = MACollections.unmodifiable(implictParameters);
  }
}

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

@Override
public Builder get(
    String nodeName, 
    GetterType getterType,
    CollectionFetchType collectionFetchType) {
  Arguments.mustNotBeEmpty("nodeName", Arguments.mustNotBeNull("nodeName", nodeName));
  Arguments.mustNotBeNull("getterType", getterType);
  Arguments.mustNotBeNull("collectionFetchType", collectionFetchType);
  Object[] arr = this.arr;
  int len = this.len;
  if (len + 3 > arr.length) {
    Object[] newArr = new Object[len << 1];
    System.arraycopy(arr, 0, newArr, 0, len);
    this.arr = arr = newArr;
  }
  arr[len] = nodeName;
  arr[len + 1] = getterType;
  arr[len + 2] = collectionFetchType;
  this.len += 3;
  return this;
}

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

public void setName(String name) {
  Arguments.mustNotBeEmpty(
      "name", 
      Arguments.mustNotBeNull("name", name)
  );
  String oldName = this.name;
  if (Nulls.equals(oldName, name)) {
    return;
  }
  this.name = name;
  if (this.propertyChangedListener != null) {
    this.propertyChangedListener.propertyChanged(
        new PropertyChanagedEvent(this, "name", oldName, name)
    );
  }
}

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

private void validateParts(ComparatorPart[] parts) {
  Arguments.mustNotContainNullElements(
      "parts", 
      Arguments.mustNotBeEmpty(
          "parts", 
          Arguments.mustNotBeNull("parts", parts)
      )
  );
  for (int i = parts.length - 1; i >= 0; i--) {
    Arguments.mustBetweenValue(
        "parts[" + i + "]scalarPropertyId", 
        parts[i].getScalarPropertyId(), 
        0, 
        true, 
        this.propertyArray.length, 
        false
    );
  }
}

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

Arguments.mustNotBeNull("entityType", entityType);
Arguments.mustNotBeNull("attributes", attributes);
Arguments.mustNotBeEmpty("attributes", attributes);
ModelClass modelClass = JPAModelClass.of(entityType);
Set<Integer> propertyIdSet = new LinkedHashSet<>();

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

Arguments.mustNotBeNull("entityType", entityType);
Arguments.mustNotBeNull("attributes", attributes);
Arguments.mustNotBeEmpty("attributes", attributes);
ModelClass modelClass = JPAModelClass.of(entityType);
Set<Integer> propertyIdSet = new LinkedHashSet<>();

相关文章