Top Inners Fields Constructors Methods
com.typesafe.config.impl

pack-priv Class SimpleIncluder

extends Object
implements FullIncluder
Class Inheritance
All Implemented Interfaces
com.typesafe.config.impl.FullIncluder, com.typesafe.config.ConfigIncluderClasspath, com.typesafe.config.ConfigIncluderURL, com.typesafe.config.ConfigIncluderFile, com.typesafe.config.ConfigIncluder
Imports
java.io.File, java.net.MalformedURLException, .URL, java.util.ArrayList, .List, com.typesafe.config.ConfigException, .ConfigFactory, .ConfigIncludeContext, .ConfigIncluder, .ConfigIncluderClasspath, .ConfigIncluderFile, .ConfigIncluderURL, .ConfigObject, .ConfigParseOptions, .ConfigParseable, .ConfigSyntax

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface
private static class
private static class

Field Summary

Modifier and TypeField and Description
private ConfigIncluder

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static ConfigParseOptions
pack-priv static ConfigObject
public ConfigObject
include(final ConfigIncludeContext
some info about the include context
context
,
String
the include statement's argument
name
)

Implements com.typesafe.config.ConfigIncluder.include.

Parses another item to be included.

public ConfigObject
includeFile(ConfigIncludeContext
some info about the include context
context
,
File
the include statement's argument
file
)

Implements com.typesafe.config.ConfigIncluderFile.includeFile.

Parses another item to be included.

pack-priv static ConfigObject
public ConfigObject
includeResources(ConfigIncludeContext
some info about the include context
context
,
String
the include statement's argument
resource
)

Implements com.typesafe.config.ConfigIncluderClasspath.includeResources.

Parses another item to be included.

pack-priv static ConfigObject
public ConfigObject
includeURL(ConfigIncludeContext
some info about the include context
context
,
URL
the include statement's argument
url
)

Implements com.typesafe.config.ConfigIncluderURL.includeURL.

Parses another item to be included.

pack-priv static ConfigObject
pack-priv static ConfigObject
pack-priv static FullIncluder
public ConfigIncluder
withFallback(ConfigIncluder
the previous includer for chaining
fallback
)

Implements com.typesafe.config.ConfigIncluder.withFallback.

Returns a new includer that falls back to the given includer.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fallbackback to summary
private ConfigIncluder fallback

Constructor Detail

SimpleIncluderback to summary
pack-priv SimpleIncluder(ConfigIncluder fallback)

Method Detail

clearForIncludeback to summary
pack-priv static ConfigParseOptions clearForInclude(ConfigParseOptions options)
fromBasenameback to summary
pack-priv static ConfigObject fromBasename(SimpleIncluder.NameSource source, String name, ConfigParseOptions options)
includeback to summary
public ConfigObject include(final ConfigIncludeContext context, String name)

Implements com.typesafe.config.ConfigIncluder.include.

Doc from com.typesafe.config.ConfigIncluder.include.

Parses another item to be included. The returned object typically would not have substitutions resolved. You can throw a ConfigException here to abort parsing, or return an empty object, but may not return null. This method is used for a "heuristic" include statement that does not specify file, URL, or classpath resource. If the include statement does specify, then the same class implementing ConfigIncluder must also implement ConfigIncluderClasspath, ConfigIncluderFile, or ConfigIncluderURL as needed, or a default includer will be used.

Parameters
context:ConfigIncludeContext

some info about the include context

name:String

the include statement's argument

Returns:ConfigObject

a non-null ConfigObject

Annotations
@Override
includeFileback to summary
public ConfigObject includeFile(ConfigIncludeContext context, File file)

Implements com.typesafe.config.ConfigIncluderFile.includeFile.

Doc from com.typesafe.config.ConfigIncluderFile.includeFile.

Parses another item to be included. The returned object typically would not have substitutions resolved. You can throw a ConfigException here to abort parsing, or return an empty object, but may not return null.

Parameters
context:ConfigIncludeContext

some info about the include context

file:File

the include statement's argument

Returns:ConfigObject

a non-null ConfigObject

Annotations
@Override
includeFileWithoutFallbackback to summary
pack-priv static ConfigObject includeFileWithoutFallback(final ConfigIncludeContext context, File file)
includeResourcesback to summary
public ConfigObject includeResources(ConfigIncludeContext context, String resource)

