T
- the type of the runtime API object exposed by the capabilitypublic static class RuntimeCapability.Builder<T> extends Object
RuntimeCapability
.Modifier and Type | Method and Description |
---|---|
RuntimeCapability.Builder<T> |
addDynamicOptionalRequirements(String... requirements)
Deprecated.
nothing is currently done with this data and unless a true use is implemented this method may be removed
|
RuntimeCapability.Builder<T> |
addDynamicRequirements(String... requirements)
Deprecated.
nothing is currently done with this data and unless a true use is implemented this method may be removed
|
RuntimeCapability.Builder<T> |
addOptionalRequirements(String... requirements)
Deprecated.
nothing is currently done with this data and unless a true use is implemented this method may be removed
|
RuntimeCapability.Builder<T> |
addRequirements(String... requirements)
Adds the names of other capabilities that this capability requires.
|
RuntimeCapability.Builder<T> |
addRuntimeOnlyRequirements(String... requirements)
Deprecated.
nothing is currently done with this data and unless a true use is implemented this method may be removed
|
RuntimeCapability<T> |
build()
Builds the capability.
|
static RuntimeCapability.Builder<Void> |
of(String name)
Create a builder for a non-dynamic capability with no custom runtime API.
|
static RuntimeCapability.Builder<Void> |
of(String name,
boolean dynamic)
Create a builder for a possibly dynamic capability with no custom runtime API.
|
static RuntimeCapability.Builder<Void> |
of(String name,
boolean dynamic,
Class<?> serviceValueType)
Create a builder for a possibly dynamic capability that installs a service with the given value type.
|
static <T> RuntimeCapability.Builder<T> |
of(String name,
boolean dynamic,
T runtimeAPI)
Create a builder for a possibly dynamic capability that provides the given custom runtime API.
|
static RuntimeCapability.Builder<Void> |
of(String name,
Class<?> serviceValueType)
Create a builder for a non-dynamic capability that installs a service with the given value type.
|
static <T> RuntimeCapability.Builder<T> |
of(String name,
T runtimeAPI)
Create a builder for a non-dynamic capability that provides the given custom runtime API.
|
RuntimeCapability.Builder<T> |
setServiceType(Class<?> type)
Sets that the capability installs a service with the given value type.
|
public static RuntimeCapability.Builder<Void> of(String name)
name
- the name of the capability. Cannot be null
or empty.public static RuntimeCapability.Builder<Void> of(String name, boolean dynamic)
name
- the name of the capability. Cannot be null
or empty.dynamic
- true
if the capability is a base capability for dynamically named capabilitiespublic static RuntimeCapability.Builder<Void> of(String name, Class<?> serviceValueType)
name
- the name of the capability. Cannot be null
or empty.serviceValueType
- the value type of the service installed by the capabilitypublic static RuntimeCapability.Builder<Void> of(String name, boolean dynamic, Class<?> serviceValueType)
name
- the name of the capability. Cannot be null
or empty.dynamic
- true
if the capability is a base capability for dynamically named capabilitiesserviceValueType
- the value type of the service installed by the capabilitypublic static <T> RuntimeCapability.Builder<T> of(String name, T runtimeAPI)
T
- the type of the runtime API object exposed by the capabilityname
- the name of the capability. Cannot be null
or empty.runtimeAPI
- the custom API implementation exposed by the capabilitypublic static <T> RuntimeCapability.Builder<T> of(String name, boolean dynamic, T runtimeAPI)
T
- the type of the runtime API object exposed by the capabilityname
- the name of the capability. Cannot be null
or empty.dynamic
- true
if the capability is a base capability for dynamically named capabilitiesruntimeAPI
- the custom API implementation exposed by the capabilitypublic RuntimeCapability.Builder<T> setServiceType(Class<?> type)
type
- the value type of the service installed by the capability. May be null
public RuntimeCapability.Builder<T> addRequirements(String... requirements)
requirements
- the capability names@Deprecated public RuntimeCapability.Builder<T> addOptionalRequirements(String... requirements)
requirements
- the capability names@Deprecated public RuntimeCapability.Builder<T> addRuntimeOnlyRequirements(String... requirements)
requirements
- the capability names@Deprecated public RuntimeCapability.Builder<T> addDynamicRequirements(String... requirements)
requirements
- the capability names@Deprecated public RuntimeCapability.Builder<T> addDynamicOptionalRequirements(String... requirements)
requirements
- the capability namespublic RuntimeCapability<T> build()
null
Copyright © 2023 JBoss by Red Hat. All rights reserved.