org.wildfly.swarm.spi.api

## Interface Fraction<T extends Fraction>

- All Known Implementing Classes:
    AsciidoctorJFraction, CassandraFraction, CDIJAXRSFraction, FluentdFraction, FlywayFraction, JPASpatialFraction, MicroprofileOpenApiFraction, MongoDBFraction, MvcFraction, Neo4jFraction, OrientDBFraction, ZipkinFraction

      public interface Fraction<T extends Fraction>

  Root of a tree of configuration for a particular subset of functionality.

  While each portion of functionality is called a "fraction", this class maps to the configuration there-of. It should be implemented to include whatever configuration is appropriate for the subset of functionality.

  In the event a logical "fraction" requires no configuration, a subclass of this class is not required.

  For functionality coming in through WildFly, the implementation is a sub-class of the matching WildFly subsystem configuration tree from the `wildfly-config-api` project.

  Author:
    Bob McWhirter

- - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default T` | `applyDefaults()` Apply whatever defaults are required.
    `default T` | `applyDefaults(boolean hasConfiguration)` The container always calls this method, but the default implementation delegates to `applyDefaults()`.

- - ### Method Detail

    - #### applyDefaults

          default T applyDefaults()

      Apply whatever defaults are required.
      Returns:
        this fraction.
      See Also:
        `applyDefaults(boolean)`

    - #### applyDefaults

          default T applyDefaults(boolean hasConfiguration)

      The container always calls this method, but the default implementation delegates to `applyDefaults()`.

      Unlike `applyDefaults()` this method allows a fraction to customize the defaults depending on whether this fraction was explicitly configured by a user or not.

      Parameters:
        `hasConfiguration` -
      Returns:
        this fraction

Copyright © 2018 JBoss by Red Hat. All rights reserved.