# ExtensionContainer

interface ExtensionContainer(source)

Allows adding 'namespaced' DSL extensions to a target object.

## Functions

add
Link copied to clipboard
abstract fun add(name: String, extension: Any)
abstract fun <T> add(publicType: Class<T>, name: String, extension: T)
abstract fun <T> add(publicType: TypeOf<T>, name: String, extension: T)
Adds a new extension to this container.
configure
Link copied to clipboard
abstract fun <T> configure(type: Class<T>, action: Action<in T>)
abstract fun <T> configure(type: TypeOf<T>, action: Action<in T>)
Looks for the extension of the specified type and configures it with the supplied action.
abstract fun <T> configure(name: String, action: Action<in T>)
Looks for the extension with the specified name and configures it with the supplied action.
create
Link copied to clipboard
abstract fun <T> create(name: String, type: Class<T>, constructionArguments: Array<Any>): T
abstract fun <T> create(publicType: Class<T>, name: String, instanceType: Class<out T>, constructionArguments: Array<Any>): T
abstract fun <T> create(publicType: TypeOf<T>, name: String, instanceType: Class<out T>, constructionArguments: Array<Any>): T
Creates and adds a new extension to this container.
findByName
Link copied to clipboard
@Nullable
abstract fun findByName(name: String): @Nullable Any
Looks for the extension of a given name.
findByType
Link copied to clipboard
@Nullable
abstract fun <T> findByType(type: Class<T>): @Nullable T
@Nullable
abstract fun <T> findByType(type: TypeOf<T>): @Nullable T
Looks for the extension of a given type (useful to avoid casting).
getByName
Link copied to clipboard
abstract fun getByName(name: String): Any
Looks for the extension of a given name.
getByType
Link copied to clipboard
abstract fun <T> getByType(type: Class<T>): T
abstract fun <T> getByType(type: TypeOf<T>): T
Looks for the extension of a given type (useful to avoid casting).
getExtensionsSchema
Link copied to clipboard
abstract fun getExtensionsSchema(): ExtensionsSchema
Provides access to the schema of all known extensions.
getExtraProperties
Link copied to clipboard
abstract fun getExtraProperties(): ExtraPropertiesExtension
The extra properties extension in this extension container.