File tree Expand file tree Collapse file tree 4 files changed +44
-1
lines changed
Expand file tree Collapse file tree 4 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 9797methodPrologueHandlers = [
9898 basic .maybeAbstractMethod ,
9999 basic .maybeClassMethod ,
100+ basic .overloadedClassMethods ,
100101 # NB: synchronized should come after classmethod
101102 basic .maybeSynchronizedMethod ,
102- basic .overloadedClassMethods ,
103103]
104104
105105
Original file line number Diff line number Diff line change 1+ class classmethod_ (classmethod ):
2+ """ Classmethod that provides attribute delegation.
3+
4+ """
5+ def __getattr__ (self , name ):
6+ return getattr (self .__func__ , name )
Original file line number Diff line number Diff line change 1+ class Synchronized2 {
2+
3+ public synchronized void test1 () {
4+ System .out .println (1 );
5+ }
6+
7+ public synchronized void test1 (String s ) {
8+ System .out .println (s );
9+ }
10+
11+ public static synchronized void test1 (int i ) {
12+ System .out .println (i );
13+ }
14+
15+ public static synchronized void test2 () {
16+ System .out .println (2 );
17+ }
18+
19+ public static synchronized void test2 (String s ) {
20+ System .out .println (s );
21+ }
22+
23+ public synchronized void test2 (int i ) {
24+ System .out .println (i );
25+ }
26+
27+ public static void main (String [] args ) {
28+ Synchronized2 obj = new Synchronized2 ();
29+ obj .test1 ();
30+ obj .test1 ("test1" );
31+ obj .test1 (1 );
32+ obj .test2 ();
33+ obj .test2 ("test2" );
34+ obj .test2 (2 );
35+ }
36+ }
Original file line number Diff line number Diff line change 44
55
66modulePrologueHandlers = default .modulePrologueHandlers + [
7+ 'from java2python.mod.include.classmethod import classmethod_ as classmethod' ,
78 'from java2python.mod.include.overloading import overloaded' ,
89 'from abc import ABCMeta, abstractmethod' ,
910 'import zope.interface' ,
You can’t perform that action at this time.
0 commit comments