A list of direct references to classes and interfaces in the Java Language Specification (3d Ed.)

Overview

Java 5 API Dependencies

This repo contains a program to compute the reflexive transitive closure under API dependency of a collection of Java classes (and interfaces). One class's API is said to (directly) depend on another's if the former class's API mentions latter's, e.g., as a parameter type, a return type, a supertype, or an exception type. The reason this closure is important is that it represents the size of the API that is required to support the given collection of Java classes or interfaces: you cannot implement the given classes without implementing every other class in the closure.

In the Oracle v. Google trials in 2012 and 2016, Oracle contended that 170 declarations from 62 classes were sufficient to implement the Java language. These declarations are the ones that are specifically referred to in The the Java Language Specification (3d Ed., Addison-Wesley, 2005), which describes Java SE 5, better known as Java 5.

This contention is wrong on several counts. First of all, the specification directly mentions at least 64 classes, as shown in the table below. More seriously it ignores the fact that you can't implement an API without implementing its reflexive transitive closure under API dependency, as explained above (let's call this the implicit API).

Using the Api program in this repo, you can compute the implicit API of a given API. The JavaApiDependencies program use the Api program to compute the implicit API of the API mentioned in the Java Language Specification (3d Ed). If you run this program under Java 5, you will find that it requires 2,381 methods, constructors, and fields, spread across 178 classes in 10 packages just to implement the Java language (never mind that that does not get you such basic libraries as java.io.PrintStream, which is required even for the basic "Hello World" program).

Here is a table of direct references to classes and interfaces in the Java Language Specification (3d Ed., Addison-Wesley, 2005). This table may not be complete, but it demonstrates that at least 64 classes (and interfaces) are mentioned in the JLS:

