org.apache.isis.core.commons.ensure.Assert.assertFalse()方法的使用及代码示例

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

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

Assert.assertFalse介绍

暂无

代码示例

代码示例来源:origin: org.apache.isis.core/commons

public static void assertFalse(final boolean flag) {
  assertFalse("expected false", flag);
}

代码示例来源:origin: org.apache.isis.runtimes.dflt.objectstores/xml

private void writeAssociationField(final StringBuffer xml, final String field, final Object entry) {
  Assert.assertFalse(((SerialOid) entry).isTransient());
  xml.append("  <association field=\"" + field + "\" ");
  xml.append("ref=\"" + encodedOid((SerialOid) entry) + "\"/>\n");
}

代码示例来源:origin: org.apache.isis.runtimes.dflt/runtime

@Override
public void resolveImmediately(final ObjectAdapter adapter) {
  // synchronize on the current session because getting race
  // conditions, I think between different UI threads when running
  // with DnD viewer + in-memory object store +
  // cglib bytecode enhancement
  synchronized (getAuthenticationSession()) {
    final ResolveState resolveState = adapter.getResolveState();
    if (!resolveState.canChangeTo(ResolveState.RESOLVING)) {
      return;
    }
    Assert.assertFalse("only resolve object that is not yet resolved", adapter, resolveState.isResolved());
    Assert.assertTrue("only resolve object that is persistent", adapter, adapter.isPersistent());
    resolveImmediatelyFromPersistenceLayer(adapter);
    if (LOG.isDebugEnabled()) {
      // don't log object - its toString() may use the unresolved
      // field, or unresolved collection
      LOG.debug("resolved: " + adapter.getSpecification().getShortIdentifier() + " " + resolveState.code() + " " + adapter.getOid());
    }
  }
}

代码示例来源:origin: org.apache.isis.core/isis-core-runtime

Assert.assertFalse("POJO Map already contains object", pojo, pojoAdapterMap.containsPojo(pojo));

代码示例来源:origin: org.apache.isis.runtimes.dflt/runtime

private ObjectAdapter mapAndInjectServices(final ObjectAdapter adapter) {
  Assert.assertNotNull(adapter);
  final Object pojo = adapter.getObject();
  Assert.assertFalse("POJO Map already contains object", pojo, getPojoAdapterMap().containsPojo(pojo));

相关文章