From: Finn B. <bc...@us...> - 2001-02-25 16:50:41
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv1669 Modified Files: PyLong.java PyMethod.java PyProxy.java PyRunnable.java PySlice.java PyString.java PyStringMap.java PySystemState.java PyTableCode.java PyTraceback.java PyTuple.java __builtin__.java codecs.java Log Message: Added javadoc comments. Index: PyLong.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyLong.java,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** PyLong.java 2001/02/07 09:23:52 2.10 --- PyLong.java 2001/02/25 16:51:51 2.11 *************** *** 5,8 **** --- 5,13 ---- import java.io.Serializable; + /** + * A builtin python long. This is implemented as a + * java.math.BigInteger. + */ + public class PyLong extends PyObject { Index: PyMethod.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyMethod.java,v retrieving revision 2.11 retrieving revision 2.12 diff -C2 -r2.11 -r2.12 *** PyMethod.java 2001/02/02 09:28:37 2.11 --- PyMethod.java 2001/02/25 16:51:51 2.12 *************** *** 2,5 **** --- 2,9 ---- package org.python.core; + /** + * A python method. + */ + public class PyMethod extends PyObject { Index: PyProxy.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyProxy.java,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** PyProxy.java 2001/02/14 22:27:32 2.5 --- PyProxy.java 2001/02/25 16:51:51 2.6 *************** *** 2,15 **** --- 2,62 ---- package org.python.core; + /** + * Common methods for all generated proxy classes. + * + * Proxies classes are created whenever a python class inherit + * from a java class. Instances of such a python class consists + * of two objects + * <ul> + * <li>An instance of the proxy class. The _getPyInstance() will + * return a reference to the PyInstance. + * <li>An instance of PyInstance. The PyInstance.javaProxy contain + * a reference to the proxy class instance. + * </ul> + * + * All proxy classes, both dynamicly generated and staticly + * generated by jythonc implements this interface. + */ + // This interface should be applicable to ANY class // Choose names that are extremely unlikely to have conflicts public interface PyProxy { + /** + * Associate an PyInstance with this proxy instance. + * This is done during construction and initialization + * of the proxy instance. + */ abstract public void _setPyInstance(PyInstance proxy); + + /** + * Return the associated PyInstance instance. + */ abstract public PyInstance _getPyInstance(); + /** + * Associate an system state with this proxy instance. + * This is done during construction and initialization + * of the proxy instance. + */ abstract public void _setPySystemState(PySystemState ss); + + /** + * Return the associated system state. + */ abstract public PySystemState _getPySystemState(); + /** + * Initialize the proxy instance. If the proxy have not + * been initialized already, this call will call the + * python constructor with the auplied arguments. + * <p> + * In some situations is it necesary to call the __initProxy__ + * method from the java superclass ctor before the ctor makes + * call to methods that is overriden in python. + * <p> + * In most sitation the __initProxy__ is called automticly + * by the jython runtime. + */ abstract public void __initProxy__(Object[] args); } Index: PyRunnable.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyRunnable.java,v retrieving revision 2.0 retrieving revision 2.1 diff -C2 -r2.0 -r2.1 *** PyRunnable.java 1999/04/14 18:27:02 2.0 --- PyRunnable.java 2001/02/25 16:51:51 2.1 *************** *** 2,6 **** --- 2,14 ---- package org.python.core; + /** + * Interface implemented by compiled modules which allow access to + * to the module code object. + */ + public interface PyRunnable { + /** + * Return the modules code object. + */ abstract public PyCode getMain(); } Index: PySlice.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PySlice.java,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** PySlice.java 1999/05/18 17:44:35 2.2 --- PySlice.java 2001/02/25 16:51:51 2.3 *************** *** 2,5 **** --- 2,10 ---- package org.python.core; + + /** + * A python slice object. + */ + public class PySlice extends PyObject { public PyObject start, stop, step; Index: PyString.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyString.java,v retrieving revision 2.40 retrieving revision 2.41 diff -C2 -r2.40 -r2.41 *** PyString.java 2001/02/16 18:12:02 2.40 --- PyString.java 2001/02/25 16:51:51 2.41 *************** *** 226,229 **** --- 226,232 ---- + /** + * A builtin python string. + */ public class PyString extends PySequence implements ClassDictInit { Index: PyStringMap.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyStringMap.java,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** PyStringMap.java 2001/02/02 09:28:37 2.9 --- PyStringMap.java 2001/02/25 16:51:51 2.10 *************** *** 2,5 **** --- 2,11 ---- package org.python.core; + /** + * A faster Dictionary where the keys have to be strings. + * <p> + * This is the default for all __dict__ instances. + */ + public class PyStringMap extends PyObject { Index: PySystemState.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PySystemState.java,v retrieving revision 2.49 retrieving revision 2.50 diff -C2 -r2.49 -r2.50 *** PySystemState.java 2001/02/22 11:10:38 2.49 --- PySystemState.java 2001/02/25 16:51:51 2.50 *************** *** 9,12 **** --- 9,16 ---- import org.python.modules.Setup; + /** + * The "sys" module. + */ + public class PySystemState extends PyObject { Index: PyTableCode.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyTableCode.java,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** PyTableCode.java 2001/02/02 09:28:37 2.10 --- PyTableCode.java 2001/02/25 16:51:51 2.11 *************** *** 2,5 **** --- 2,10 ---- package org.python.core; + /** + * An implementation of PyCode where the actual executable content + * is stored as a PyFunctionTable instance and an integer index. + */ + public class PyTableCode extends PyCode { Index: PyTraceback.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyTraceback.java,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** PyTraceback.java 2000/01/17 21:56:53 2.2 --- PyTraceback.java 2001/02/25 16:51:51 2.3 *************** *** 2,5 **** --- 2,9 ---- package org.python.core; + /** + * A python traceback object. + */ + public class PyTraceback extends PyObject { Index: PyTuple.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyTuple.java,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** PyTuple.java 2001/02/01 16:41:11 2.7 --- PyTuple.java 2001/02/25 16:51:51 2.8 *************** *** 33,36 **** --- 33,40 ---- + /** + * A builtin python tuple. + */ + public class PyTuple extends PySequence implements ClassDictInit { Index: __builtin__.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/__builtin__.java,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** __builtin__.java 2001/02/16 18:12:42 2.29 --- __builtin__.java 2001/02/25 16:51:51 2.30 *************** *** 103,106 **** --- 103,109 ---- + /** + * The builtin module. All builtin functions are defined here + */ public class __builtin__ implements ClassDictInit { Index: codecs.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/codecs.java,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** codecs.java 2001/02/02 09:28:37 2.8 --- codecs.java 2001/02/25 16:51:51 2.9 *************** *** 9,12 **** --- 9,16 ---- package org.python.core; + /** + * Contains the implementation of the builtin codecs. + * @since Jython 2.0 + */ public class codecs { *************** *** 16,21 **** private static PyStringMap searchCache = new PyStringMap(); - - private static String default_encoding = "ascii"; --- 20,23 ---- *************** *** 29,34 **** } - - public static void register(PyObject search_function) { if (!search_function.isCallable()) --- 31,34 ---- *************** *** 68,74 **** } - - - private static String normalizestring(String string) { return string.toLowerCase().replace(' ', '-'); --- 68,71 ---- *************** *** 89,96 **** } } - - - - --- 86,89 ---- |