Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1050)

Side by Side Diff: src/com/ziclix/python/sql/connect/Connect.java

Issue 2888: __findattr__ refactor (Closed) Base URL: https://jython.svn.sourceforge.net/svnroot/jython/branches/asm
Patch Set: Created 16 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Jython Database Specification API 2.0 2 * Jython Database Specification API 2.0
3 * 3 *
4 * $Id$ 4 * $Id$
5 * 5 *
6 * Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com> 6 * Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com>
7 * 7 *
8 */ 8 */
9 package com.ziclix.python.sql.connect; 9 package com.ziclix.python.sql.connect;
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 private static final PyString _doc = new PyString("establish a connection th rough java.sql.DriverManager"); 27 private static final PyString _doc = new PyString("establish a connection th rough java.sql.DriverManager");
28 28
29 /** 29 /**
30 * Default empty constructor. 30 * Default empty constructor.
31 */ 31 */
32 public Connect() { 32 public Connect() {
33 } 33 }
34 34
35 /** 35 /**
36 * Method __findattr__ 36 * Method __findattr__
Nicholas Riley 2008/08/11 04:45:50 Comment needs updating.
Leo Soto M. 2008/08/11 22:58:47 Actually, the comment is not giving any informatio
37 * 37 *
38 * @param String name 38 * @param String name
39 * @return PyObject 39 * @return PyObject
40 */ 40 */
41 public PyObject __findattr__(String name) { 41 public PyObject __findattr_ex__(String name) {
42 42
43 if ("__doc__".equals(name)) { 43 if ("__doc__".equals(name)) {
44 return _doc; 44 return _doc;
45 } 45 }
46 46
47 return super.__findattr__(name); 47 return super.__findattr_ex__(name);
48 } 48 }
49 49
50 /** 50 /**
51 * Establish a connection through DriverManager. 51 * Establish a connection through DriverManager.
52 */ 52 */
53 public PyObject __call__(PyObject[] args, String[] keywords) { 53 public PyObject __call__(PyObject[] args, String[] keywords) {
54 54
55 Connection c = null; 55 Connection c = null;
56 PyArgParser parser = new PyArgParser(args, keywords); 56 PyArgParser parser = new PyArgParser(args, keywords);
57 Object arg = parser.arg(0).__tojava__(Connection.class); 57 Object arg = parser.arg(0).__tojava__(Connection.class);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 /** 112 /**
113 * Method toString 113 * Method toString
114 * 114 *
115 * @return String 115 * @return String
116 */ 116 */
117 public String toString() { 117 public String toString() {
118 return "<connect object instance at " + Py.id(this) + ">"; 118 return "<connect object instance at " + Py.id(this) + ">";
119 } 119 }
120 } 120 }
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b