Source Code Cross Referenced for PyClassMethod.java in  » Scripting » jython » 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 » Scripting » jython » org.python.core 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        package org.python.core;
02:
03:        public class PyClassMethod extends PyObject implements  PyType.Newstyle {
04:            // xxx __init__
05:
06:            //~ BEGIN GENERATED REGION -- DO NOT EDIT SEE gexpose.py
07:            /* type info */
08:
09:            public static final String exposed_name = "classmethod";
10:
11:            public static void typeSetup(PyObject dict, PyType.Newstyle marker) {
12:                class exposed___get__ extends PyBuiltinMethodNarrow {
13:
14:                    exposed___get__(PyObject self, PyBuiltinFunction.Info info) {
15:                        super (self, info);
16:                    }
17:
18:                    public PyBuiltinFunction bind(PyObject self) {
19:                        return new exposed___get__(self, info);
20:                    }
21:
22:                    public PyObject __call__(PyObject arg0, PyObject arg1) {
23:                        return ((PyClassMethod) self).classmethod___get__(arg0,
24:                                arg1);
25:                    }
26:
27:                    public PyObject __call__(PyObject arg0) {
28:                        return ((PyClassMethod) self).classmethod___get__(arg0);
29:                    }
30:
31:                }
32:                dict.__setitem__("__get__", new PyMethodDescr("__get__",
33:                        PyClassMethod.class, 1, 2, new exposed___get__(null,
34:                                null)));
35:                dict.__setitem__("__new__", new PyNewWrapper(
36:                        PyClassMethod.class, "__new__", 1, 1) {
37:
38:                    public PyObject new_impl(boolean init, PyType subtype,
39:                            PyObject[] args, String[] keywords) {
40:                        return classmethod_new(this , init, subtype, args,
41:                                keywords);
42:                    }
43:
44:                });
45:            }
46:
47:            //~ END GENERATED REGION -- DO NOT EDIT SEE gexpose.py
48:
49:            protected PyObject callable;
50:
51:            public PyClassMethod(PyObject callable) {
52:                if (!callable.isCallable()) {
53:                    throw Py.TypeError("'" + callable.getType().fastGetName()
54:                            + "' object is not callable");
55:                }
56:                this .callable = callable;
57:            }
58:
59:            public PyObject __get__(PyObject obj) {
60:                return classmethod___get__(obj, null);
61:            }
62:
63:            public PyObject __get__(PyObject obj, PyObject type) {
64:                return classmethod___get__(obj, type);
65:            }
66:
67:            final PyObject classmethod___get__(PyObject obj) {
68:                return classmethod___get__(obj, null);
69:            }
70:
71:            final PyObject classmethod___get__(PyObject obj, PyObject type) {
72:                if (type == null) {
73:                    type = obj.getType();
74:                }
75:                return new PyMethod(type, callable, type.getType());
76:            }
77:
78:            final static PyObject classmethod_new(PyNewWrapper new_,
79:                    boolean init, PyType subtype, PyObject[] args,
80:                    String[] keywords) {
81:                if (keywords.length != 0) {
82:                    throw Py
83:                            .TypeError("classmethod does not accept keyword arguments");
84:                }
85:                if (args.length != 1) {
86:                    throw Py.TypeError("classmethod expected 1 argument, got "
87:                            + args.length);
88:                }
89:                return new PyClassMethod(args[0]);
90:            }
91:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.