You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Synthesize the ObjectInstantiator instance, so it does what you attempted (manually invoking the desired constructor), and having it extend sun.reflect.MagicAccessorImpl, as its subclasses are not subject to the regular bytecode verification, and allow you to do it without globally disabling the verifier.
MagicAccessorImpl is package scope, however, its 'no verifier' property means you can create subclasses outside of the package.
I am using ASM to generate the ObjectInstantiator instance. This is a relatively performance-heavy operation, but seeing as instantiator instances are cached by default, this should provide performance similar to the other instantiators.
The text was updated successfully, but these errors were encountered:
@jcarvalho BTW, I don't know if you had a look at the final version. Instead of having a special strategy, I'm using delegation in the instantiator to create the magic one
New issue created from issue #23 comment #23 (comment)
Synthesize the ObjectInstantiator instance, so it does what you attempted (manually invoking the desired constructor), and having it extend sun.reflect.MagicAccessorImpl, as its subclasses are not subject to the regular bytecode verification, and allow you to do it without globally disabling the verifier.
MagicAccessorImpl
is package scope, however, its 'no verifier' property means you can create subclasses outside of the package.You can find the prototype here. The interesting part is in the MagicInstantiatorStrategy class.
I am using ASM to generate the
ObjectInstantiator
instance. This is a relatively performance-heavy operation, but seeing as instantiator instances are cached by default, this should provide performance similar to the other instantiators.The text was updated successfully, but these errors were encountered: