org.objectweb.fractal.api.type

Interface TypeFactory

public interface TypeFactory

A component interface to create component and interface type objects.

Field Summary

static boolean
CLIENT
The isClient value to be used in createFcItfType to create a client interface type.
static boolean
COLLECTION
The isCollection value to be used in createFcItfType to create a collection interface type.
static boolean
MANDATORY
The isOptional value to be used in createFcItfType to create a mandatory interface type.
static boolean
OPTIONAL
The isOptional value to be used in createFcItfType to create an optional interface type.
static boolean
SERVER
The isClient value to be used in createFcItfType to create a server interface type.
static boolean
SINGLE
The isCollection value to be used in createFcItfType to create a singleton interface type.

Method Summary

InterfaceType
createFcItfType(String name, String signature, boolean isClient, boolean isOptional, boolean isCollection)
Creates an interface type.
ComponentType
createFcType(InterfaceType[] interfaceTypes)
Creates a component type.

Field Details

CLIENT

public static final boolean CLIENT
The isClient value to be used in createFcItfType to create a client interface type.

Field Value:
true


COLLECTION

public static final boolean COLLECTION
The isCollection value to be used in createFcItfType to create a collection interface type.

Field Value:
true


MANDATORY

public static final boolean MANDATORY
The isOptional value to be used in createFcItfType to create a mandatory interface type.

Field Value:
false


OPTIONAL

public static final boolean OPTIONAL
The isOptional value to be used in createFcItfType to create an optional interface type.

Field Value:
true


SERVER

public static final boolean SERVER
The isClient value to be used in createFcItfType to create a server interface type.

Field Value:
false


SINGLE

public static final boolean SINGLE
The isCollection value to be used in createFcItfType to create a singleton interface type.

Field Value:
false

Method Details

createFcItfType

public InterfaceType createFcItfType(String name,
                                     String signature,
                                     boolean isClient,
                                     boolean isOptional,
                                     boolean isCollection)
            throws InstantiationException
Creates an interface type.

Parameters:
name - the name of interfaces of this type (see getFcItfName).
signature - signatures of the methods of interfaces of this type. In Java this "signature" is the fully qualified name of a Java interface corresponding to these method signatures.
isClient - true if component interfaces of this type are client interfaces.
isOptional - true if component interfaces of this type are optional interfaces.
isCollection - true if a component may have several interfaces of this type.

Returns:
an interface type initialized with the given values.

Throws:
InstantiationException - if the interface type cannot be created.


createFcType

public ComponentType createFcType(InterfaceType[] interfaceTypes)
            throws InstantiationException
Creates a component type.

Parameters:
interfaceTypes - the interface types of the component type to be created.

Returns:
a component type whose getFcInterfaceTypes method returns an array equal to interfaceTypes.

Throws:
InstantiationException - if the component type cannot be created.