Implements com.typesafe.config.ConfigIncluderClasspath.includeResources.

Doc from com.typesafe.config.ConfigIncluderClasspath.includeResources.

Parses another item to be included. The returned object typically would not have substitutions resolved. You can throw a ConfigException here to abort parsing, or return an empty object, but may not return null.

Parameters
context:ConfigIncludeContext

some info about the include context

resource:String

the include statement's argument

Returns:ConfigObject

a non-null ConfigObject

Annotations
@Override
includeResourceWithoutFallbackback to summary
pack-priv static ConfigObject includeResourceWithoutFallback(final ConfigIncludeContext context, String resource)
includeURLback to summary
public ConfigObject includeURL(ConfigIncludeContext context, URL url)

Implements com.typesafe.config.ConfigIncluderURL.includeURL.

Doc from com.typesafe.config.ConfigIncluderURL.includeURL.

Parses another item to be included. The returned object typically would not have substitutions resolved. You can throw a ConfigException here to abort parsing, or return an empty object, but may not return null.

Parameters
context:ConfigIncludeContext

some info about the include context

url:URL

the include statement's argument

Returns:ConfigObject

a non-null ConfigObject

Annotations
@Override
includeURLWithoutFallbackback to summary
pack-priv static ConfigObject includeURLWithoutFallback(final ConfigIncludeContext context, URL url)
includeWithoutFallbackback to summary
pack-priv static ConfigObject includeWithoutFallback(final ConfigIncludeContext context, String name)
makeFullback to summary
pack-priv static FullIncluder makeFull(ConfigIncluder includer)
withFallbackback to summary
public ConfigIncluder withFallback(ConfigIncluder fallback)

Implements com.typesafe.config.ConfigIncluder.withFallback.

Doc from com.typesafe.config.ConfigIncluder.withFallback.

Returns a new includer that falls back to the given includer. This is how you can obtain the default includer; it will be provided as a fallback. It's up to your includer to chain to it if you want to. You might want to merge any files found by the fallback includer with any objects you load yourself. It's important to handle the case where you already have the fallback with a "return this", i.e. this method should not create a new object if the fallback is the same one you already have. The same fallback may be added repeatedly.

Parameters
fallback:ConfigIncluder

the previous includer for chaining

Returns:ConfigIncluder

a new includer

Annotations
@Override
com.typesafe.config.impl back to summary

pack-priv Interface SimpleIncluder.NameSource

Known Direct Implementers
com.typesafe.config.impl.SimpleIncluder.RelativeNameSource, com.typesafe.config.impl.ConfigImpl.FileNameSource, com.typesafe.config.impl.ConfigImpl.ClasspathNameSource, com.typesafe.config.impl.ConfigImpl.ClasspathNameSourceWithClass

Method Summary

Modifier and TypeMethod and Description
public ConfigParseable

Method Detail

nameToParseableback to summary
public ConfigParseable nameToParseable(String name, ConfigParseOptions parseOptions)
com.typesafe.config.impl back to summary

private Class SimpleIncluder.Proxy

extends Object
implements FullIncluder
Class Inheritance
All Implemented Interfaces
com.typesafe.config.impl.FullIncluder, com.typesafe.config.ConfigIncluderClasspath, com.typesafe.config.ConfigIncluderURL, com.typesafe.config.ConfigIncluderFile, com.typesafe.config.ConfigIncluder

Field Summary

Modifier and TypeField and Description
pack-priv final ConfigIncluder

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ConfigObject
include(ConfigIncludeContext
some info about the include context
context
,
String
the include statement's argument
what
)

Implements com.typesafe.config.ConfigIncluder.include.

Parses another item to be included.

public ConfigObject
includeFile(ConfigIncludeContext
some info about the include context
context
,
File
the include statement's argument
what
)

Implements com.typesafe.config.ConfigIncluderFile.includeFile.

Parses another item to be included.

public ConfigObject
includeResources(ConfigIncludeContext
some info about the include context
context
,
String
the include statement's argument
what
)

Implements com.typesafe.config.ConfigIncluderClasspath.includeResources.

Parses another item to be included.

public ConfigObject
includeURL(ConfigIncludeContext
some info about the include context
context
,
URL
the include statement's argument
what
)

Implements com.typesafe.config.ConfigIncluderURL.includeURL.

Parses another item to be included.

