substitute lambda expressions for anonymous classes.