concept interface in category clojure

This is an excerpt from Manning's book Clojure in Action, Second Edition.
Java is an object-oriented language based on a class hierarchy with single inheritance. In addition to classes, common behaviors can be grouped into interfaces, which act as simple outlines of method signatures that classes that implement the interface must support.[7] Only one public class or interface can be defined in a single file, and those files must be placed in directories that are on Java’s classpath. The Java classpath is akin to C’s search path or Ruby’s $LOAD_PATH in that it’s a collection of directories that the Java compiler will search when looking for files to compile as part of your program. The fully qualified name of a Java class or interface consists of its package name followed by the name of the class or interface being defined; for example, Java’s Math class is situated in the java.lang package. This allows individual classes to share the same name (for example, Math) as long as they aren’t in the same package and thus have a unique full name when loaded into the JVM (for example, java.lang.Math vs. com.mycompany.Math).
7Java 8 introduced default methods for interfaces. Because, as of this writing, Clojure currently targets Java 6 as its minimum target version, we’ll continue to treat interfaces as simple method contracts without default implementations.
Implementing interfaces and extending classes
This shows that the proxy form accepts a vector of Java classes and interfaces, followed by a vector of arguments (possibly empty) that will be passed to the superclass constructor, followed by any methods being defined. In the previous example, the MouseAdapter interface is specified, and the method mousePressed is implemented.

This is an excerpt from Manning's book The Joy of Clojure, Second Edition.
Polymorphism is the ability of a function or method to perform different actions depending on the type of its arguments or a target object. Clojure provides polymorphism via protocols,[13] which let you attach a set of behaviors to any number of existing types and classes; they’re similar to what are sometimes called mix-ins, traits, or interfaces in other languages and are more open and extensible than polymorphism in many languages.
Clojure’s proxy mechanism is meant strictly for interoperability purposes. In section 9.3, we discuss how reify is intended to realize a single instance of a type, protocol, or interface—in other words, abstractions. But when dealing with Java libraries, you’re at times required to extend concrete classes, and it’s in this circumstance where proxy shines. Be aware that by using proxy, you bring a lot of Java’s semantics into your Clojure programs. Although extending concrete classes is seen often in Java, doing so in Clojure is considered poor design,[2] leading to fragility, and should therefore be restricted to those instances where interoperability demands it.
Listing 12.10. DynaFrame class ns block showing rich gen-class usage
(ns joy.gui.DynaFrame (:gen-class :name joy.gui.DynaFrame :extends javax.swing.JFrame #1 :implements [clojure.lang.IMeta] #2 :prefix df- :state state #3 :init init #4 :constructors {[String] [String] #5 [] [String]} :methods [[display [java.awt.Container] void] #6 ^{:static true} [version [] String]]) #7 (:import (javax.swing JFrame JPanel JComponent) (java.awt BorderLayout Container))) #1 - :extends flag names the superclass that this namespace extends. Java allows only one superclass. #2 - :implements flag names a vector of interfaces that this namespace implements. Java allows a class to implement the methods of any number of interfaces, but here you only implement one. #3 - Instances can hold some state, and the :state flag names the var that holds the state data. #4 - :init flag names an initializer function that’s called after an instance of the class that this namespace implements is instantiated. #5 - :constructors flag expects a mapping of the class constructors to the superclass constructors. You define a mapping for two constructors: one takes a String type and delegates to the constructor for javax.swing.JFrame, which also takes a String; the other takes no arguments and also maps to the superclass String constructor. #6 - :methods flag names the public methods that will be available on the joy.gui.DynaFrame class implemented by this namespace. display takes a java.awt.Container object and returns nothing. #7 - version takes nothing and returns a String object. ^{:static true} on the vector describing version indicates that the method is static or available on the class itself rather than its instances. !@%STYLE%@! {"css":"{\"css\": \"font-weight: bold;\"}","target":"[]"} !@%STYLE%@!
When you AOT-compile a protocol, you generate a public interface by the same name, with the methods defined. The code in the following listing uses definterface to define an interface ISliceable. This interface is used to define an abstract thing that has the ability to be sliced using a method slice, which takes start and end indices of type int. Likewise, the interface defines a method sliceCount that returns an int representing the number of possible slices.