public ConfigIncluder
withFallback(ConfigIncluder
the previous includer for chaining
fallback
)

Implements com.typesafe.config.ConfigIncluder.withFallback.

Returns a new includer that falls back to the given includer.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
pack-priv final ConfigIncluder delegate

Constructor Detail

Proxyback to summary
pack-priv Proxy(ConfigIncluder delegate)

Method Detail

includeback to summary
public ConfigObject include(ConfigIncludeContext context, String what)

Implements com.typesafe.config.ConfigIncluder.include.

Doc from com.typesafe.config.ConfigIncluder.include.

Parses another item to be included. The returned object typically would not have substitutions resolved. You can throw a ConfigException here to abort parsing, or return an empty object, but may not return null. This method is used for a "heuristic" include statement that does not specify file, URL, or classpath resource. If the include statement does specify, then the same class implementing ConfigIncluder must also implement ConfigIncluderClasspath, ConfigIncluderFile, or ConfigIncluderURL as needed, or a default includer will be used.

Parameters
context:ConfigIncludeContext

some info about the include context

what:String

the include statement's argument

Returns:ConfigObject

a non-null ConfigObject

Annotations
@Override
includeFileback to summary
public ConfigObject includeFile(ConfigIncludeContext context, File what)

Implements com.typesafe.config.ConfigIncluderFile.includeFile.

Doc from com.typesafe.config.ConfigIncluderFile.includeFile.

Parses another item to be included. The returned object typically would not have substitutions resolved. You can throw a ConfigException here to abort parsing, or return an empty object, but may not return null.

Parameters
context:ConfigIncludeContext

some info about the include context

what:File

the include statement's argument

Returns:ConfigObject

a non-null ConfigObject

Annotations
@Override
includeResourcesback to summary
public ConfigObject includeResources(ConfigIncludeContext context, String what)

Implements com.typesafe.config.ConfigIncluderClasspath.includeResources.

Doc from com.typesafe.config.ConfigIncluderClasspath.includeResources.

Parses another item to be included. The returned object typically would not have substitutions resolved. You can throw a ConfigException here to abort parsing, or return an empty object, but may not return null.

Parameters
context:ConfigIncludeContext

some info about the include context

what:String

the include statement's argument

Returns:ConfigObject

a non-null ConfigObject

Annotations
@Override
includeURLback to summary
public ConfigObject includeURL(ConfigIncludeContext context, URL what)

Implements com.typesafe.config.ConfigIncluderURL.includeURL.

Doc from com.typesafe.config.ConfigIncluderURL.includeURL.

Parses another item to be included. The returned object typically would not have substitutions resolved. You can throw a ConfigException here to abort parsing, or return an empty object, but may not return null.

Parameters
context:ConfigIncludeContext

some info about the include context

what:URL

the include statement's argument

Returns:ConfigObject

a non-null ConfigObject

Annotations
@Override
withFallbackback to summary
public ConfigIncluder withFallback(ConfigIncluder fallback)

Implements com.typesafe.config.ConfigIncluder.withFallback.

Doc from com.typesafe.config.ConfigIncluder.withFallback.

Returns a new includer that falls back to the given includer. This is how you can obtain the default includer; it will be provided as a fallback. It's up to your includer to chain to it if you want to. You might want to merge any files found by the fallback includer with any objects you load yourself. It's important to handle the case where you already have the fallback with a "return this", i.e. this method should not create a new object if the fallback is the same one you already have. The same fallback may be added repeatedly.

Parameters
fallback:ConfigIncluder

the previous includer for chaining

Returns:ConfigIncluder

a new includer

Annotations
@Override
com.typesafe.config.impl back to summary

private Class SimpleIncluder.RelativeNameSource

extends Object
implements NameSource
Class Inheritance
All Implemented Interfaces
com.typesafe.config.impl.SimpleIncluder.NameSource

Field Summary

Modifier and TypeField and Description
private final ConfigIncludeContext

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ConfigParseable
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final ConfigIncludeContext context

Constructor Detail

RelativeNameSourceback to summary
pack-priv RelativeNameSource(ConfigIncludeContext context)

Method Detail

nameToParseableback to summary
public ConfigParseable nameToParseable(String name, ConfigParseOptions options)

Implements com.typesafe.config.impl.SimpleIncluder.NameSource.nameToParseable.

Annotations
@Override