Row Class Name Description Section Page
1 java.lang.Object The root of the class hierarchy 4.3.2 47
2 java.lang.String A character string 4.3.3 48
3 java.lang.Boolean Wrapper classes for boolean 5.1.7 87
4 java.lang.Byte Wrapper classes for byte 5.1.7 87
5 java.lang.Character Wrapper classes for char 5.1.7 87
6 java.lang.Short Wrapper classes for short 5.1.7 87
7 java.lang.Integer Wrapper classes for int 5.1.7 87
8 java.lang.Long Wrapper classes for long 5.1.7 87
9 java.lang.Float Wrapper classes for float 5.1.7 87
10 java.lang.Double Wrapper classes for double 5.1.7 87
11 java.lang.Void The type of void.class 15.8.2 421
12 java.lang.Thread A thread of execution 17 553
13 java.lang.ThreadGroup A group of threads 11.3 303
14 java.lang.Class The runtime representation of a class 4.3.2 48
15 java.lang.ClassLoader The entity responsible for loading classes into the VM 12.2 312
16 java.lang.Runtime An instantiable class that allows access the VM 12.8 331
17 java.lang.System A non-instantiable class that allows access the VM 17.5.4 578
18 java.lang.Math A non-instantiable class that provides various mathematical operations 3.10.2 26
19 java.lang.Cloneable Interface implemented by objects that can be duplicated 10.7 292
20 java.io.Serializable Interface implemented by objects that can be emitted to a byte stream 10.7 292
21 java.lang.Iterable An object that can be iterated over with a for-each loop 14.14.2 387
22 java.lang.Enum The superclass of all enum types 8.9 251
23 java.lang.annotation.Annotation The superinterface of all annotation types 9.6 272
24 java.lang.annotation.Target Annotation type to indicate where an annotation is allowed 9.6.1.1 278
25 java.lang.annotation.ElementType Enum to indicate where an annotation is allowed 9.6.1.1 278
26 java.lang.annotation.Retention Annotation type to indicate how long an annotation is retained 9.6.1.2 278
27 java.lang.annotation.RetentionPolicy Enum to indicate how long an annotation is retained 9.6.1.2 278
28 java.lang.annotation.Inherited Annotation to indicate that an annotation applies to subclasses 9.6.1.3 279
29 java.lang.Override Annotation to indicate that a method declaration overrides another 9.6.1.4 279
30 java.lang.SuppressWarnings Annotation to indicate that compiler warnings should be suppressed 9.6.1.5 280
31 java.lang.Deprecated Annotation type used to indicate that an API element is obsolete 9.6.1.6 280
32 java.lang.Throwable The root of the exception and error hierarchies 11.5 306
33 java.lang.Exception The root of the exception hierarchy 11.2.3 301
34 java.lang.RuntimeException The root of the unchecked exception hierarchy 11.2.5 301
35 java.lang.Error The root of the error hierarchy 11.2.4 301
36 java.lang.ArithmeticException (Self explanatory) 4.2.3 37
37 java.lang.IllegalArgumentException (Self explanatory) 8.9 252
38 java.lang.ArrayIndexOutOfBoundsException (Self explanatory) 10.4 290
39 java.lang.ArrayStoreException (Self explanatory) 10.10 294
40 java.lang.ClassCastException (Self explanatory) 15.5 412
41 java.lang.CloneNotSupportedException (Self explanatory) 10.7 292
42 java.lang.IllegalMonitorStateException (Self explanatory) 17.8 580
43 java.lang.InterruptedException (Self explanatory) 17.8 580
44 java.lang.NegativeArraySizeException (Self explanatory) 15.10.1 432
45 java.lang.NullPointerException (Self explanatory) 15.12.4.4 476
46 java.lang.AbstractMethodError (Self explanatory) 13.4.16 352
47 java.lang.AssertionError (Self explanatory) 14.10 376
48 java.lang.ClassCircularityError (Self explanatory) 12.2.1 313
49 java.lang.ClassFormatError (Self explanatory) 12.2.1 313
50 java.lang.ExceptionInInitializerError (Self explanatory) 12.4.2 321
51 java.lang.IncompatibleClassChangeError (Self explanatory) 13.4.10 349
52 java.lang.InstantiationError (Self explanatory) 12.3.3 316
53 java.lang.InternalError (Self explanatory) 11.4 304
54 java.lang.LinkageError (Self explanatory) 12.2.1 313
55 java.lang.NoClassDefFoundError (Self explanatory) 12.2.1 313
56 java.lang.IllegalAccessError (Self explanatory) 12.3.3 315
57 java.lang.NoSuchFieldError (Self explanatory) 12.3.3 316
58 java.lang.NoSuchMethodError (Self explanatory) 12.3.3 316
59 java.lang.OutOfMemoryError (Self explanatory) 12.5 313
60 java.lang.InstantiationException (Self explanatory) 13.4.1 340
61 java.lang.StackOverflowError (Self explanatory) 15.12.4.5 477
62 java.lang.VerifyError (Self explanatory) 12.3.1 314
63 java.lang.UnsatisfiedLinkError (Self explanatory) 12.3.3 316
64 java.lang.VirtualMachineError (Self explanatory) 11.5.2 307
You might also like...

App to demonstrate the passage of adapter items into activity using interfaces

OnClickListenerExample This application shows how to pass adapter items into an activity using interfaces. The sample data set contains two fields rep

Feb 2, 2022

Add something to Minecraft LAN Server List

