org.objectweb.fractal.julia.type
Class BasicInterfaceType

java.lang.Object
  extended byorg.objectweb.fractal.julia.type.BasicInterfaceType
All Implemented Interfaces:
InterfaceType, Serializable, Type

public class BasicInterfaceType
extends Object
implements InterfaceType, Serializable

Provides a basic implementation of the InterfaceType interface.

See Also:
Serialized Form

Constructor Summary
BasicInterfaceType(String name, String signature, boolean isClient, boolean isOptional, boolean isCollection)
          Constructs a new BasicInterfaceType object.
 
Method Summary
 boolean equals(Object o)
          Tests if this interface type is equal to the given object.
 String getFcItfName()
          Returns the name of component interfaces of this type.
 String getFcItfSignature()
          Returns the signatures of the methods of interfaces of this type.
 boolean isFcClientItf()
          Returns true if component interfaces of this type are client interfaces.
 boolean isFcCollectionItf()
          Indicates how many interfaces of this type a component may have.
 boolean isFcOptionalItf()
          Returns true if component interfaces of this type are optional.
 boolean isFcSubTypeOf(Type type)
          Returns true if the given type is a sub-type of this type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicInterfaceType

public BasicInterfaceType(String name,
                          String signature,
                          boolean isClient,
                          boolean isOptional,
                          boolean isCollection)
Constructs a new BasicInterfaceType object.

Parameters:
name - the name of the described interface.
signature - the fully qualified name of the Java type of the described interface.
isClient - true if the described interface is a client interface.
isOptional - true if the described interface is an optional interface.
isCollection - true if the described interface is a collection interface.
Method Detail

getFcItfName

public String getFcItfName()
Description copied from interface: InterfaceType
Returns the name of component interfaces of this type. More precisely, because some interfaces can be created dynamically (see isFcCollectionItf), this name is in fact a prefix of the real names of interfaces of this type.

Specified by:
getFcItfName in interface InterfaceType
Returns:
the name of component interfaces of this type inside their components (see getFcItfName).

getFcItfSignature

public String getFcItfSignature()
Description copied from interface: InterfaceType
Returns the signatures of the methods of interfaces of this type. In Java this method returns the fully qualified name of a Java interface corresponding to these method signatures.

Specified by:
getFcItfSignature in interface InterfaceType
Returns:
the signatures of the methods of interfaces of this type.

isFcClientItf

public boolean isFcClientItf()
Description copied from interface: InterfaceType
Returns true if component interfaces of this type are client interfaces.

Specified by:
isFcClientItf in interface InterfaceType
Returns:
true if component interfaces of this type are client interfaces, i.e., interfaces that are required, or false if they are server interfaces, i.e., interfaces that are provided.

isFcOptionalItf

public boolean isFcOptionalItf()
Description copied from interface: InterfaceType
Returns true if component interfaces of this type are optional. A mandatory interface is guaranteed to be "available" when the component is started. For a client interface, this means that the interface is bound, and that it is bound to a mandatory interface. An optional interface may not be available when the component is started (for a client interface, it means that the interface may not be bound).

Specified by:
isFcOptionalItf in interface InterfaceType
Returns:
true if component interfaces of this type are optional.

isFcCollectionItf

public boolean isFcCollectionItf()
Description copied from interface: InterfaceType
Indicates how many interfaces of this type a component may have. A singleton interface type means that a component must have exactly one interface of this type. A collection interface type means that a component may have an arbitrary number of interfaces of this type (whose names must all begin with the name specified in this interface type).

Specified by:
isFcCollectionItf in interface InterfaceType
Returns:
false if this type is a singleton interface type.

isFcSubTypeOf

public boolean isFcSubTypeOf(Type type)
Description copied from interface: Type
Returns true if the given type is a sub-type of this type. The relation defined by this method should be:

Specified by:
isFcSubTypeOf in interface Type
Parameters:
type - the type to be compared to this type.
Returns:
true if the given type is a sub-type of this type.

equals

public boolean equals(Object o)
Tests if this interface type is equal to the given object.

Parameters:
o - the object to be compared to this interface type.
Returns:
true if this interface type is equal to the given object.