org.objectweb.fractal.julia.type
Class CheckTypeFactoryMixin
java.lang.Object
org.objectweb.fractal.julia.type.CheckTypeFactoryMixin
- All Implemented Interfaces:
- TypeFactory
- public abstract class CheckTypeFactoryMixin
- extends Object
- implements TypeFactory
Provides reflective checks to a TypeFactory
.
Requirements
- the Java platform must provide the Java Reflection API, the
ClassLoader class, and Thread.getContextClassLoader method.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CheckTypeFactoryMixin
public CheckTypeFactoryMixin()
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.
- 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.