DiscoverMe Make a fortune... in Minecraft Server List! 0 dependencies, Java 8 compatible. Usage Example: DiscoverMe.INSTANCE.addEntry(SimpleChatColor.

Oct 13, 2021

NoChatLag fixes lagspikes caused by chat by removing the sender UUID from the chat packet. Please note that this breaks the vanilla client side block list.

NoChatLagServer Fabric Version | Forge Version Downloads: SpigotMC | GitHub Releases NoChatLagServer fixes WEB-5587 by setting the sender-uuid to that

Jan 10, 2022

The application consists of a web page with a list of some movies. The page allows user interaction through ratings of movies listed in the web app.

The application consists of a web page with a list of some movies. The page allows user interaction through ratings of movies listed in the web app.

DSMovie About the project https://matheus-maia-alvarez-dsmovie.netlify.app/ DSMovie is a full stack web and mobile application built during the Spring

Jul 21, 2022

Resconstruct is a java library to infer missing information vectors of java classes.

Reconstruct Resconstruct is a java library to infer missing information vectors of java classes. Features Phantom classes Inheritance solving Dummy fi

Nov 17, 2022

A library that automatically generates and manages configuration files based on classes.

sc-cfg SC-CFG is a simple, yet powerful library that automatically generate configuration files based on your classes. Compatible with Java 8+ and Kot

Nov 28, 2022

This is a Maven plugin designed to help developers automatizing the creation of code classes from YML files based on AsyncApi and OpenAPI.

SCS MultiApi Maven Plugin This is a Maven plugin designed to help developers automatizing the creation of code classes from YML files based on AsyncAp

Dec 20, 2022

JHook - A tool that can dynamically modify Java classes at runtime.

JHook A tool that can dynamically modify Java classes at runtime. Demo Tested on Java 1.8 - Java 17, just support JDK package com.binklac.jhook.test;

Dec 23, 2022

Código Fonte das classes em Java.

ExerciciosClasses ▶️ PLAYLIST COM OS EXERCÍCIOS RESOLVIDOS POO CLASSES - JAVA ▶️ ⚠️ Alguns dos exercícios foram adaptados do site Python Brasil! ⚠️ 🛑

Sep 5, 2022
Owner
Joshua Bloch
Effective Java author, API Designer, Swell guy
Joshua Bloch
ClashWars doesn't allow direct customizations, So here we are

ClashWarsFixes Custom made plugin for ClashWars bedwars plugin What does it do? As ClashWars is not configurable at all, I needed to customize some fu

Alijk 2 Nov 13, 2022
A plugin to help you easily edit Swagger and OpenAPI specification files inside IntelliJ IDEA

Swagger Plugin Swagger Plugin makes it easy to edit Swagger and OpenAPI specification files inside IntelliJ IDEA. You can find it on JetBrains' plugin

Zalando SE 1.1k Dec 15, 2022
This app is simple and awesome notepad. It is a quick notepad editing experience when writing notes,emails,message,shoppings and to do list.

This app is simple and awesome notepad. It is a quick notepad editing experience when writing notes,emails,message,shoppings and to do list.It is easy to use and enjoy hassle free with pen and paper.

Md Arif Hossain 1 Jan 18, 2022
Jamal is a macro language (JAmal MAcro Language)

Jamal Macro Language Jamal is a complex text processor with a wide variety of possible use. The first version of Jamal was developed 20 years ago in P

Peter Verhas 29 Dec 20, 2022
For Jack language. Most of codes were commented with their usage, which can be useful for beginner to realize the running principle of a compiler for object-oriented programming language.

Instructions: Download the Java source codes Store these codes into a local folder and open this folder Click the right key of mouse and click ‘Open i

gooooooood 1.1k Jan 5, 2023
Cloud Runtimes Specification for the JVM

cloud-runtimes-jvm Cloud Runtimes Specification for the JVM. Introduction Standard API for dapr / layotto / capa / .... Motivation [Discussion] Future

Reactive Group 6 Jul 28, 2022
Reactive Streams Specification for the JVM

Reactive Streams The purpose of Reactive Streams is to provide a standard for asynchronous stream processing with non-blocking backpressure. The lates

null 4.5k Dec 30, 2022
Version-agnostic and package-agnostic interfaces used in Constellar. Zero strict dependencies, works as a submodule.

bridge Version-agnostic and package-agnostic interfaces used in Constellar. Zero strict dependencies, works as a submodule. Used for cross-compatibili

uranometrical 2 Feb 23, 2022
A basic shard that demonstrates optional implementations, and interfaces.

Glass - Example A basic shard that demonstrates optional implementations, and interfaces. Basic Information A lot of stuff will be more complex than o

null 1 Feb 13, 2022
AndroidHiddenApiBypass - Bypass restrictions on non-SDK interfaces

AndroidHiddenApiBypass Bypass restrictions on non-SDK interfaces. Why AndroidHiddenApiBypass? Pure Java: no native code used. Reliable: does not rely

LSPosed 903 Jan 6, 2023