title: How do I know if I am visiting an anonymous class in ASM?
body: <p>I have extended the ASM ClassVisitor and want to know if the visited class in an anonymous class. </p>
  
  <p>Since I do have the class file I figured that if the class file name ended with $[1-9][0-9]*.class it would be an anonymous class. But currency characters are valid in class names so for example a class named MyClass$1 would match (classfile is named MyClass$1.class) even though it is not an anonymous class. I know most people would probably not name things like this but it is allowed.</p>
  
  <p>So I thought about overriding the visitOuterClass method to see if it had an outer class that would eliminate outer classes with names ending in $# but still you could have an inner non anonymous class name ending with, for example, $1.</p>
  
  <p>So is there some way in ASM to know that it is visiting an anonymous class? Or a better trick than mine?</p>
  
  <p># means any number (regexp: [1-9][0-9]*)</p>