Posts

ANTLR Mega Tutorial

The ANTLR Mega Tutorial

Parsers are powerful tools, and using ANTLR you could write all sort of parsers, usable from many different languages. In this complete tutorial we are going to: explain the basics: what a parser is, what it can be used for see how to setup ANTLR to be used from Javascript, Python, Java and C# discuss […]

Resolve method calls in Java code using the JavaSymbolSolver

Why I created the java-symbol-solver? A few years ago I started using JavaParser and then I started contributing. After a while I realized that many operations we want to do on Java code cannot be done just by using the Abstract Syntax Tree produced by a parser, we need also to resolve types, symbols and […]

Functional programming for Java: getting started with Javaslang

Functional programming for Java: getting started with Javaslang

Java is an old language and there are many new kids in the block who are challenging it on its own terrain (the JVM). However Java 8 arrived and brought a couple of interesting features. Those interesting features enabled the possibility of writing new amazing frameworks like the Spark web framework or Javaslang. In this post […]

How to build a symbol solver for Java, in Clojure

How to Build a Symbol Solver for Java, in Clojure

Last week we have seen how to build models of Java code from source and JAR files. Now we want to be able to solve symbols: in practice we want to link the symbol references in our source code to symbol declarations either in Java source files or jar files. This process is called symbol […]

Effective Java: a tool to explore and measure your Java code written in Clojure

Effective Java: a Tool to Explore and Measure Your Java Code

When I was working at TripAdvisor we had this internal book club. We started by reading Effective Java, this very famous book from Joshua Bloch. It is interesting and all but I think this book was so successful that most of his advices are now part of the Java culture: most of Java developers know them and sort […]

Mocking in Java: why mocking, why not mocking, mocking also those awful private static methods

Mocking in Java: Why, Why Not and Also Those Awful Private Static Methods

Unit tests: there are people out there surviving without, but in many cases you wanr to have this life insurance. Something to protect you from slipping an error, something to accompany your software also when you will have long forgotten it and someone else will have to figure out how to maintain that legacy thing. […]