Interface JavaModule.Module

  • Enclosing class:
    JavaModule

    @Proxied("java.lang.Module")
    protected static interface JavaModule.Module
    A proxy for interacting with java.lang.Module.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canRead​(java.lang.Object value, java.lang.Object target)
      Checks if the source module can read the target module.
      java.lang.String getName​(java.lang.Object value)
      Returns the module's name.
      java.io.InputStream getResourceAsStream​(java.lang.Object value, java.lang.String name)
      Returns a resource stream for this module for a resource of the given name or null if such a resource does not exist.
      boolean isExported​(java.lang.Object value, java.lang.String aPackage, java.lang.Object target)
      Returns true if the source module exports the supplied package to the target module.
      boolean isInstance​(java.lang.Object value)
      Returns true if the supplied instance is of type java.lang.Module.
      boolean isNamed​(java.lang.Object value)
      Returns true if the supplied module is named.
      boolean isOpen​(java.lang.Object value, java.lang.String aPackage, java.lang.Object target)
      Returns true if the source module opens the supplied package to the target module.
    • Method Detail

      • isInstance

        @Instance
        boolean isInstance​(java.lang.Object value)
        Returns true if the supplied instance is of type java.lang.Module.
        Parameters:
        value - The instance to investigate.
        Returns:
        true if the supplied value is a java.lang.Module.
      • isNamed

        boolean isNamed​(java.lang.Object value)
        Returns true if the supplied module is named.
        Parameters:
        value - The java.lang.Module to check for the existence of a name.
        Returns:
        true if the supplied module is named.
      • getName

        java.lang.String getName​(java.lang.Object value)
        Returns the module's name.
        Parameters:
        value - The java.lang.Module to check for its name.
        Returns:
        The module's (implicit or explicit) name.
      • getResourceAsStream

        java.io.InputStream getResourceAsStream​(java.lang.Object value,
                                                java.lang.String name)
                                         throws java.io.IOException
        Returns a resource stream for this module for a resource of the given name or null if such a resource does not exist.
        Parameters:
        value - The java.lang.Module instance to apply this method upon.
        name - The name of the resource.
        Returns:
        An input stream for the resource or null if it does not exist.
        Throws:
        java.io.IOException - If an I/O exception occurs.
      • isExported

        boolean isExported​(java.lang.Object value,
                           java.lang.String aPackage,
                           @Proxied("java.lang.Module")
                           java.lang.Object target)
        Returns true if the source module exports the supplied package to the target module.
        Parameters:
        value - The source module.
        aPackage - The name of the package to check.
        target - The target module.
        Returns:
        true if the source module exports the supplied package to the target module.
      • isOpen

        boolean isOpen​(java.lang.Object value,
                       java.lang.String aPackage,
                       @Proxied("java.lang.Module")
                       java.lang.Object target)
        Returns true if the source module opens the supplied package to the target module.
        Parameters:
        value - The source module.
        aPackage - The name of the package to check.
        target - The target module.
        Returns:
        true if the source module opens the supplied package to the target module.
      • canRead

        boolean canRead​(java.lang.Object value,
                        @Proxied("java.lang.Module")
                        java.lang.Object target)
        Checks if the source module can read the target module.
        Parameters:
        value - The source module.
        target - The target module.
        Returns:
        true if the source module can read the target module.