1313import java .io .Serializable ;
1414import java .io .StreamCorruptedException ;
1515import java .lang .reflect .InvocationTargetException ;
16+ import java .lang .reflect .Method ;
1617import java .sql .Date ;
1718import java .sql .Time ;
1819import java .sql .Timestamp ;
2324import com .kenai .constantine .platform .Errno ;
2425import java .util .ArrayList ;
2526import java .util .List ;
26- import org .python .compiler .Module ;
2727import org .python .core .adapter .ClassicPyObjectAdapter ;
2828import org .python .core .adapter .ExtensiblePyObjectAdapter ;
2929import org .python .util .Generic ;
@@ -481,7 +481,7 @@ public static <T> T tojava(PyObject o, Class<T> c) {
481481 // ??pending: was @deprecated but is actually used by proxie code.
482482 // Can get rid of it?
483483 public static Object tojava (PyObject o , String s ) {
484- Class c = findClass (s );
484+ Class <?> c = findClass (s );
485485 if (c == null ) {
486486 throw Py .TypeError ("can't convert to: " + s );
487487 }
@@ -663,15 +663,13 @@ public static PyCode newCode(int argcount, String varnames[],
663663 funcs , func_id );
664664 }
665665
666- public static PyCode newJavaCode (Class cls , String name ) {
666+ public static PyCode newJavaCode (Class <?> cls , String name ) {
667667 return new JavaCode (newJavaFunc (cls , name ));
668668 }
669669
670- public static PyObject newJavaFunc (Class cls , String name ) {
670+ public static PyObject newJavaFunc (Class <?> cls , String name ) {
671671 try {
672- java .lang .reflect .Method m = cls .getMethod (name , new Class []{
673- PyObject [].class , String [].class
674- });
672+ Method m = cls .getMethod (name , new Class <?>[]{PyObject [].class , String [].class });
675673 return new JavaFunc (m );
676674 } catch (NoSuchMethodException e ) {
677675 throw Py .JavaError (e );
@@ -1510,10 +1508,6 @@ protected static void setAdapter(ExtensiblePyObjectAdapter adapter) {
15101508 */
15111509 private static ExtensiblePyObjectAdapter adapter ;
15121510
1513- private static Class [] pyClassCtrSignature = {
1514- String .class , PyTuple .class , PyObject .class , Class .class
1515- };
1516-
15171511 // XXX: The following two makeClass overrides are *only* for the
15181512 // old compiler, they should be removed when the newcompiler hits
15191513 public static PyObject makeClass (String name , PyObject [] bases ,
@@ -1939,6 +1933,7 @@ public FixedFileWrapper(PyObject file) {
19391933 }
19401934 }
19411935
1936+ @ Override
19421937 protected PyObject myFile () {
19431938 return file ;
19441939 }
@@ -1958,46 +1953,54 @@ public JavaCode(PyObject func) {
19581953 }
19591954 }
19601955
1956+ @ Override
19611957 public PyObject call (ThreadState state , PyFrame frame , PyObject closure ) {
19621958 //XXX: what the heck is this? Looks like debug code, but it's
19631959 // been here a long time...
19641960 System .out .println ("call #1" );
19651961 return Py .None ;
19661962 }
19671963
1964+ @ Override
19681965 public PyObject call (ThreadState state , PyObject args [], String keywords [],
19691966 PyObject globals , PyObject [] defaults ,
19701967 PyObject closure ) {
19711968 return func .__call__ (args , keywords );
19721969 }
19731970
1971+ @ Override
19741972 public PyObject call (ThreadState state , PyObject self , PyObject args [], String keywords [],
19751973 PyObject globals , PyObject [] defaults ,
19761974 PyObject closure ) {
19771975 return func .__call__ (self , args , keywords );
19781976 }
19791977
1978+ @ Override
19801979 public PyObject call (ThreadState state , PyObject globals , PyObject [] defaults ,
19811980 PyObject closure ) {
19821981 return func .__call__ ();
19831982 }
19841983
1984+ @ Override
19851985 public PyObject call (ThreadState state , PyObject arg1 , PyObject globals ,
19861986 PyObject [] defaults , PyObject closure ) {
19871987 return func .__call__ (arg1 );
19881988 }
19891989
1990+ @ Override
19901991 public PyObject call (ThreadState state , PyObject arg1 , PyObject arg2 , PyObject globals ,
19911992 PyObject [] defaults , PyObject closure ) {
19921993 return func .__call__ (arg1 , arg2 );
19931994 }
19941995
1996+ @ Override
19951997 public PyObject call (ThreadState state , PyObject arg1 , PyObject arg2 , PyObject arg3 ,
19961998 PyObject globals , PyObject [] defaults ,
19971999 PyObject closure ) {
19982000 return func .__call__ (arg1 , arg2 , arg3 );
19992001 }
20002002
2003+ @ Override
20012004 public PyObject call (ThreadState state , PyObject arg1 , PyObject arg2 ,
20022005 PyObject arg3 , PyObject arg4 , PyObject globals ,
20032006 PyObject [] defaults , PyObject closure ) {
@@ -2011,12 +2014,13 @@ public PyObject call(ThreadState state, PyObject arg1, PyObject arg2,
20112014 */
20122015class JavaFunc extends PyObject {
20132016
2014- java . lang . reflect . Method method ;
2017+ Method method ;
20152018
2016- public JavaFunc (java . lang . reflect . Method method ) {
2019+ public JavaFunc (Method method ) {
20172020 this .method = method ;
20182021 }
20192022
2023+ @ Override
20202024 public PyObject __call__ (PyObject [] args , String [] kws ) {
20212025 Object [] margs = new Object []{args , kws };
20222026 try {
@@ -2026,10 +2030,12 @@ public PyObject __call__(PyObject[] args, String[] kws) {
20262030 }
20272031 }
20282032
2033+ @ Override
20292034 public PyObject _doget (PyObject container ) {
20302035 return _doget (container , null );
20312036 }
20322037
2038+ @ Override
20332039 public PyObject _doget (PyObject container , PyObject wherefound ) {
20342040 if (container == null ) {
20352041 return this ;
0 commit comments