com.vaadin.server.

Class AbstractExtension

    • Constructor Detail

      • AbstractExtension

        public AbstractExtension()

        Creates a new extension instance without extending any connector.

      • AbstractExtension

        public AbstractExtension​(AbstractClientConnector target)

        Creates a new extension instance that extends the provided connector.

        Parameters:

        target - the connector to extend

        Since:

        7.4

    • Method Detail

      • getSupportedParentType

        protected Class<? extends ClientConnector> getSupportedParentType()

        Gets a type that the parent must be an instance of. Override this if the extension only support certain targets, e.g. if only TextFields can be extended.

        Returns:

        a type that the parent must be an instance of

      • extend

        protected void extend​(AbstractClientConnector target)

        Add this extension to the target connector. This method is protected to allow subclasses to require a more specific type of target.

        Parameters:

        target - the connector to attach this extension to

      • remove

        public void remove()

        Description copied from interface: Extension

        Remove this extension from its target. After an extension has been removed, it cannot be attached again.

        Specified by:

        remove in interface Extension

      • getParent

        public ClientConnector getParent()

        Description copied from interface: Connector

        Gets the parent connector of this connector, or null if the connector is not attached to any parent.

        Specified by:

        getParent in interface ClientConnector

        Specified by:

        getParent in interface Connector

        Returns:

        the parent connector, or null if there is no parent.