VMF icon indicating copy to clipboard operation
VMF copied to clipboard

Add delegations to reflection API and optionally allow to configure delegation at runtime

Open miho opened this issue 6 years ago • 1 comments

miho avatar Feb 07 '19 12:02 miho

Some ideas on how the API could look like:

A a = a.newInstance();

a.vmf().reflect().methods();

Method m;

m.getName()
m.getReturnType()
m.getArgumentTypes()
m.invoke(Object... args)

a.vmf().reflect().behavior().set(myDelegate)
myDelegate = a.vmf().reflect().behavior().get()

m.behavior().set(myDelegate)
myDelegate = m.behavior().get()

How do we represent static vs. non-static behavior/delegation?

miho avatar Feb 08 '19 15:02 miho