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 java.lang.ObjectA 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 protectedDescriptor(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaggregate(Descriptor d)protected voidcheckLocked()java.util.Set<org.osgi.resource.Capability>getCapabilities()Return the list of capabilities.java.util.Set<PackageInfo>getDynamicImportedPackages()java.util.Set<PackageInfo>getExportedPackages()java.util.Set<PackageInfo>getImportedPackages()java.lang.StringgetName()Returns the name of the entity associated with this descriptor.java.util.Set<org.apache.sling.feature.MatchingRequirement>getRequirements()Return the list of requirements.booleanisLocked()voidlock()java.lang.StringtoString()
-
-
-
Method Detail
-
lock
public void lock()
-
isLocked
public final boolean isLocked()
-
checkLocked
protected void checkLocked()
-
aggregate
protected void aggregate(Descriptor d)
-
getExportedPackages
public final java.util.Set<PackageInfo> getExportedPackages()
-
getImportedPackages
public final java.util.Set<PackageInfo> getImportedPackages()
-
getDynamicImportedPackages
public final java.util.Set<PackageInfo> getDynamicImportedPackages()
-
getName
public java.lang.String getName()
Returns the name of the entity associated with this descriptor.- Returns:
- the name.
-
getRequirements
public final java.util.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 java.util.Set<org.osgi.resource.Capability> getCapabilities()
Return the list of capabilities.- Returns:
- The list of capabilities. The list might be empty.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-