/**
 * Copyright (c) 2017, RTE (http://www.rte-france.com)
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package com.powsybl.commons.extensions;

/**
 * Extension data for extendables.
 * <p>
 * A generic Extension interface should have a generic static method called
 * "clazz" returning its .class as a generic type with a wildcard bounded to the
 * expected extendables to allow clients to type check that they are using the
 * correct Extension for an extendable. For example,
 *
 * <pre>
 * public interface ConnectablePosition<C extends Connectable<C> extends Extension<C> {
 *
 * //repeat the bounds "<C extends Connectable>" bounds here here
 * <C extends Connectable<C>> Class<ConnectablePosition<C>> clazz() {
 *     return Class<ConnectablePosition<C>> (Class) ConnectablePosition.class;
 * }
 *
 * [...]
 * }
 * </pre>
 *
 * @author Mathieu Bague <mathieu.bague at rte-france.com>
 */
public interface Extension<T> {

    /**
     * Return the name of this extension.
     */
    String getName();

    /**
     * Return the holder of this extension
     *
     * @return the holder of this extension or null if this extension is not holded
     */
    T getExtendable();

    /**
     * Set the holder of this extension.
     *
     * @param extendable The new holder of this extension, could be null
     * @throws a PowsyblException if this extension is already holded.
     */
    void setExtendable(T extendable);

}

@@ -342,654 +342,8 @@
 es.%0A
- * %3Cp%3E%0A * A generic Extension interface should have a generic static method called%0A * %22clazz%22 returning its .class as a generic type with a wildcard bounded to the%0A * expected extendables to allow clients to type check that they are using the%0A * correct Extension for an extendable. For example,%0A *%0A * %3Cpre%3E%0A * public interface ConnectablePosition%3CC extends Connectable%3CC%3E extends Extension%3CC%3E %7B%0A *%0A * //repeat the bounds %22%3CC extends Connectable%3E%22 bounds here here%0A * %3CC extends Connectable%3CC%3E%3E Class%3CConnectablePosition%3CC%3E%3E clazz() %7B%0A *     return Class%3CConnectablePosition%3CC%3E%3E (Class) ConnectablePosition.class;%0A * %7D%0A *%0A * %5B...%5D%0A * %7D%0A * %3C/pre%3E%0A
  *%0A 

Remove prototype docs, this was never put in place (#1298)