Class 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 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.