def to_source(self, classname):
        """
        Returns the model as Java source code if the classifier implements weka.classifiers.Sourcable.

        :param classname: the classname for the generated Java code
        :type classname: str
        :return: the model as source code string
        :rtype: str
        """
        if not self.check_type(self.jobject, "weka.classifiers.Sourcable"):
            return None
        return javabridge.call(self.jobject, "toSource", "(Ljava/lang/String;)Ljava/lang/String;", classname)
Returns the model as Java source code if the classifier implements weka.classifiers.Sourcable.

        :param classname: the classname for the generated Java code
        :type classname: str
        :return: the model as source code string
        :rtype: str