private void endCustomExpiry() {

    Declarable d = createDeclarable();
    if (!(d instanceof CustomExpiry)) {
      throw new CacheXmlException(
          String.format("A %s is not an instance of CustomExpiry",
              d.getClass().getName()));
    }
    stack.push(d);
  }
When a <code>cache-writer</code> element is finished, the {@link Parameter}s and class names
are popped off the stack. The cache writer is instantiated and initialized with the parameters,
if appropriate.
<p>
A cache-writer may be created in the context of region-attributes or dynamic-region-factory. In
the latter case, there may be a disk-dir on top of the stack, represented by a File object.
geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java