Package org.apache.sling.feature.scanner
Class Descriptor
- java.lang.Object
-
- org.apache.sling.feature.scanner.Descriptor
-
- Direct Known Subclasses:
ArtifactDescriptor
,ContainerDescriptor
public abstract class Descriptor extends Object
A descriptor holds information about requirements and capabilities. Note that this implementation is not synchronized. If multiple threads access a descriptor concurrently, and at least one of the threads modifies the descriptor structurally, it must be synchronized externally. However, once a descriptor is locked, it is safe to access it concurrently.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Descriptor(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
aggregate(Descriptor d)
protected void
checkLocked()
Set<org.osgi.resource.Capability>
getCapabilities()
Return the list of capabilities.Set<PackageInfo>
getDynamicImportedPackages()
Set<PackageInfo>
getExportedPackages()
Set<PackageInfo>
getImportedPackages()
String
getName()
Returns the name of the entity associated with this descriptor.Set<org.apache.sling.feature.MatchingRequirement>
getRequirements()
Return the list of requirements.boolean
isLocked()
void
lock()
String
toString()
-
-
-
Constructor Detail
-
Descriptor
protected Descriptor(String name)
-
-
Method Detail
-
lock
public void lock()
-
isLocked
public final boolean isLocked()
-
checkLocked
protected void checkLocked()
-
aggregate
protected void aggregate(Descriptor d)
-
getExportedPackages
public final Set<PackageInfo> getExportedPackages()
-
getImportedPackages
public final Set<PackageInfo> getImportedPackages()
-
getDynamicImportedPackages
public final Set<PackageInfo> getDynamicImportedPackages()
-
getName
public String getName()
Returns the name of the entity associated with this descriptor.- Returns:
- the name.
-
getRequirements
public final Set<org.apache.sling.feature.MatchingRequirement> getRequirements()
Return the list of requirements.- Returns:
- The list of requirements. The list might be empty.
-
getCapabilities
public final Set<org.osgi.resource.Capability> getCapabilities()
Return the list of capabilities.- Returns:
- The list of capabilities. The list might be empty.
-
-