Interface IGosuClassRepository

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ISourceFileHandle findClass​(java.lang.String strQualifiedClassName, java.lang.String[] extensions)
      Finds the ISourceFileHandle for a given fully-qualified class name, or null if no such source file exists
      java.net.URL findResource​(java.lang.String name)
      Finds the given resource in this repository.
      java.util.Set<java.lang.String> getAllTypeNames()  
      java.util.Set<java.lang.String> getAllTypeNames​(java.lang.String... extensions)
      Returns the names of all types in this repository that end with one of the specified file extensions
      IModule getModule()
      The module having this repository
      java.util.Set<TypeName> getTypeNames​(java.lang.String namespace, java.util.Set<java.lang.String> extensions, ITypeLoader loader)
      Returns all type names in the given namespace and with the given extensions.
      int hasNamespace​(java.lang.String namespace)
      Returns the number of namespaces this repository has matching the given name.
      void namespaceRefreshed​(java.lang.String namespace, IDirectory dir, RefreshKind kind)
      Called when a namespace is refreshed
      void typesRefreshed​(RefreshRequest request)
      Called when a type is refreshed
    • Method Detail

      • getModule

        IModule getModule()
        The module having this repository
      • findClass

        ISourceFileHandle findClass​(java.lang.String strQualifiedClassName,
                                    java.lang.String[] extensions)
        Finds the ISourceFileHandle for a given fully-qualified class name, or null if no such source file exists
        Parameters:
        strQualifiedClassName - the fully-qualified name of the class
        extensions -
        Returns:
        The source file handle for the given class, or null if no such source file exists.
      • findResource

        java.net.URL findResource​(java.lang.String name)
        Finds the given resource in this repository.

        The name of a resource is a '/'-separated path name that identifies the resource.

        Parameters:
        name - the name of the resource
        Returns:
        the URL of the resource or null if the resource cannot be found.
      • getAllTypeNames

        java.util.Set<java.lang.String> getAllTypeNames()
        Returns:
        A set containing all type names in this repository (includes enhancement names)
      • getAllTypeNames

        java.util.Set<java.lang.String> getAllTypeNames​(java.lang.String... extensions)
        Returns the names of all types in this repository that end with one of the specified file extensions
        Parameters:
        extensions - the set of file name extensions to consider
        Returns:
        A set containing all the type names in this repository.
      • getTypeNames

        java.util.Set<TypeName> getTypeNames​(java.lang.String namespace,
                                             java.util.Set<java.lang.String> extensions,
                                             ITypeLoader loader)
        Returns all type names in the given namespace and with the given extensions.
      • hasNamespace

        int hasNamespace​(java.lang.String namespace)
        Returns the number of namespaces this repository has matching the given name. Note a namespace can span multiple source roots, hence the integer return value -- one per source root.
      • typesRefreshed

        void typesRefreshed​(RefreshRequest request)
        Called when a type is refreshed
      • namespaceRefreshed

        void namespaceRefreshed​(java.lang.String namespace,
                                IDirectory dir,
                                RefreshKind kind)
        Called when a namespace is refreshed