Reputation: 107
why does ASM methodnode.signature return null ? Here is my code:
public static void main(String[] args) {
try {
FileInputStream fis = new FileInputStream("Test.class");
ClassReader cr = new ClassReader(fis);
ClassNode cn = new ClassNode();
cr.accept(cn, 0);
List<MethodNode> methods = cn.methods;
for (MethodNode methodNode : methods) {
System.out.println(methodNode.signature);
}
} catch (Exception e) {
e.printStackTrace();
}
}
Upvotes: 2
Views: 665
Reputation: 43997
The signature is null to indicate that there is no generic information for this method. The signature is nothing than meta data and ignored by the Java runtime which rather looks at a method's descriptor which must never be null.
Upvotes: 2