unifying pastry under a single java interface