|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glassfish.hk2.internal.ActiveDescriptorBuilderImpl
public class ActiveDescriptorBuilderImpl
Constructor Summary | |
---|---|
ActiveDescriptorBuilderImpl(Class<?> implementation)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ActiveDescriptorBuilderImpl(Class<?> implementation)
Method Detail |
---|
public ActiveDescriptorBuilder named(String name) throws IllegalArgumentException
ActiveDescriptorBuilder
named
in interface ActiveDescriptorBuilder
name
- The name to be associated with this Descriptor
IllegalArgumentException
- if there is more than one name on the predicatepublic ActiveDescriptorBuilder to(Type contract) throws IllegalArgumentException
ActiveDescriptorBuilder
to
in interface ActiveDescriptorBuilder
contract
- A class that is annotated with Contract to
be associated with this Descriptor
IllegalArgumentException
- on failurespublic ActiveDescriptorBuilder in(Class<? extends Annotation> scope) throws IllegalArgumentException
ActiveDescriptorBuilder
in
in interface ActiveDescriptorBuilder
scope
- The class of the scope this descriptor is to have.
IllegalArgumentException
- If in is called more than oncepublic ActiveDescriptorBuilder qualifiedBy(Annotation annotation) throws IllegalArgumentException
ActiveDescriptorBuilder
qualifiedBy
in interface ActiveDescriptorBuilder
annotation
- The annotation to be associated with this descriptor
IllegalArgumentException
- on failurespublic ActiveDescriptorBuilder has(String key, String value) throws IllegalArgumentException
ActiveDescriptorBuilder
has
in interface ActiveDescriptorBuilder
key
- The key for the data to be associated with this descriptorvalue
- The value this key should take (single value metadata)
IllegalArgumentException
public ActiveDescriptorBuilder has(String key, List<String> values) throws IllegalArgumentException
ActiveDescriptorBuilder
has
in interface ActiveDescriptorBuilder
key
- The key for the data to be associated with this descriptorvalues
- The values this key should take (single value metadata)
IllegalArgumentException
public ActiveDescriptorBuilder ofRank(int rank)
ActiveDescriptorBuilder
ofRank
in interface ActiveDescriptorBuilder
rank
- The rank to be associated with this descriptor.
public ActiveDescriptorBuilder andLoadWith(HK2Loader loader) throws IllegalArgumentException
ActiveDescriptorBuilder
andLoadWith
in interface ActiveDescriptorBuilder
loader
- The loader to use with this descriptor
IllegalArgumentException
- if the HK2Loader is set non-null more than oncepublic AbstractActiveDescriptor<?> build() throws IllegalArgumentException
ActiveDescriptorBuilder
build
in interface ActiveDescriptorBuilder
IllegalArgumentException
- if the built descriptor is invalidpublic AbstractActiveDescriptor<?> buildFactory() throws IllegalArgumentException
ActiveDescriptorBuilder
buildFactory
in interface ActiveDescriptorBuilder
IllegalArgumentException
- if the built descriptor is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |