Class JavaElement


  • class JavaElement
    extends java.lang.Object
    An element that compares the access field in a binary compatible way. This element is used for classes, methods, constructors, and fields. For that reason we also included the only method that uses this class as a static method.

    Packages

    • MAJOR - Remove a public type
    • MINOR - Add a public class
    • MINOR - Add an interface
    • MINOR - Add a method to a class
    • MINOR - Add a method to a provider interface
    • MAJOR - Add a method to a consumer interface
    • MINOR - Add a field
    • MICRO - Add an annotation to a member
    • MINOR - Change the value of a constant
    • MICRO - -abstract
    • MICRO - -final
    • MICRO - -protected
    • MAJOR - +abstract
    • MAJOR - +final
    • MAJOR - +protected
    • Constructor Detail

      • JavaElement

        JavaElement​(Analyzer analyzer)
             throws java.lang.Exception
        Create an element for the API. We take the exported packages and traverse those for their classes. If there is no manifest or it does not describe a bundle we assume the whole contents is exported.
        Parameters:
        infos -
        Throws:
        java.lang.Exception
    • Method Detail

      • getAPI

        static Element getAPI​(Analyzer analyzer)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getLocalAPI

        private Element getLocalAPI()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • classElement

        Element classElement​(Clazz clazz)
                      throws java.lang.Exception
        Calculate the class element. This requires parsing the class file and finding all the methods that were added etc. The parsing will take super interfaces and super classes into account. For this reason it maintains a queue of classes/interfaces to parse.
        Parameters:
        analyzer -
        clazz -
        infos -
        Throws:
        java.lang.Exception
      • access

        private static void access​(java.util.Collection<Element> children,
                                   int access,
                                   boolean deprecated,
                                   boolean provider)