code: public void setClass(String name, Class<?> theClass, Class<?> xface) {
      if (!xface.isAssignableFrom(theClass))
        throw new RuntimeException(theClass + " does not implement " + xface.getName());
      set(name, theClass.getName());
    }
docs: Set the value of the <code>name</code> property to the name of a
  <code>theClass</code> implementing the given interface <code>xface</code>.
  
  An exception is thrown if <code>theClass</code> does not implement the
  interface <code>xface</code>.
  
  @param name property name.
  @param theClass property value.
  @param xface the interface implemented by the named class.