org.glassfish.hk2
Interface Descriptor


public interface Descriptor

A Descriptor is a bean-like structure that describes a service declaration in HK2.

Services have a number of optional attributes such as name and scope. A service is required to minimally have a type name representing the concrete (i.e., byType) definition.

Author:
Jerome Dochez, Jeff Trent, Mason Taube

Method Summary
 Collection<String> getContracts()
          The contracts that are used to index the service definition.
 MultiMap<String,String> getMetadata()
          The meta data attributes for the service.
 Collection<String> getNames()
          The name(s) for the service.
 Collection<String> getQualifiers()
          Returns the qualifier annotations on the service.
 Scope getScope()
          The optional scoping for the service.
 String getTypeName()
          The implementation definition type.
 boolean hasContract(String contract)
          Returns true if getContracts() contains the passed argument.
 boolean hasName(String name)
          Returns true if getNames() contains the passed argument.
 boolean hasQualifier(String qualifier)
          Returns true if getQualifiers() contains the passed argument.
 

Method Detail

getNames

Collection<String> getNames()
The name(s) for the service.

Returns:
the collection of services names used to describe the service

hasName

boolean hasName(String name)
Returns true if getNames() contains the passed argument.


getScope

Scope getScope()
The optional scoping for the service.


getMetadata

MultiMap<String,String> getMetadata()
The meta data attributes for the service.

Returns:
the service's metadata

getQualifiers

Collection<String> getQualifiers()
Returns the qualifier annotations on the service.

Returns:
a collection of qualifiers for this service.

hasQualifier

boolean hasQualifier(String qualifier)
Returns true if getQualifiers() contains the passed argument.


getContracts

Collection<String> getContracts()
The contracts that are used to index the service definition.

Returns:
the collection of contracts fqcn.

hasContract

boolean hasContract(String contract)
Returns true if getContracts() contains the passed argument.


getTypeName

String getTypeName()
The implementation definition type.

Returns:
the fcqn of the implementation.


Copyright © 2012 Oracle Corporation. All Rights Reserved.