Class FacetComponentFlattener


  • @Internal
    public final class FacetComponentFlattener
    extends java.lang.Object
    A provider for component flatteners that uses the Facet system to access implementation details.
    Since:
    4.0.0
    • Method Detail

      • get

        public static <V> ComponentFlattener get​(V instance,
                                                 java.util.Collection<? extends FacetComponentFlattener.Translator<V>> candidates)
        Create a new flattener, picking an applicable translator.

        If no translators are available, keys will be passed through untransformed.

        Type Parameters:
        V - instance type
        Parameters:
        instance - the game/server instance
        candidates - potential facets
        Returns:
        a new flattener
        Since:
        4.0.0