Package io.quarkus.deployment
Class Capabilities
- java.lang.Object
-
- io.quarkus.builder.item.BuildItem
-
- io.quarkus.builder.item.SimpleBuildItem
-
- io.quarkus.deployment.Capabilities
-
public final class Capabilities extends SimpleBuildItem
This build items holds the set of registered capabilities.- See Also:
CapabilityBuildItem
-
-
Constructor Summary
Constructors Constructor Description Capabilities(Set<String> capabilities)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Set<String>
getCapabilities()
boolean
isCapabilityPresent(String capability)
Deprecated.boolean
isCapabilityWithPrefixMissing(String capabilityPrefix)
Checks whether a capability with a given prefix is missing during the build.boolean
isCapabilityWithPrefixPresent(String capabilityPrefix)
Checks whether a capability with a given prefix is present during the build.boolean
isMissing(String capability)
Checks whether a given capability is missing during the build.boolean
isPresent(String capability)
Checks whether a given capability is present during the build.
-
-
-
Method Detail
-
isCapabilityPresent
@Deprecated public boolean isCapabilityPresent(String capability)
Deprecated.
-
isPresent
public boolean isPresent(String capability)
Checks whether a given capability is present during the build.- Parameters:
capability
- capability name- Returns:
- true, in case the capability is present, otherwise - false
-
isMissing
public boolean isMissing(String capability)
Checks whether a given capability is missing during the build.- Parameters:
capability
- capability name- Returns:
- true, in case the capability is missing, otherwise - false
-
isCapabilityWithPrefixPresent
public boolean isCapabilityWithPrefixPresent(String capabilityPrefix)
Checks whether a capability with a given prefix is present during the build.A capability name is a dot-separated string. A prefix is also a string that is composed of either the first capability name element or a dot separated sequence of the capability name elements starting from the first one.
E.g. for capability
io.quarkus.resteasy.json.jackson
the following prefixes will be registered:io
io.quarkus
io.quarkus.resteasy
io.quarkus.resteasy.json
io.quarkus.resteasy.json
is present during the build.Given that only a single provider of a given capability is allowed in an application, capability prefixes allow expressing a certain common aspect among different but somewhat related capabilities.
E.g. there could be extensions providing the following capabilities:
io.quarkus.resteasy.json.jackson
io.quarkus.resteasy.json.jackson.client
io.quarkus.resteasy.json.jsonb
io.quarkus.resteasy.json.jsonb.client
io.quarkus.resteasy.json
is present.- Parameters:
capabilityPrefix
- capability prefix- Returns:
- true, in case the capability with the given prefix is present, otherwise - false
-
isCapabilityWithPrefixMissing
public boolean isCapabilityWithPrefixMissing(String capabilityPrefix)
Checks whether a capability with a given prefix is missing during the build. This method simple callsisCapabilityWithPrefixPresent(String)
and returns its result inverted.- Parameters:
capabilityPrefix
- capability prefix- Returns:
- true, in case the capability with the given prefix is missing, otherwise - false
-
-