Using small, context-specific interfaces in variable declarations serves the decoupling of classes and increases a program’s flexibility. To minimize its interface, a thorough analysis of the protocol needed from a variable is required. Currently available refactorings for the extraction of interfaces leave the programmer alone with the decision which methods to include or, more problematically, which to omit: they let him choose manually from the protocol of an existing type, and only then offer to use the new interface where (if) possible. To aid the programmer in defining a new interface, we have developed a new refactoring that infers it from a variable’s declaration and automatically inserts it into the code. Categories and Subject Descriptors D.3.3 [Programming Languages]: Language Constructs and Fea