public abstract class AbstractCapability extends Object implements Capability
Modifier | Constructor and Description |
---|---|
protected |
AbstractCapability(String name,
boolean dynamic,
Set<String> requirements,
Set<String> optionalRequirements,
Set<String> runtimeOnlyRequirements,
Set<String> dynamicRequirements,
Set<String> dynamicOptionalRequirements)
Creates a new capability
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getDynamicName(String dynamicNameElement)
Gets the full name of a capbility, including a dynamic element
|
Set<String> |
getDynamicOptionalRequirements()
Gets the names of other dynamically named capabilities upon a concrete instance of which this
capability will have an optional requirement once the full name is known.
|
Set<String> |
getDynamicRequirements()
Gets the names of other dynamically named capabilities upon a concrete instance of which this
capability will have a hard requirement once the full name is known.
|
String |
getName()
Gets the basic name of the capability.
|
Set<String> |
getOptionalRequirements()
Gets the names of other capabilities optionally required by this capability.
|
Set<String> |
getRequirements()
Gets the names of other capabilities required by this capability.
|
Set<String> |
getRuntimeOnlyRequirements()
Gets the names of other capabilities optionally used by this capability if they
are present in the runtime, but where the use of the other capability will never
be mandated by the persistent configuration.
|
int |
hashCode() |
boolean |
isDynamicallyNamed()
Gets whether this capability is a dynamically named one, whose runtime variants
will have a dynamic element added to the base name provided by
getName() . |
String |
toString() |
protected AbstractCapability(String name, boolean dynamic, Set<String> requirements, Set<String> optionalRequirements, Set<String> runtimeOnlyRequirements, Set<String> dynamicRequirements, Set<String> dynamicOptionalRequirements)
name
- the name of the capability. Cannot be null
requirements
- names of other capabilities upon which this capability has a hard requirement. May be null
optionalRequirements
- names of other capabilities upon which this capability has an optional requirement. May be null
runtimeOnlyRequirements
- names of other capabilities upon which this capability has an optional, runtime-only requirement. May be null
dynamicRequirements
- names of other dynamically named capabilities upon a concrete instance of which this
capability will have a hard requirement once the full name is known. May be null
dynamicOptionalRequirements
- names of other dynamically named capabilities upon a concrete instance of which this
capability will have an optional requirement once the full name is known. May be null
public String getName()
isDynamicallyNamed()
returns true
this will be the basic name of the capability, not including any dynamic portions.getName
in interface Capability
null
getDynamicName(String)
public Set<String> getRequirements()
getRequirements
in interface Capability
null
but may be empty.public Set<String> getOptionalRequirements()
getOptionalRequirements
in interface Capability
null
but may be empty.public Set<String> getRuntimeOnlyRequirements()
optional requirements
in that optional requirements may or may not be specified by the persistent
configuration, but if they are the capability must be present or the configuration
is invalid.getRuntimeOnlyRequirements
in interface Capability
null
but may be empty.public Set<String> getDynamicRequirements()
getDynamicRequirements
in interface Capability
null
but may be empty.public Set<String> getDynamicOptionalRequirements()
getDynamicOptionalRequirements
in interface Capability
null
but may be empty.public boolean isDynamicallyNamed()
getName()
.isDynamicallyNamed
in interface Capability
true
if this capability is dynamically namedpublic String getDynamicName(String dynamicNameElement)
getDynamicName
in interface Capability
dynamicNameElement
- the dynamic portion of the name. Cannot be null
IllegalStateException
- if isDynamicallyNamed()
returns false
public boolean equals(Object o)
Copyright © 2023 JBoss by Red Hat. All rights reserved.