|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComponentFactory
Component factory interface for a pico container based factory.
Method Summary | ||
---|---|---|
boolean |
canCreate(TypeKey typeKey)
Check if this factory can create components of the given type. |
|
|
create(Class<?> type,
State... context)
Creates a component. |
|
|
create(TypeKey typeKey,
State... context)
Creates a typed component. |
|
|
instances(Class<T> type)
Returns a list of all instances of a specific type stored at the factory. |
Method Detail |
---|
<T> T create(Class<?> type, State... context)
The context state supplied is used to fill in missing parameters that are not available as default instances or implementations at the factory.
T
- the component type, has to correspond to the scope of the type key.type
- the class for which to create the component.context
- additional state to inject to the component created.
<T> T create(TypeKey typeKey, State... context)
The context state supplied is used to fill in missing parameters that are not available as default instances or implementations at the factory.
T
- the component type, has to correspond to the scope of the type key.typeKey
- the type key for which to create the component.context
- additional state to inject to the component created.
boolean canCreate(TypeKey typeKey)
typeKey
- the type key for which to check if the factory can create an instance.
true
if the factory can provide an instance, false
otherwise.<T> List<T> instances(Class<T> type)
Take care to use this method only to retrieve cached instances otherwise this factory will create an instance for each of the registered implementation types that are assignable to the type specified.
T
- the instance type to retrieve.type
- the class of the instance type to retrieve.
null
but may be empty.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG