# US 2017/0286065 A1 · Returning a runtime type loaded from an archive in a module system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0286065 A1
- Document ID: US20170286065A1
- Status: Published application
- Kind: A1
- Application number: 15/085,637
- Filed: 2016-03-30
- Published: 2017-10-05
- Earliest claimed: 2016-03-30
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Jiangli Zhou; Ioi Kim Lam; Calvin C. Cheung; Karen Margaret Pearson Kinnear
- Web page: https://patentgrep.com/patent/US20170286065A1

## CPC

- G06F 8/24: {Object-oriented}
- G06F 9/44521: {Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading}
- G06F 9/449: {Object-oriented method invocation or resolution}
- G06F 9/45504: {Abstract machines for program code execution, e.g. Java virtual machine [JVM], interpreters or emulators}
- G06F 9/44563: {Sharing}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Returning a runtime type loaded from an archive in a module system is disclosed. Operations include (a) identifying, by a class loader implemented in a runtime environment, an archived runtime type loaded into an archive from a module source; (b) identifying a particular package associated with the archived runtime type; (c) determining that the particular package is defined to a runtime module that is defined to (i) the class loader or (ii) any class loader in the class loader hierarchy to which the class loader delegates; and (d) returning directly or indirectly, by the class loader, a runtime type loaded based on the archived runtime type from the archive.

## Claims

### Claim 1

A non-transitory computer readable medium comprising instructions which, when executed by one or more hardware processors, cause performance of operations comprising:
identifying, by a class loader implemented in a first runtime environment, an archived runtime type loaded into an archive from a module source;
identifying a particular package associated with the archived runtime type;
determining whether the particular package is defined to any runtime module, of a module system, that is defined to (i) the class loader or (ii) any class loader in a class loader hierarchy to which the class loader delegates, in the first runtime environment;
responsive at least to determining that the particular package is defined to a runtime module that is defined to (i) the class loader or (ii) any class loader in the class loader hierarchy to which the class loader delegates, in the first runtime environment: returning directly or indirectly, by the class loader, a runtime type loaded based on the archived runtime type from the archive; and
wherein runtime type visibility is enforced by the module system based at least in part on readability of one or more runtime modules as defined in the module system.

### Claim 2 (depends on 1)

The medium of claim 1, wherein the module system enforces runtime type accessibility in the first runtime environment.

### Claim 3 (depends on 1)

The medium of claim 1, wherein:
determining that the particular package is defined to the runtime module that is defined to (i) the class loader or (ii) any class loader in the class loader hierarchy to which the class loader delegates comprises: determining that the runtime module is defined to a parent class loader of the class loader; and
the operations further comprise:
prior to returning directly or indirectly, by the class loader, the runtime type loaded based on the archived runtime type from the archive:
loading, by the parent class loader, the runtime type based on the archived runtime type from the archive; and
passing the runtime type from the parent class loader to the class loader.

### Claim 4 (depends on 1)

The medium of claim 1, wherein:
determining that the particular package is defined to the runtime module that is defined to (i) the class loader or (ii) any class loader in the class loader hierarchy to which the class loader delegates comprises: determining that the runtime module is defined to the class loader; and
returning directly or indirectly, by the class loader, the runtime type loaded based on the archived runtime type from the archive comprises: loading, by the class loader, the runtime type based on the archived runtime type from the archive.

### Claim 5 (depends on 1)

The medium of claim 1, wherein the operations further comprise:
responsive at least to determining that the particular package is not defined to in any runtime module that is defined to (i) the class loader or (ii) any class loader in the class loader hierarchy to which the class loader delegates: refraining from loading the runtime type based on the archived runtime type from the archive.

### Claim 6 (depends on 5)

The medium of claim 5, wherein refraining from loading the runtime type based on the archived runtime type from the archive is further responsive to: determining that the archived runtime type was loaded into the archive from the module source.

### Claim 7 (depends on 1)

The medium of claim 1, wherein returning directly or indirectly, by the class loader, the runtime type loaded based on the archived runtime type from the archive is further responsive to:
determining that the archived runtime type was loaded into the archive from the module source.

### Claim 8 (depends on 1)

The medium of claim 1, wherein the operations further comprise:
prior to execution of the first runtime environment:
executing a second runtime environment;
identifying, by the class loader implemented in the second runtime environment, the archived runtime type loaded into the archive from the module source;
determining whether the particular package is defined to any runtime module, of the module system, that is defined to (i) the class loader or (ii) any class loader in the class loader hierarchy to which the class loader delegates, in the second runtime environment; and
responsive at least to determining that the particular package is not defined to any runtime module that is defined to (i) the class loader or (ii) any class loader in the class loader hierarchy to which the class loader delegates, in the second runtime environment: refraining from loading the runtime type based on the archived runtime type from the archive.

