# Reading Javadocs

Most public APIs and libraries offer documentation in the form of Javadocs. Javadocs outline what features of a library are publicly accessible to developers.

Here are a few links to some commonly referenced Javadocs:\
[Java SE 8 Javadocs](https://docs.oracle.com/javase/8/docs/api/index.html?overview-summary.html)\
[Spigot Javadocs](https://hub.spigotmc.org/javadocs/bukkit/index.html?overview-summary.html)

## Fully qualified names

A fully qualified name is composed of a class's package and name. On the Javadoc of a class, this may be found near the top of the page. Fully qualified names are used when [importing classes](https://skript-mirror.gitbook.io/docs/basics/importing-classes).

![The fully qualified name of this class is org.bukkit.entity.Player ](https://121674216-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAOFeh2Jc3amJAf9-39%2F-LKPP-76nrEXy6fODpSm%2F-LKPQAW_drghXKBgMtp9%2FScreen%20Shot%202018-08-20%20at%207.57.53%20PM.png?alt=media\&token=96dbc3bb-5108-4099-ae75-b4eb8fb8595e)

![Classes may have an inheritance hierarchy which shows the fully qualified name of the class](https://121674216-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAOFeh2Jc3amJAf9-39%2F-LKPP-76nrEXy6fODpSm%2F-LKPQddZuLw2egZMXxfm%2FScreen%20Shot%202018-08-20%20at%207.58.41%20PM.png?alt=media\&token=629486e6-e8f0-42f4-ba72-ca40801dd29a)

If the name of the class contains a `.`, that is because the class is nested within another class. When referring to these classes, you must replace the `.` with a `$`.

![The fully qualified name of this class is org.bukkit.Effect$Type](https://121674216-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAOFeh2Jc3amJAf9-39%2F-LKPRvo2zQn_Ua7_HzPI%2F-LKPSW5oZUm_s-fdgusu%2FScreen%20Shot%202018-08-20%20at%208.07.22%20PM.png?alt=media\&token=401a178b-2565-41e4-9a1c-e525a0a40386)

{% hint style="info" %}
Typically, nested classes should be [imported under an alias](https://skript-mirror.gitbook.io/docs/importing-classes#dealing-with-nested-classes)!
{% endhint %}

## Non-public APIs

Javadocs do not describe everything available in a library. Most libraries include private classes, methods, fields, and constructors reserved for internal use. Using skript-mirror, these internal APIs are accessible just like any public API.

{% hint style="warning" %}
Usually, private APIs are private for a reason! Make sure you know what you're doing before you start digging around!
{% endhint %}

### Built-in inspection

skript-mirror has built-in tools for dumping all of the available members of an object. If you need a list of these members, including their return types and input parameters, you can use the [Members](https://skript-mirror.gitbook.io/docs/utilities#members) expression. If you only need a list of names, you can use the [Member Names](https://skript-mirror.gitbook.io/docs/utilities#member-names) expression.

### Source code

The best way to learn about how a library works is to read the source code! Many libraries will have their source code easily available online, though you may have to resort to decompiling libraries that are not open source.

[Craftbukkit source code](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse)\
[Online Java decompiler](http://www.javadecompilers.com/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://skript-mirror.gitbook.io/docs/basics/reading-javadocs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
