Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the filterNonDocumented and filterNonPublic functions as extension getters #3699

Merged
merged 1 commit into from
Mar 7, 2024

Commits on Mar 7, 2024

  1. Move the filterNonDocumented and filterNonPublic functions as ext…

    …ension getters
    
    `filterNonPublic` becomes an extension getter, `wherePublic`, and
    `filterNonDocumented` becomes an extension getter, `whereDocumented`.
    
    Nameable now implements Privacy. Privacy is now an abstract interface class.
    
    Changing all the call sites highlights a number of ModelElement getters that
    are superfluous. For example, `Container.publicInstanceMethods`. This was a
    getter that now boils down to `instanceMethods.wherePublic`, and it really is
    unneccessary to keep this; there are many such methods that are removed here:
    
    * Container: `publicInstanceMethods`, `publicInstanceOperators`, `publicInstanceFields`,
      `publicConstantFields`,
    * InheritingContainer: `publicSuperChain`, `publicInheritedFields`, `publicInheritedMethods`,
    * LibraryContainer: `publicLibraries`,
    * Package: `documentedCategories`,
    * PackageGraph: `documentedExtensions`,
    * TopLevelContainer: `publicClasses`, `publicExtensions`,
      `publicExtensionTypes`, `publicConstants`, `publicEnums`,
      `_publicExceptions`, `publicFunctions`, `publicMixins`, `publicProperties`,
      `publicTypedefs`.
    
    Additionally, this change highlights some small inefficiency in some `hasX`
    methods. For example, `hasPublicInstanceMethods` used to enumerate all of the
    public instance methods, then ask if the list is empty. Now we can ask if `any`
    of the `instanceMethods` are `public`.
    
    * Container: `hasPublicInstanceMethods`, `hasPublicInstanceOperators`,
      `hasPublicInstanceFields`, `hasPublicConstantFields`,
      `hasPublicVariableStaticFields`, `hasPublicStaticMethods`,
      `hasPublicEnumValues`,
    * InheritingContainer: `hasPublicInheritedMethods`,
      `hasPublicSuperChainReversed`,
    * MixedInTypes: `hasPublicMixedInTypes`,
    * LibraryContainer: `hasPublicLibraries`,
    * Package: `hasDocumentedCategories`,
    * TopLevelContainer: `hasPublicClasses`, `hasPublicExtensions`,
      `hasPublicExtensionTypes`, `hasPublicConstants`, `hasPublicEnums`,
      `hasPublicExceptions`, `hasPublicFunctions`,`hasPublicMixins`,
      `hasPublicProperties`, `hasPublicTypedefs`.
    
    Because the field `InheritingContaier.publicSuperChain` is removed, I change
    `superChain` from a getter to a field, sort of the point of caching.
    srawlins committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    b182058 View commit details
    Browse the repository at this point in the history