get By Name
Looks for the extension of a given name and casts it to the expected type T.
If none found it will throw an UnknownDomainObjectException. If the extension is found but cannot be cast to the expected type it will throw an IllegalStateException.
Return
extension, never null
Parameters
extension name
Throws
When the given extension is not found.
When the given extension cannot be cast to the expected type.
Locates an object by name and casts it to the expected type T.
If an object with the given name is not found, UnknownDomainObjectException is thrown. If the object is found but cannot be cast to the expected type T, IllegalArgumentException is thrown.
Return
the object, never null
Parameters
object name
Throws
When the given object is not found.
When the given object cannot be cast to the expected type.
Locates an object by name and casts it to the expected type.
If an object with the given name is not found, UnknownDomainObjectException is thrown. If the object is found but cannot be cast to the expected type, IllegalArgumentException is thrown.
Return
the object, never null
Parameters
object name
expected type
Throws
When the given object is not found.
When the given object cannot be cast to the expected type.
Locates an object by name and casts it to the expected type then configures it.
If an object with the given name is not found, UnknownDomainObjectException is thrown. If the object is found but cannot be cast to the expected type, IllegalArgumentException is thrown.
Return
the object, never null
Parameters
object name
configuration action to apply to the object before returning it
Throws
When the given object is not found.
When the given object cannot be cast to the expected type.
Locates an object by name and casts it to the expected type T then configures it.
If an object with the given name is not found, UnknownDomainObjectException is thrown. If the object is found but cannot be cast to the expected type T, IllegalArgumentException is thrown.
Return
the object, never null
Parameters
object name
configuration action to apply to the object before returning it
Throws
When the given object is not found.
When the given object cannot be cast to the expected type.