All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tests.java.org.python.tests.multihidden.BaseConnection Maven / Gradle / Ivy

Go to download

Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform.

There is a newer version: 2.7.4
Show newest version
package org.python.tests.multihidden;

/**
 * Derived from the Oracle JDBC connection classes for use in test_extending_multiple_hidden_classes
 * in test_java_visibility.
 */
public class BaseConnection {
    public static Connection newConnection() {
        return new Connection();
    }

    public String close() {
        return "base close";
    }
}

class Connection extends ConnectionWrapper implements SpecialConnection {

    public String close(int foo) {
        return "special close";
    }
}

class ConnectionWrapper extends BaseConnection {

// This method, plus the fact that Connection implements an interface with a different
// close, causes BaseConnection.close to be hidden in Connection because
// ConnectionWrapper is not public
    @Override
    public String close() {
        return "wrapper close";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy