tamago
Class ServiceTypeDescriptor

java.lang.Object
  extended by tamago.ServiceTypeDescriptor
All Implemented Interfaces:
ServiceType

public class ServiceTypeDescriptor
extends java.lang.Object
implements ServiceType


Constructor Summary
ServiceTypeDescriptor(java.lang.String type_name, java.lang.Class<?> type_class)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceTypeDescriptor

public ServiceTypeDescriptor(java.lang.String type_name,
                             java.lang.Class<?> type_class)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ServiceType
get the name of the service (a service name is unique)

Specified by:
getName in interface ServiceType
Returns:
the name of the service

getImplementation

public java.lang.Class<?> getImplementation()
Description copied from interface: ServiceType
get the implementation of the service Note: this is not the implementation of a provider for the service.

Specified by:
getImplementation in interface ServiceType
Returns:
the class implementing the service description

isSuperType

public boolean isSuperType(ServiceType subtype)
Description copied from interface: ServiceType
tell if the service is a supertype of the argument

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

isSubType

public boolean isSubType(ServiceType supertype)
Description copied from interface: ServiceType
tell if the service is a subtype of the argument

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

isSameType

public boolean isSameType(ServiceType type2)
Description copied from interface: ServiceType
tell if the service is identical to the argument

Specified by:
isSameType in interface ServiceType
Parameters:
type2 - the identical type candidate
Returns:
true if the service type is identical to the candidate, or false if both types are different.

isStrictSuperType

public boolean isStrictSuperType(ServiceType subtype)
Description copied from interface: ServiceType
tell if the service is a strict supertype of the argument

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

isStrictSubType

public boolean isStrictSubType(ServiceType supertype)
Description copied from interface: ServiceType
tell if the service is a strict subtype of the argument

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

isProvidedBy

public boolean isProvidedBy(java.lang.Object o)
Description copied from interface: ServiceType
tell if the service is provided by the argument

Specified by:
isProvidedBy in interface ServiceType
Parameters:
o - the provider candidate
Returns:
true if the passed argument is a provider for the service type