Class AdaptWithHelper


  • public class AdaptWithHelper
    extends Object
    Helping with object adapters. This adds support for Adapting one type to another.
    Author:
    Phillip Kruger (phillip.kruger@redhat.com)
    • Method Detail

      • shouldCreateTypeInSchema

        public static boolean shouldCreateTypeInSchema​(Annotations annotations)
      • getAdaptWith

        public static Optional<AdaptWith> getAdaptWith​(Direction direction,
                                                       ReferenceCreator referenceCreator,
                                                       Field field,
                                                       Annotations annotations)
        Get the adaptWith for a certain field (if any)
        Parameters:
        direction -
        referenceCreator -
        field -
        annotations - the annotations
        Returns:
        Potentially an AdaptWith model
      • getAdaptWith

        public static Optional<AdaptWith> getAdaptWith​(Direction direction,
                                                       ReferenceCreator referenceCreator,
                                                       Reference r,
                                                       Annotations annotations,
                                                       io.smallrye.graphql.schema.helper.AdaptWithHelper.AdapterType adapterType)
        Get the adapt with for a certain reference.
        Parameters:
        direction -
        referenceCreator -
        r -
        annotations - the annotations
        adapterType -
        Returns:
        Potentially a AdaptWith model
      • getAdaptWith

        public static Optional<AdaptWith> getAdaptWith​(Direction direction,
                                                       ReferenceCreator referenceCreator,
                                                       Reference r,
                                                       Annotations annotations)
        Get the adapt with for a certain reference.
        Parameters:
        direction -
        referenceCreator -
        r -
        annotations - the annotations
        Returns:
        Potentially a AdaptWith model