Comments (2)
Plan of attack for this is to use decorators so that the system is entirely automated rather than a customizer class.
from jpype import SuperFor, ImplementationFor, JClass
#Insert JString into the class tree as a base class of java.lang.String
@SuperFor("java.lang.String")
class JString(JObject): # we must derive from JObject so that we will appear before it in the mro.
# This method will appear in the class tree
def doSomething(self):
pass
# All methods from this class will be copied into java.lang.Object when that class is created.
@ImplementationFor("java.lang.Object")
class MyObjectMethods(object):
# This method will appear in java.lang.Object class. It can either be a static method
# which will take either the class or the object as self or a method which will expect
# self to be an object.
def doSomething(self):
pass
To be resolved.
- Will this work with the new style of decorator that is planned for python?
- How to determine if it was called as a static method? Should be as easy as
if isinstance(self, JClass): called static
from jpype.
Completed in 0.7
from jpype.
Related Issues (20)
- Str/Unicode HOT 1
- Item check list HOT 1
- Docstring generation
- Implements
- Stack trace integration
- Auto Proxy
- Segfault on call abstract method
- Examine what is in tcalmant branch HOT 2
- No numpy checklist HOT 2
- JPype crashing with "AttributeError: _hints can't be set" HOT 33
- Task list for JPype 0.8 Release HOT 1
- Verify the behavior of underbar with Java symbols
- Check if Java primitives are closed
- See about making List satisfy Sequence contract
- Elementwise access for buffers?
- Make JChar derive from unicode
- Investigate exception reported in testDoc.py
- Getting started? HOT 4
- Speed HOT 20
- epypj master list HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpype.