Class Contracts


  • class Contracts
    extends java.lang.Object
    OSGi Contracts are first defined in OSGi Enterprise Release 5.0.0. A Contract is a namespace to control the versioning of a set of packages.
    • Constructor Detail

      • Contracts

        public Contracts​(Analyzer analyzer)
    • Method Detail

      • clear

        public void clear()
      • collectContracts

        void collectContracts​(java.lang.String from,
                              Parameters pcs)
        Collect contracts will take a domain and find any declared contracts. This happens early so that we have a list of contracts we can later compare the imports against.
      • isContracted

        boolean isContracted​(Descriptors.PackageRef packageRef)
        Find out if a package is contracted. If there are multiple contracts for a package we remember this so we can generate a single error.
        Parameters:
        packageRef -
      • addToRequirements

        void addToRequirements​(Parameters requirements)
        Called before we print the manifest. Should add any contracts that were actually used to the requirements.
        Parameters:
        requirements -