    001/**
    002 *   Copyright (C) 2011-2012 Typesafe Inc. <http://typesafe.com>
    003 */
    004package com.typesafe.config;
    005
    006import java.io.File;
    007
    008/**
    009 * Implement this <em>in addition to</em> {@link ConfigIncluder} if you want to
    010 * support inclusion of files with the {@code include file("filename")} syntax.
    011 * If you do not implement this but do implement {@link ConfigIncluder},
    012 * attempts to load files will use the default includer.
    013 */
    014public interface ConfigIncluderFile {
    015    /**
    016     * Parses another item to be included. The returned object typically would
    017     * not have substitutions resolved. You can throw a ConfigException here to
    018     * abort parsing, or return an empty object, but may not return null.
    019     *
    020     * @param context
    021     *            some info about the include context
    022     * @param what
    023     *            the include statement's argument
    024     * @return a non-null ConfigObject
    025     */
    026    ConfigObject includeFile(ConfigIncludeContext context, File what);
    027}