Java SAM Typed Closures: A Sound and Complete Type Inference System for Nominal Types