|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
public interface ExtensionContainer
Allows adding 'namespaced' DSL extensions to a target object.
Method Summary | |
---|---|
void
|
add(java.lang.String name, java.lang.Object extension)
Adding an extension of name 'foo' will: |
java.lang.Object
|
findByName(java.lang.String name)
Looks for the extension of a given name. |
java.lang.Object
|
findByType(java.lang.Class type)
Looks for the extension of a given type (useful to avoid casting). |
java.lang.Object
|
getByName(java.lang.String name)
Looks for the extension of a given name. |
java.lang.Object
|
getByType(java.lang.Class type)
Looks for the extension of a given type (useful to avoid casting). |
Method Detail |
---|
public void add(java.lang.String name, java.lang.Object extension)
name
- Will be used as a sort of namespace of properties/methods.extension
- Any object whose methods and properties will extend the target object
public java.lang.Object findByName(java.lang.String name)
name
- extension name
public java.lang.Object findByType(java.lang.Class type)
type
- extension type
public java.lang.Object getByName(java.lang.String name)
name
- extension name
public java.lang.Object getByType(java.lang.Class type)
type
- extension type
Groovy Documentation