Magic records for Java