org.objectweb.fractal.julia.type
Class CheckTypeFactoryMixin

java.lang.Object
  extended byorg.objectweb.fractal.julia.type.CheckTypeFactoryMixin
All Implemented Interfaces:
TypeFactory

public abstract class CheckTypeFactoryMixin
extends Object
implements TypeFactory

Provides reflective checks to a TypeFactory.

Requirements


Field Summary
 
Fields inherited from interface org.objectweb.fractal.api.type.TypeFactory
CLIENT, COLLECTION, MANDATORY, OPTIONAL, SERVER, SINGLE
 
Constructor Summary
CheckTypeFactoryMixin()
           
 
Method Summary
abstract  InterfaceType _super_createFcItfType(String name, String signature, boolean isClient, boolean isOptional, boolean isCollection)
          The createFcItfType method overriden by this mixin.
 boolean checkFcAttributeControllerInterface(Class itf)
          Checks that the given class is valid attribute controller interface.
 InterfaceType createFcItfType(String name, String signature, boolean isClient, boolean isOptional, boolean isCollection)
          Checks the signature Java interface and then calls the overriden method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.fractal.api.type.TypeFactory
createFcType
 

Constructor Detail

CheckTypeFactoryMixin

public CheckTypeFactoryMixin()
Method Detail

createFcItfType

public InterfaceType createFcItfType(String name,
                                     String signature,
                                     boolean isClient,
                                     boolean isOptional,
                                     boolean isCollection)
                              throws InstantiationException
Checks the signature Java interface and then calls the overriden method. This method check that the Java interface exists, that it is not a class, that it is public, and that it is a valid attribute controller interface (only if name is equal to "attribute-controller", of course).

Specified by:
createFcItfType in interface TypeFactory
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.

checkFcAttributeControllerInterface

public boolean checkFcAttributeControllerInterface(Class itf)
Checks that the given class is valid attribute controller interface.

Parameters:
itf - a Java interface
Returns:
true if the given interface is valid, or false otherwise.

_super_createFcItfType

public abstract InterfaceType _super_createFcItfType(String name,
                                                     String signature,
                                                     boolean isClient,
                                                     boolean isOptional,
                                                     boolean isCollection)
                                              throws InstantiationException
The createFcItfType method overriden by this mixin.

Throws:
InstantiationException