/** * @see org.ow2.frascati.tinfi.control.content.TypeCheckSCAContentMixin#checkType(org.objectweb.fractal.api.Type,java.lang.Class<?>) */ private void checkType(org.objectweb.fractal.api.Type type, java.lang.Class<?> contentClass) throws org.ow2.frascati.tinfi.api.control.ContentInstantiationException { org.objectweb.fractal.api.type.ComponentType ct = ((org.objectweb.fractal.api.type.ComponentType) (type)); org.objectweb.fractal.api.type.InterfaceType[] its = ct.getFcInterfaceTypes(); for (org.objectweb.fractal.api.type.InterfaceType it : its) { if (it.isFcClientItf()) { continue; } java.lang.String name = it.getFcItfName(); if ((name.equals("component")) || (name.endsWith("-controller"))) { continue; } java.lang.String signature = it.getFcItfSignature(); if (contentClass.equals(java.lang.Object.class)) { java.lang.String msg = "Object.class is not adequate since the content class should implement " + signature; throw new org.ow2.frascati.tinfi.api.control.ContentInstantiationException(msg); } java.lang.Class<?> cl = load(contentClass, signature); if (!(cl.isAssignableFrom(contentClass))) { java.lang.String msg = (contentClass + " should implement ") + signature; throw new org.ow2.frascati.tinfi.api.control.ContentInstantiationException(msg); } } }