JavaのClassを継承してもprotectedメソッドにアクセス出来ない。
こういう場合。
public class HasProtectedMethod { protected void protectedMethod() { System.out.println("Should allow access from child."); } }
class Child(HasProtectedMethod): def call_protected_method(self): HasProtectedMethod.protectedMethod(self) # AttributeError: type object 'HasProtectedMethod' has no attribute 'protectedMethod'
そんな時はJavaオプションに「-Dpython.security.respectJavaAccessibility=false」をつけてあげましょう。