As.Defaults, As.NotFoundBehaviour<T>
Modifier | Constructor and Description |
---|---|
protected |
AsSupport()
Constructor for use in subclassing.
|
|
AsSupport(Object owner,
Object... rolesOrFactories)
Constructor for use in composition.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
as(Class<T> type) |
<T> T |
as(Class<T> type,
As.NotFoundBehaviour<T> notFoundBehaviour)
First, local roles are probed; then the owner, in case it directly implements the required role; at last,
the delegate is invoked.
|
protected AsSupport()
public AsSupport(@Nonnull Object owner, @Nonnull Object... rolesOrFactories)
RoleFactory
that will be invoked to create additional roles.owner
- the ownerrolesOrFactories
- a collection of roles or factories for roles@Nonnull public <T> T as(@Nonnull Class<T> type, @Nonnull As.NotFoundBehaviour<T> notFoundBehaviour)
Copyright © 2009-2013 Tidalwave s.a.s. (http://tidalwave.it). All Rights Reserved.