DescriptorBuilder
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private final HashSet | |
| private String | |
| private HK2Loader | |
| private final HashMap | |
| private String | |
| private Boolean | |
| private Boolean | |
| private final HashSet | |
| private int | |
| private String | |
| private DescriptorVisibility |
| Access | Constructor and Description |
|---|---|
| public | |
| public | DescriptorBuilderImpl(String
The implementation this should take implementation, boolean Whether or not to add the implementation to the set of
contracts addToContracts)A descriptor builder with the given implementation |
| Modifier and Type | Method and Description |
|---|---|
| public DescriptorBuilder | analyzeWith(String serviceName)
Implements org. Call this if the descriptor should be analyzed with the
|
| public DescriptorBuilder | andLoadWith(HK2Loader loader)
Implements org. Call this if this descriptor should be loaded with the given HK2Loader |
| public DescriptorImpl | build()
Implements org. Generates a descriptor that can be used in binding operations |
| public FactoryDescriptors | buildFactory(String factoryScope)
Implements org. Generates a factory descriptor that can be used in binding operations. |
| public FactoryDescriptors | buildFactory()
Implements org. Generates a factory descriptor that can be used in binding operations. |
| public FactoryDescriptors | buildFactory(Class<? extends Annotation> factoryScope)
Implements org. Generates a factory descriptor that can be used in binding operations. |
| public DescriptorBuilder | has(String key, String value)
Implements org. An instance of data to be associated with this descriptor |
| public DescriptorBuilder | has(String key, List<String> values)
Implements org. An instance of data to be associated with this descriptor |
| public DescriptorBuilder | in(Class<? extends Annotation> scope)
Implements org. A scope to be associated with this descriptor object. |
| public DescriptorBuilder | in(String scope)
Implements org. A scope to be associated with this descriptor object. |
| public DescriptorBuilder | localOnly()
Implements org. This will cause the descriptorVisibility field of the returned descriptor to return LOCAL |
| public DescriptorBuilder | named(String name)
Implements org. The name for this descriptor object. |
| public DescriptorBuilder | ofRank(int rank)
Implements org. The rank to be associated with this descriptor. |
| public DescriptorBuilder | proxy()
Implements org. This will cause the isProxiable field of the returned descriptor to return true (it will force this descriptor to use proxies). |
| public DescriptorBuilder | proxy(boolean forceProxy)
Implements org. This will cause the isProxiable field of the returned descriptor to return the given value. |
| public DescriptorBuilder | proxyForSameScope()
Implements org. This will cause the isProxyForSameScope field of the returned descriptor to return true (it will force this descriptor to proxy even when injecting into the same scope). |
| public DescriptorBuilder | proxyForSameScope(boolean proxyForSameScope)
Implements org. This will cause the isProxyForSameScope field of the returned descriptor to return the given value. |
| public DescriptorBuilder | qualifiedBy(Annotation annotation)
Implements org. A qualifier to be associated with this descriptor object. |
| public DescriptorBuilder | qualifiedBy(String annotation)
Implements org. A qualifier to be associated with this descriptor object |
| public DescriptorBuilder | to(Class<?> contract)
Implements org. A contract to be associated with this descriptor object. |
| public DescriptorBuilder | to(String contract)
Implements org. A contract to be associated with this descriptor object. |
| public DescriptorBuilder | visibility(DescriptorVisibility visibility)
Implements org. This will set the descriptorVisibility field of the returned descriptor |
| analysisName | back to summary |
|---|---|
| private String analysisName | |
| contracts | back to summary |
|---|---|
| private final HashSet<String> contracts | |
| implementation | back to summary |
|---|---|
| private String implementation | |
| loader | back to summary |
|---|---|
| private HK2Loader loader | |
| metadatas | back to summary |
|---|---|
| private final HashMap<String, List<String>> metadatas | |
| name | back to summary |
|---|---|
| private String name | |
| proxy | back to summary |
|---|---|
| private Boolean proxy | |
| proxyForSameScope | back to summary |
|---|---|
| private Boolean proxyForSameScope | |
| qualifiers | back to summary |
|---|---|
| private final HashSet<String> qualifiers | |
| rank | back to summary |
|---|---|
| private int rank | |
| scope | back to summary |
|---|---|
| private String scope | |
| visibility | back to summary |
|---|---|
| private DescriptorVisibility visibility | |
| DescriptorBuilderImpl | back to summary |
|---|---|
| public DescriptorBuilderImpl() The basid constructor | |
| DescriptorBuilderImpl | back to summary |
|---|---|
| public DescriptorBuilderImpl(String implementation, boolean addToContracts) A descriptor builder with the given implementation
| |
| analyzeWith | back to summary |
|---|---|
| public DescriptorBuilder analyzeWith(String serviceName) Implements org. Doc from org. Call this if the descriptor should be analyzed with the
| |
| andLoadWith | back to summary |
|---|---|
| public DescriptorBuilder andLoadWith(HK2Loader loader) throws IllegalArgumentException Implements org. Doc from org. Call this if this descriptor should be loaded with the given HK2Loader
| |
| build | back to summary |
|---|---|
| public DescriptorImpl build() throws IllegalArgumentException Implements org. Doc from org. Generates a descriptor that can be used in binding operations
| |
| buildFactory | back to summary |
|---|---|
| public FactoryDescriptors buildFactory(String factoryScope) throws IllegalArgumentException Implements org. Doc from org. Generates a factory descriptor that can be used in binding operations. The generated factory service will have no name, no qualifiers and the same metadata as given to this builder. The generated service will have had the implementation class removed from its set of advertised contracts
| |
| buildFactory | back to summary |
|---|---|
| public FactoryDescriptors buildFactory() throws IllegalArgumentException Implements org. Doc from org. Generates a factory descriptor that can be used in binding operations. The generated factory service will have no name, no qualifiers and the same metadata as given to this builder. The factory will be put into PerLookup scope
| |
| buildFactory | back to summary |
|---|---|
| public FactoryDescriptors buildFactory(Class<? extends Annotation> factoryScope) throws IllegalArgumentException Implements org. Doc from org. Generates a factory descriptor that can be used in binding operations. The generated factory service will have no name, no qualifiers and the same metadata as given to this builder. The generated service will have had the implementation class removed from its set of advertised contracts
| |
| has | back to summary |
|---|---|
| public DescriptorBuilder has(String key, String value) throws IllegalArgumentException Implements org. Doc from org. An instance of data to be associated with this descriptor
| |
| has | back to summary |
|---|---|
| public DescriptorBuilder has(String key, List<String> values) throws IllegalArgumentException Implements org. Doc from org. An instance of data to be associated with this descriptor
| |
| in | back to summary |
|---|---|
| public DescriptorBuilder in(Class<? extends Annotation> scope) throws IllegalArgumentException Implements org. Doc from org. A scope to be associated with this descriptor object. Note that at the current time a descriptor can only have one scope, hence this method will throw an IllegalArgumentException if in is called more than once.
| |
| in | back to summary |
|---|---|
| public DescriptorBuilder in(String scope) throws IllegalArgumentException Implements org. Doc from org. A scope to be associated with this descriptor object. Note that at the current time a descriptor can only have one scope, hence this method will throw an IllegalArgumentException if in is called more than once.
| |
| localOnly | back to summary |
|---|---|
| public DescriptorBuilder localOnly() Implements org. Doc from org. This will cause the descriptorVisibility field of the returned descriptor to return LOCAL
| |
| named | back to summary |
|---|---|
| public DescriptorBuilder named(String name) throws IllegalArgumentException Implements org. Doc from org. The name for this descriptor object. Note that at the current time a descriptor can only have one name, hence this method will throw an IllegalArgumentException if named is called more than once.
| |
| ofRank | back to summary |
|---|---|
| public DescriptorBuilder ofRank(int rank) Implements org. Doc from org. The rank to be associated with this descriptor. The last rank bound wins
| |
| proxy | back to summary |
|---|---|
| public DescriptorBuilder proxy() Implements org. Doc from org. This will cause the isProxiable field of the returned descriptor to return true (it will force this descriptor to use proxies).
| |
| proxy | back to summary |
|---|---|
| public DescriptorBuilder proxy(boolean forceProxy) Implements org. Doc from org. This will cause the isProxiable field of the returned descriptor to return the given value.
| |
| proxyForSameScope | back to summary |
|---|---|
| public DescriptorBuilder proxyForSameScope() Implements org. Doc from org. This will cause the isProxyForSameScope field of the returned descriptor to return true (it will force this descriptor to proxy even when injecting into the same scope).
| |
| proxyForSameScope | back to summary |
|---|---|
| public DescriptorBuilder proxyForSameScope(boolean proxyForSameScope) Implements org. Doc from org. This will cause the isProxyForSameScope field of the returned descriptor to return the given value.
| |
| qualifiedBy | back to summary |
|---|---|
| public DescriptorBuilder qualifiedBy(Annotation annotation) throws IllegalArgumentException Implements org. Doc from org. A qualifier to be associated with this descriptor object. It is
dangerous to use this method with a ghost annotation (one that is
not on the object) if that annotation has fields, as these
fields will NOT survive being put into the
| |
| qualifiedBy | back to summary |
|---|---|
| public DescriptorBuilder qualifiedBy(String annotation) throws IllegalArgumentException Implements org. Doc from org. A qualifier to be associated with this descriptor object
| |
| to | back to summary |
|---|---|
| public DescriptorBuilder to(Class<?> contract) throws IllegalArgumentException Implements org. Doc from org. A contract to be associated with this descriptor object.
| |
| to | back to summary |
|---|---|
| public DescriptorBuilder to(String contract) throws IllegalArgumentException Implements org. Doc from org. A contract to be associated with this descriptor object.
| |
| visibility | back to summary |
|---|---|
| public DescriptorBuilder visibility(DescriptorVisibility visibility) Implements org. Doc from org. This will set the descriptorVisibility field of the returned descriptor
| |