Source Code Cross Referenced for PyProperty.java in  » Testing » Marathon » org » python » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » Marathon » org.python.core 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.python.core;
002:
003:        public class PyProperty extends PyObject implements  PyType.Newstyle {
004:            //~ BEGIN GENERATED REGION -- DO NOT EDIT SEE gexpose.py
005:            /* type info */
006:
007:            public static final String exposed_name = "property";
008:
009:            public static void typeSetup(PyObject dict, PyType.Newstyle marker) {
010:                dict.__setitem__("fget", new PyGetSetDescr("fget",
011:                        PyProperty.class, "getFget", "setFget", null));
012:                dict.__setitem__("fset", new PyGetSetDescr("fset",
013:                        PyProperty.class, "getFset", "setFset", null));
014:                dict.__setitem__("fdel", new PyGetSetDescr("fdel",
015:                        PyProperty.class, "getFdel", "setFdel", null));
016:                dict.__setitem__("__doc__", new PyGetSetDescr("__doc__",
017:                        PyProperty.class, "getDoc", "setDoc", null));
018:                class exposed___get__ extends PyBuiltinMethodNarrow {
019:
020:                    exposed___get__(PyObject self, PyBuiltinFunction.Info info) {
021:                        super (self, info);
022:                    }
023:
024:                    public PyBuiltinFunction bind(PyObject self) {
025:                        return new exposed___get__(self, info);
026:                    }
027:
028:                    public PyObject __call__(PyObject arg0, PyObject arg1) {
029:                        PyObject obj = (arg0 == Py.None) ? null : arg0;
030:                        PyObject type = (arg1 == null) ? obj : arg1;
031:                        return ((PyProperty) self).property___get__(obj, type);
032:                    }
033:
034:                    public PyObject __call__(PyObject arg0) {
035:                        PyObject obj = (arg0 == Py.None) ? null : arg0;
036:                        PyObject type = ((null) == null) ? obj : (null);
037:                        return ((PyProperty) self).property___get__(obj, type);
038:                    }
039:
040:                }
041:                dict.__setitem__("__get__",
042:                        new PyMethodDescr("__get__", PyProperty.class, 1, 2,
043:                                new exposed___get__(null, null)));
044:                class exposed___set__ extends PyBuiltinMethodNarrow {
045:
046:                    exposed___set__(PyObject self, PyBuiltinFunction.Info info) {
047:                        super (self, info);
048:                    }
049:
050:                    public PyBuiltinFunction bind(PyObject self) {
051:                        return new exposed___set__(self, info);
052:                    }
053:
054:                    public PyObject __call__(PyObject arg0, PyObject arg1) {
055:                        ((PyProperty) self).property___set__(arg0, arg1);
056:                        return Py.None;
057:                    }
058:
059:                }
060:                dict.__setitem__("__set__",
061:                        new PyMethodDescr("__set__", PyProperty.class, 2, 2,
062:                                new exposed___set__(null, null)));
063:                class exposed___delete__ extends PyBuiltinMethodNarrow {
064:
065:                    exposed___delete__(PyObject self,
066:                            PyBuiltinFunction.Info info) {
067:                        super (self, info);
068:                    }
069:
070:                    public PyBuiltinFunction bind(PyObject self) {
071:                        return new exposed___delete__(self, info);
072:                    }
073:
074:                    public PyObject __call__(PyObject arg0) {
075:                        ((PyProperty) self).property___delete__(arg0);
076:                        return Py.None;
077:                    }
078:
079:                }
080:                dict.__setitem__("__delete__", new PyMethodDescr("__delete__",
081:                        PyProperty.class, 1, 1, new exposed___delete__(null,
082:                                null)));
083:                class exposed___init__ extends PyBuiltinMethod {
084:
085:                    exposed___init__(PyObject self, PyBuiltinFunction.Info info) {
086:                        super (self, info);
087:                    }
088:
089:                    public PyBuiltinFunction bind(PyObject self) {
090:                        return new exposed___init__(self, info);
091:                    }
092:
093:                    public PyObject __call__(PyObject[] args) {
094:                        return __call__(args, Py.NoKeywords);
095:                    }
096:
097:                    public PyObject __call__(PyObject[] args, String[] keywords) {
098:                        ((PyProperty) self).property_init(args, keywords);
099:                        return Py.None;
100:                    }
101:
102:                }
103:                dict.__setitem__("__init__", new PyMethodDescr("__init__",
104:                        PyProperty.class, -1, -1, new exposed___init__(null,
105:                                null)));
106:                dict.__setitem__("__new__", new PyNewWrapper(PyProperty.class,
107:                        "__new__", -1, -1) {
108:
109:                    public PyObject new_impl(boolean init, PyType subtype,
110:                            PyObject[] args, String[] keywords) {
111:                        PyProperty newobj;
112:                        if (for_type == subtype) {
113:                            newobj = new PyProperty();
114:                            if (init)
115:                                newobj.property_init(args, keywords);
116:                        } else {
117:                            newobj = new PyPropertyDerived(subtype);
118:                        }
119:                        return newobj;
120:                    }
121:
122:                });
123:            }
124:
125:            //~ END GENERATED REGION -- DO NOT EDIT SEE gexpose.py
126:
127:            private static final PyType PROPERTYTYPE = PyType
128:                    .fromClass(PyProperty.class);
129:
130:            protected PyObject fget;
131:            protected PyObject fset;
132:            protected PyObject fdel;
133:            protected PyObject doc;
134:
135:            public PyProperty() {
136:                this (PROPERTYTYPE);
137:            }
138:
139:            public PyProperty(PyType subType) {
140:                super (subType);
141:            }
142:
143:            public PyObject getDoc() {
144:                return doc;
145:            }
146:
147:            public PyObject getFdel() {
148:                return fdel;
149:            }
150:
151:            public PyObject getFset() {
152:                return fset;
153:            }
154:
155:            public PyObject getFget() {
156:                return fget;
157:            }
158:
159:            // These methods are to conform to test_descr.py
160:            // However I believe that this should be fixed through
161:            // PyGetSetDescr.java instead
162:            // Carlos Quiroz: 19.11.2005
163:            public void setFget(PyObject py) {
164:                throw Py.TypeError("readonly attribute");
165:            }
166:
167:            public void setFset(PyObject py) {
168:                throw Py.TypeError("readonly attribute");
169:            }
170:
171:            public void setFdel(PyObject py) {
172:                throw Py.TypeError("readonly attribute");
173:            }
174:
175:            public void setDoc(PyObject py) {
176:                throw Py.TypeError("readonly attribute");
177:            }
178:
179:            public void property_init(PyObject[] args, String[] keywords) {
180:                ArgParser argparse = new ArgParser("property", args, keywords,
181:                        new String[] { "fget", "fset", "fdel", "doc" }, 0);
182:                fget = argparse.getPyObject(0, null);
183:                fget = fget == Py.None ? null : fget;
184:                fset = argparse.getPyObject(1, null);
185:                fset = fset == Py.None ? null : fset;
186:                fdel = argparse.getPyObject(2, null);
187:                fdel = fdel == Py.None ? null : fdel;
188:                doc = argparse.getPyObject(3, null);
189:            }
190:
191:            public PyObject __call__(PyObject arg1, PyObject args[],
192:                    String keywords[]) {
193:                return fget.__call__(arg1);
194:            }
195:
196:            public PyObject __get__(PyObject obj, PyObject type) {
197:                return property___get__(obj, type);
198:            }
199:
200:            final PyObject property___get__(PyObject obj, PyObject type) {
201:                if (obj == null || null == Py.None)
202:                    return this ;
203:                if (fget == null)
204:                    throw Py.AttributeError("unreadable attribute");
205:                return fget.__call__(obj);
206:            }
207:
208:            public void __set__(PyObject obj, PyObject value) {
209:                property___set__(obj, value);
210:            }
211:
212:            final void property___set__(PyObject obj, PyObject value) {
213:                if (fset == null)
214:                    throw Py.AttributeError("can't set attribute");
215:                fset.__call__(obj, value);
216:            }
217:
218:            public void __delete__(PyObject obj) {
219:                property___delete__(obj);
220:            }
221:
222:            final void property___delete__(PyObject obj) {
223:                if (fdel == null)
224:                    throw Py.AttributeError("can't delete attribute");
225:                fdel.__call__(obj);
226:            }
227:
228:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.