Enhance java attributes for the java cookbook.