Author babelmania
Recipients babelmania
Date 2010-05-11.15:57:33
SpamBayes Score 2.84384e-13
Marked as misclassified No
Message-id <>
Tested with 2.5.1.  See also issue 1467.

bash$ CLASSPATH=bin jython 
Traceback (most recent call last):
  File "", line 3, in <module>
    xxx = ParameterImpl(valueType = String)
AttributeError: read-only attr: valueType
$ cat 
from foo import ParameterImpl
from java.lang import String
xxx = ParameterImpl(valueType = String)

This is a result of a base class implementing methods which a derived class inherits at the same time that the derived class implements an interface which has a method with exactly the same name.

// *** src/foo/ ***
package foo;
public interface Parameter {
    public Class<?> getValueType();
// *** src/foo/ ***
package foo;

 * This is a baseclass which does NOT implement Parameter
 * @author jbakker
public class BareBase  {

    private Class<?> _valueType;

    public void setValueType(Class<?> type) throws NullPointerException {
        _valueType = type;

    public Class<?> getValueType() {
        return _valueType;

}// *** src/foo/ ***
package foo;
public class ParameterImpl extends BareBase implements Parameter {

public abstract class BareBase implements Parameter

(but this is not always possible and I believe the original construct is correct. Also note that it worked under Jython 2.1 and we are not always allowed to change the code)


workaround: making the baseclass abstract and  'implements interface'
Date User Action Args
2010-05-11 15:57:35babelmaniasetrecipients: + babelmania
2010-05-11 15:57:35babelmaniasetmessageid: <>
2010-05-11 15:57:34babelmanialinkissue1610 messages
2010-05-11 15:57:33babelmaniacreate