tamago
Interface ServiceType

All Known Implementing Classes:
ServiceTypeDescriptor

public interface ServiceType

The Service Type interface Services possess a name and an implementation (definition) A subtyping hierarchy is provided, Service being the top-level service.

Author:
Frederic Peschanski

Method Summary
 java.lang.Class<?> getImplementation()
          get the implementation of the service Note: this is not the implementation of a provider for the service.
 java.lang.String getName()
          get the name of the service (a service name is unique)
 boolean isProvidedBy(java.lang.Object o)
          tell if the service is provided by the argument
 boolean isSameType(ServiceType type2)
          tell if the service is identical to the argument
 boolean isStrictSubType(ServiceType supertype)
          tell if the service is a strict subtype of the argument
 boolean isStrictSuperType(ServiceType subtype)
          tell if the service is a strict supertype of the argument
 boolean isSubType(ServiceType supertype)
          tell if the service is a subtype of the argument
 boolean isSuperType(ServiceType subtype)
          tell if the service is a supertype of the argument
 

Method Detail

getName

java.lang.String getName()
get the name of the service (a service name is unique)

Returns:
the name of the service

getImplementation

java.lang.Class<?> getImplementation()
get the implementation of the service Note: this is not the implementation of a provider for the service.

Returns:
the class implementing the service description

isSuperType

boolean isSuperType(ServiceType subtype)
tell if the service is a supertype of the argument

Parameters:
subtype - the subtype candidate
Returns:
true if the service type is a supertype of the candidate, or false in the other case.

isStrictSuperType

boolean isStrictSuperType(ServiceType subtype)
tell if the service is a strict supertype of the argument

Parameters:
subtype - the subtype candidate
Returns:
true if the service type is a strict supertype of the candidate, or false in the other case.

isSubType

boolean isSubType(ServiceType supertype)
tell if the service is a subtype of the argument

Parameters:
supertype - the supertype candidate
Returns:
true if the service type is a subtype of the candidate, or false in the other case.

isStrictSubType

boolean isStrictSubType(ServiceType supertype)
tell if the service is a strict subtype of the argument

Parameters:
supertype - the supertype candidate
Returns:
true if the service type is a strict subtype of the candidate, or false in the other case.

isSameType

boolean isSameType(ServiceType type2)
tell if the service is identical to the argument

Parameters:
type2 - the identical type candidate
Returns:
true if the service type is identical to the candidate, or false if both types are different.

isProvidedBy

boolean isProvidedBy(java.lang.Object o)
tell if the service is provided by the argument

Parameters:
o - the provider candidate
Returns:
true if the passed argument is a provider for the service type