|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ActiveDescriptorBuilder
The active descriptor build is for building up a
non-reified ActiveDescriptor. Non-reified active descriptors
are useful because upon bind the system will not do further
analysis of the associated class file, assuming instead that
all the information from the ActiveDescriptor is what the
user intended. This can be used to supply qualifiers that are
not marked with Qualifier
or contracts that are not
marked with Contract
. An unreified ActiveDescriptor given
to a bind method need not implement the create or destroy method,
as they are automatically created and destroyed by the system.
Method Summary | |
---|---|
ActiveDescriptorBuilder |
andLoadWith(HK2Loader loader)
Call this if this descriptor should be loaded with the given HK2Loader |
AbstractActiveDescriptor<?> |
build()
Generates a descriptor that can be used in binding operations |
AbstractActiveDescriptor<?> |
buildFactory()
Generates a descriptor that can be used in binding operations that describes a factory |
ActiveDescriptorBuilder |
has(String key,
List<String> values)
An instance of data to be associated with this descriptor |
ActiveDescriptorBuilder |
has(String key,
String value)
An instance of data to be associated with this descriptor |
ActiveDescriptorBuilder |
in(Class<? extends Annotation> scope)
A scope to be associated with this descriptor object. |
ActiveDescriptorBuilder |
named(String name)
The name for this descriptor object. |
ActiveDescriptorBuilder |
ofRank(int rank)
The rank to be associated with this descriptor. |
ActiveDescriptorBuilder |
qualifiedBy(Annotation annotation)
A qualifier to be associated with this descriptor object |
ActiveDescriptorBuilder |
to(Type contract)
A contract to be associated with this descriptor object. |
Method Detail |
---|
ActiveDescriptorBuilder named(String name) throws IllegalArgumentException
name
- The name to be associated with this Descriptor
IllegalArgumentException
- if there is more than one name on the predicateActiveDescriptorBuilder to(Type contract) throws IllegalArgumentException
contract
- A class that is annotated with Contract to
be associated with this Descriptor
IllegalArgumentException
- on failuresActiveDescriptorBuilder in(Class<? extends Annotation> scope) throws IllegalArgumentException
scope
- The class of the scope this descriptor is to have.
IllegalArgumentException
- If in is called more than onceActiveDescriptorBuilder qualifiedBy(Annotation annotation) throws IllegalArgumentException
annotation
- The annotation to be associated with this descriptor
IllegalArgumentException
- on failuresActiveDescriptorBuilder has(String key, String value) throws IllegalArgumentException
key
- The key for the data to be associated with this descriptorvalue
- The value this key should take (single value metadata)
IllegalArgumentException
ActiveDescriptorBuilder has(String key, List<String> values) throws IllegalArgumentException
key
- The key for the data to be associated with this descriptorvalues
- The values this key should take (single value metadata)
IllegalArgumentException
ActiveDescriptorBuilder ofRank(int rank)
rank
- The rank to be associated with this descriptor.
ActiveDescriptorBuilder andLoadWith(HK2Loader loader) throws IllegalArgumentException
loader
- The loader to use with this descriptor
IllegalArgumentException
- if the HK2Loader is set non-null more than onceAbstractActiveDescriptor<?> build() throws IllegalArgumentException
IllegalArgumentException
- if the built descriptor is invalidAbstractActiveDescriptor<?> buildFactory() throws IllegalArgumentException
IllegalArgumentException
- if the built descriptor is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |