January 2013
Intermediate to advanced
328 pages
8h 5m
English
Imagine your boss assigns you to build a tool that generates a Java interface file from the methods in a Java class definition. Panic ensues if you’re a junior programmer. As an experienced Java developer, you might suggest using the Java reflection API or the javap tool to extract method signatures. If your Java tool building kung fu is very strong, you might even try using a bytecode library such as ASM.[19] Then your boss says, “Oh, yeah. Preserve whitespace and comments within the bounds of the method signature.” There’s no way around it now. We have to parse Java source code. For example, we’d like to read in Java code like this:
| | import java.util.List; |
| | import java.util.Map; |
| | |
Read now
Unlock full access