Interface Plugin

All Known Implementing Classes:
AbstractCompositePlugin, AbstractPlugin, BackbonePlugin, EndpointExposedPlugin, EndpointModelPlugin, EndpointPlugin, EntityPlugin, JsonValuePlugin, MethodParameterPlugin, MethodPlugin, ModelPlugin, MultipartFileCheckerPlugin, NonnullPlugin, PluginManager, PropertyPlugin, SubTypesPlugin, TransferTypesPlugin, TypeSignaturePlugin

@Deprecated public interface Plugin
Deprecated.
Internal API, not deprecated for removal. The Java API of hilla-typescript-generator is used only by Hilla itself, and may change or be removed in any release without notice. Do not use it in application code or libraries. It is marked deprecated only to make the compiler warn about such use.
A part of the parser which handles one feature of the walk over the browser callable classes. For every node, the parser asks the plugins what is below it (scan(com.vaadin.hilla.parser.core.NodeDependencies)), lets them replace each node found there (resolve(com.vaadin.hilla.parser.core.Node<?, ?>, com.vaadin.hilla.parser.core.NodePath<?>)), and tells them when the walk enters and exits it (enter(com.vaadin.hilla.parser.core.NodePath<?>), exit(com.vaadin.hilla.parser.core.NodePath<?>)). Plugins build on each other through the nodes and what they say about them, not by calling each other.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    enter(NodePath<?> nodePath)
    Deprecated.
    Called on the way into a node, before the nodes below it are walked, which is where a plugin says what it knows about the node before anything below it is known.
    default void
    exit(NodePath<?> nodePath)
    Deprecated.
    Called on the way out of a node, once the nodes below it have been walked, which is where a plugin settles what depends on them.
    Deprecated.
     
    default Collection<Class<? extends Plugin>>
    Deprecated.
    The plugins which have to come before this one in the chain, which a composite plugin checks when it is created.
    default @NonNull Node<?,?>
    resolve(@NonNull Node<?,?> node, @NonNull NodePath<?> parentPath)
    Deprecated.
    Replaces a node the walk has found before it is walked, which is how a plugin says what a node really is: a type mapped to another one, or a node carrying more than the one found, such as its Kotlin reflection.
    default @NonNull NodeDependencies
    scan(@NonNull NodeDependencies nodeDependencies)
    Deprecated.
    Says what is below a node: its child nodes, walked right below it, and its related nodes, walked once below the root after everything already queued.
    void
    Deprecated.
     
    void
    Deprecated.
    Hands the plugin the configuration of the parser running it.
  • Method Details

    • enter

      default void enter(NodePath<?> nodePath)
      Deprecated.
      Called on the way into a node, before the nodes below it are walked, which is where a plugin says what it knows about the node before anything below it is known. A plugin which only says which nodes there are to walk has nothing to do here.
    • exit

      default void exit(NodePath<?> nodePath)
      Deprecated.
      Called on the way out of a node, once the nodes below it have been walked, which is where a plugin settles what depends on them. A composite plugin exits its plugins in the opposite order to the one it enters them in.
    • getConfiguration

      PluginConfiguration getConfiguration()
      Deprecated.
    • setConfiguration

      void setConfiguration(PluginConfiguration configuration)
      Deprecated.
    • getRequiredPlugins

      default Collection<Class<? extends Plugin>> getRequiredPlugins()
      Deprecated.
      The plugins which have to come before this one in the chain, which a composite plugin checks when it is created.
    • resolve

      default @NonNull Node<?,?> resolve(@NonNull Node<?,?> node, @NonNull NodePath<?> parentPath)
      Deprecated.
      Replaces a node the walk has found before it is walked, which is how a plugin says what a node really is: a type mapped to another one, or a node carrying more than the one found, such as its Kotlin reflection. Called with the path of the node it is found below, before the node gets its own path, and in the order of the plugins, each one getting what the one before it returned.
      Parameters:
      node - the node found
      parentPath - the path of the node it is found below; for a related node, the path of the root
      Returns:
      the node to walk in its place, or the node itself
    • scan

      default @NonNull NodeDependencies scan(@NonNull NodeDependencies nodeDependencies)
      Deprecated.
      Says what is below a node: its child nodes, walked right below it, and its related nodes, walked once below the root after everything already queued. Called when the walk enters a node, in the order of the plugins, each one adding to what the one before it returned. A node equal to one scanned before gets the same result without being scanned again.
      Parameters:
      nodeDependencies - the node with what the plugins before this one found below it
      Returns:
      what is below the node, with what this plugin found added
    • setParserConfig

      void setParserConfig(Parser.Config parserConfig)
      Deprecated.
      Hands the plugin the configuration of the parser running it.