vendredi 1 septembre 2017

How to create or retrieve a StackMapTable in Javassist

In the javassist API it seems there is no direct way to add anything by hand in the CodeAttribute property.

Given this example:

CtMethod m;
m.getMethodInfo().getCodeAttribute().setAttribute(???);

this seems to be the only way to alter attributes. But, neither is possible to retrieve the original attributes and modify them (it returns a list od AttributeInfo), nor a public constructor exists for StackMapTable, which seems to be the only accepted input.

Anyone knows how to do something like this?





Aucun commentaire:

Enregistrer un commentaire