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
for (CtMethod cb : ct.getDeclaredMethods()) {
if ( (cb.getMethodInfo().getAccessFlags() & AccessFlag.SYNTHETIC) != 0 ) {
continue;
}
// do stuff
}
it seems that cb.getMethodInfo().getAccessFlags() is returning 8 (i.e., AccessFlag.STATIC) and cb.getMethodInfo().getAccessFlags() & AccessFlag.SYNTHETIC returns 0, for method "class$".
am I doing something wrong? how can I identify (and skip) synthetic methods?
-- Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hi,
I've been trying to write some code to skip synthetic methods, however does not seem to be working.
suppose I have the following class:
Compiling it with Java 1.4 (yeah, it has to be 1.4) I get the following bytecode:
and here the code to skip synthetic methods:
it seems that
cb.getMethodInfo().getAccessFlags()
is returning 8 (i.e., AccessFlag.STATIC) andcb.getMethodInfo().getAccessFlags() & AccessFlag.SYNTHETIC
returns 0, for method "class$".am I doing something wrong? how can I identify (and skip) synthetic methods?
-- Thanks in advance.
The text was updated successfully, but these errors were encountered: