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)
Returns an adapter to this object of the specified type.
|
<T> T |
as(Class<T> type,
As.NotFoundBehaviour<T> notFoundBehaviour)
Returns an adapter to this object of the specified type.
|
<T> Collection<T> |
asMany(Class<T> type)
Searches for multiple adapters of the given type and returns them.
|
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 public <T> T as(@Nonnull Class<T> type, @Nonnull As.NotFoundBehaviour<T> notFoundBehaviour)
@Nonnull public <T> Collection<T> asMany(@Nonnull Class<T> type)
Copyright © 2009-2013 Tidalwave s.a.s. (http://tidalwave.it). All Rights Reserved.