public abstract class OASFactoryResolver
extends java.lang.Object
ServiceLoader
mechanism or by manually
setting their implementation using the setInstance method.Constructor and Description |
---|
OASFactoryResolver() |
Modifier and Type | Method and Description |
---|---|
abstract <T extends Constructible> |
createObject(java.lang.Class<T> clazz)
Create a new instance of a constructible element from the OpenAPI model tree.
|
static OASFactoryResolver |
instance()
Creates an OASFactoryResolver object.
|
static void |
setInstance(OASFactoryResolver factory)
Set the instance.
|
public abstract <T extends Constructible> T createObject(java.lang.Class<T> clazz)
T
- describes the type parameterclazz
- represents a model which extends the org.eclipse.microprofile.openapi.models.Constructible interfacejava.lang.NullPointerException
- if the specified class is nulljava.lang.IllegalArgumentException
- if an instance could not be created, most likely, due to an illegal or inappropriate classpublic static OASFactoryResolver instance()
OASFactory
public static void setInstance(OASFactoryResolver factory)
factory
- set the instance.