org.wildfly.common.Assert.checkNotNullParamWithNullPointerException()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(214)

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

Assert.checkNotNullParamWithNullPointerException介绍

[英]Check that the named parameter is not null, using a NullPointerException as some specifications require. Use a standard exception message if it is.
[中]根据某些规范的要求,使用NullPointerException检查命名参数是否为null。如果是,请使用标准异常消息。

代码示例

代码示例来源:origin: wildfly/wildfly

public Object getResource(final Object key) throws NullPointerException {
  Assert.checkNotNullParamWithNullPointerException("key", key);
  return resources.get(key);
}

代码示例来源:origin: wildfly/wildfly

public void putResource(final Object key, final Object value) throws NullPointerException {
  Assert.checkNotNullParamWithNullPointerException("key", key);
  if (value == null) resources.remove(key); else resources.put(key, value);
}

代码示例来源:origin: wildfly/wildfly

public Object putResourceIfAbsent(final Object key, final Object value) throws IllegalArgumentException {
  Assert.checkNotNullParamWithNullPointerException("key", key);
  return value == null ? resources.get(key) : resources.putIfAbsent(key, value);
}

代码示例来源:origin: wildfly/wildfly

public Object putResourceIfAbsent(final Object key, final Object value) throws IllegalArgumentException {
  return owner.getProvider().putResourceIfAbsent(transaction, Assert.checkNotNullParamWithNullPointerException("key", key), value);
}

代码示例来源:origin: wildfly/wildfly

public Object getResource(final Object key) throws NullPointerException {
  return owner.getProvider().getResource(transaction, Assert.checkNotNullParamWithNullPointerException("key", key));
}

代码示例来源:origin: wildfly/wildfly

public void putResource(final Object key, final Object value) throws NullPointerException {
  owner.getProvider().putResource(transaction, Assert.checkNotNullParamWithNullPointerException("key", key), value);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public Object getResource(final Object key) throws NullPointerException {
  Assert.checkNotNullParamWithNullPointerException("key", key);
  return resources.get(key);
}

代码示例来源:origin: org.wildfly.transaction/wildfly-transaction-client

public Object getResource(final Object key) throws NullPointerException {
  Assert.checkNotNullParamWithNullPointerException("key", key);
  return resources.get(key);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public void putResource(final Object key, final Object value) throws NullPointerException {
  Assert.checkNotNullParamWithNullPointerException("key", key);
  if (value == null) resources.remove(key); else resources.put(key, value);
}

代码示例来源:origin: org.wildfly.transaction/wildfly-transaction-client

public void putResource(final Object key, final Object value) throws NullPointerException {
  Assert.checkNotNullParamWithNullPointerException("key", key);
  if (value == null) resources.remove(key); else resources.put(key, value);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public Object putResourceIfAbsent(final Object key, final Object value) throws IllegalArgumentException {
  Assert.checkNotNullParamWithNullPointerException("key", key);
  return value == null ? resources.get(key) : resources.putIfAbsent(key, value);
}

代码示例来源:origin: org.wildfly.transaction/wildfly-transaction-client

public Object putResourceIfAbsent(final Object key, final Object value) throws IllegalArgumentException {
  Assert.checkNotNullParamWithNullPointerException("key", key);
  return value == null ? resources.get(key) : resources.putIfAbsent(key, value);
}

代码示例来源:origin: org.wildfly.transaction/wildfly-transaction-client

public Object putResourceIfAbsent(final Object key, final Object value) throws IllegalArgumentException {
  return owner.getProvider().putResourceIfAbsent(transaction, Assert.checkNotNullParamWithNullPointerException("key", key), value);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public Object putResourceIfAbsent(final Object key, final Object value) throws IllegalArgumentException {
  return owner.getProvider().putResourceIfAbsent(transaction, Assert.checkNotNullParamWithNullPointerException("key", key), value);
}

代码示例来源:origin: org.wildfly.transaction/wildfly-transaction-client

public Object getResource(final Object key) throws NullPointerException {
  return owner.getProvider().getResource(transaction, Assert.checkNotNullParamWithNullPointerException("key", key));
}

代码示例来源:origin: org.wildfly.transaction/wildfly-transaction-client

public void putResource(final Object key, final Object value) throws NullPointerException {
  owner.getProvider().putResource(transaction, Assert.checkNotNullParamWithNullPointerException("key", key), value);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public Object getResource(final Object key) throws NullPointerException {
  return owner.getProvider().getResource(transaction, Assert.checkNotNullParamWithNullPointerException("key", key));
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public void putResource(final Object key, final Object value) throws NullPointerException {
  owner.getProvider().putResource(transaction, Assert.checkNotNullParamWithNullPointerException("key", key), value);
}

相关文章