![JAR search and dependency download from the Maven repository](/logo.png)
tests.java.org.python.tests.multihidden.BaseConnection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jython-installer Show documentation
Show all versions of jython-installer Show documentation
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.
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