Allows adding 'namespaced' DSL extensions to a target object.
| Type | Name and description |
|---|---|
void |
add(String name, Object extension)Adding an extension of name 'foo' will: |
void |
configure(Class<T> type, Action<? super T> action)Looks for the extension of the specified type and configures it with the supplied action. |
T |
create(String name, Class<T> type, Object... constructionArguments)Adds a new extension to this container, that itself is dynamically made ExtensionAware. |
Object |
findByName(String name)Looks for the extension of a given name. |
T |
findByType(Class<T> type)Looks for the extension of a given type (useful to avoid casting). |
Object |
getByName(String name)Looks for the extension of a given name. |
T |
getByType(Class<T> type)Looks for the extension of a given type (useful to avoid casting). |
ExtraPropertiesExtension |
getExtraProperties()The extra properties extension in this extension container. |
Adding an extension of name 'foo' will:
name - Will be used as a sort of namespace of properties/methods.extension - Any object whose methods and properties will extend the target objectLooks for the extension of the specified type and configures it with the supplied action.
type - extension typeaction - the configure action Adds a new extension to this container, that itself is dynamically made ExtensionAware.
A new instance of the given type will be created using the given constructionArguments. The new
instance will have been dynamically which means that you can cast the object to ExtensionAware.
name - The name for the extensiontype - The type of the extensionconstructionArguments - The arguments to be used to construct the extension instanceLooks for the extension of a given name. If none found null is returned.
name - extension nameLooks for the extension of a given type (useful to avoid casting). If none found null is returned.
type - extension typeLooks for the extension of a given name. If none found it will throw an exception.
name - extension nameLooks for the extension of a given type (useful to avoid casting). If none found it will throw an exception.
type - extension typeThe extra properties extension in this extension container. This extension is always present in the container, with the name “ext”.