### Claim 9 (depends on 1)

The medium of claim 1, wherein returning directly or indirectly, by the class loader, the runtime type loaded based on the archived runtime type from the archive comprises: storing the runtime type in a memory space used by the first runtime environment to execute operations recited by the runtime type.

### Claim 10 (depends on 1)

The medium of claim 1, wherein returning directly or indirectly, by the class loader, the runtime type loaded based on the archived runtime type from the archive comprises: storing the runtime type in a heap memory.

### Claim 11 (depends on 1)

The medium of claim 1, wherein the operations further comprise: identifying the particular package in one or more statements of the archived runtime type.

### Claim 12 (depends on 1)

The medium of claim 1, wherein the class loader hierarchy to which the class loader delegates comprises a parent class loader of the class loader.

### Claim 13 (depends on 1)

The medium of claim 1, wherein identifying a particular package associated with the archived runtime type comprises:
identifying that a package membership declared by the archived runtime type identifies the particular package.

### Claim 14

A system, comprising:
at least one hardware processor including a process; and
the system configured to perform operations comprising:
identifying, by a class loader implemented in a first runtime environment, an archived runtime type loaded into an archive from a module source;
identifying a particular package associated with the archived runtime type;
determining whether the particular package is defined to any runtime module, of a module system, that is defined to (i) the class loader or (ii) any class loader in a class loader hierarchy to which the class loader delegates, in the first runtime environment;
responsive at least to determining that the particular package is defined to a runtime module that is defined to (i) the class loader or (ii) any class loader in the class loader hierarchy to which the class loader delegates, in the first runtime environment: returning directly or indirectly, by the class loader, a runtime type loaded based on the archived runtime type from the archive; and
wherein runtime type visibility is enforced by the module system based at least in part on readability of one or more runtime modules as defined in the module system.

### Claim 15

A non-transitory computer readable medium comprising instructions which, when executed by one or more hardware processors, cause performance of operations comprising:
identifying, by a class loader implemented in a runtime environment, an archived runtime type loaded into an archive from a namespace;
determining whether the archived runtime type is associated with any package that is defined to any runtime module, of a module system, that is defined to (i) the class loader or (ii) any class loader in a class loader hierarchy to which the class loader delegates; and
responsive at least to determining that the archived runtime type is not associated with any package that is defined to any runtime module that is defined to (i) the class loader or (ii) any class loader in the class loader hierarchy to which the class loader delegates: returning directly or indirectly, by the class loader, a runtime type loaded based on the archived runtime type from the archive; and
wherein runtime type visibility is enforced by the module system based at least in part on readability of one or more runtime modules as defined in the module system.

### Claim 16 (depends on 15)

The medium of claim 15, wherein the module system enforces runtime type accessibility in the runtime environment.

### Claim 17 (depends on 15)

The medium of claim 15, wherein:
returning directly or indirectly, by the class loader, the runtime type loaded based on the archived runtime type from the archive is further responsive to: determining that the archived runtime type was loaded into the archive from the namespace associated with the class loader; and
returning directly or indirectly, by the class loader, the runtime type loaded based on the archived runtime type from the archive comprises: loading, by the class loader, the runtime type based on the archived runtime type from the archive.

### Claim 18 (depends on 15)

The medium of claim 15, wherein:
returning directly or indirectly, by the class loader, the runtime type loaded based on the archived runtime type from the archive is further responsive to: determining that the archived runtime type was loaded into the archive from the namespace associated with a parent class loader of the class loader; and
the operations further comprise:
prior to returning directly or indirectly, by the class loader, the runtime type loaded based on the archived runtime type from the archive:
loading, by the parent class loader, the runtime type based on the archived runtime type from the archive; and
passing the runtime type from the parent class loader to the class loader.

### Claim 19 (depends on 15)

The medium of claim 15, wherein the operations further comprise:
responsive at least to determining that the archived runtime type is associated with a package that is defined to a runtime module that is defined to (i) the class loader or (ii) any class loader in the class loader hierarchy to which the class loader delegates: refraining from loading the runtime type based on the archived runtime type from the archive.

### Claim 20 (depends on 19)

The medium of claim 19, wherein refraining from loading the runtime type based on the archived runtime type from the archive is further responsive to determining that the archived runtime type was loaded into the archive from the namespace.
