Class OASFactoryResolver

  • public abstract class OASFactoryResolver
    extends java.lang.Object
    This class is not intended to be used by end-users. It should be used by vendors to set their implementation of OASFactoryResolver.

    Service provider for OASFactoryResolver. The implementation registers itself via the ServiceLoader mechanism or by manually setting their implementation using the setInstance method.
    • Constructor Detail

      • OASFactoryResolver

        public OASFactoryResolver()
    • Method Detail

      • createObject

        public abstract <T extends Constructible> T createObject​(java.lang.Class<T> clazz)
        Create a new instance of a constructible element from the OpenAPI model tree.
        Type Parameters:
        T - describes the type parameter
        clazz - represents a model which extends the org.eclipse.microprofile.openapi.models.Constructible interface
        a new instance of the requested model class
        java.lang.NullPointerException - if the specified class is null
        java.lang.IllegalArgumentException - if an instance could not be created, most likely, due to an illegal or inappropriate class
      • instance

        public static OASFactoryResolver instance()
        Creates an OASFactoryResolver object. Only used internally from within OASFactory
        an instance of OASFactoryResolver
      • setInstance

        public static void setInstance​(OASFactoryResolver factory)
        Set the instance. It is used by OSGi environment while service loader pattern is not supported.
        factory - set the instance.