oracle / oracle/graalpython

Exporting a method with a different name than its declaration

Open
#408 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
Python
Stars
1.6k
Forks
155
Avg merge
9h 42m
Merged PRs (30d)
36

Description

Let's say I have a Java class:

class Foo {
    public void bar() {
        System.out.println("bar");
    }
}

I want to access that bar method in python but with a different name. I swear a while ago I could do:

@HostAccess.Export(name = "barMethod")
public void bar() {
    System.out.println("bar");
}

But now the name field doesn't exist?

So then in Python it would be called with barMethod instead of bar.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the HostAccess.Export annotation and the Java-to-Python method export path described in the issue. Determine whether an exported method can receive an alias, then verify the behavior from Python; done means the Java bar method is callable as barMethod without changing its declaration.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, python
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.