LoveProgramming
LoveProgramming

Reputation: 2181

clojure built-in java method

are there any documentation on clojure built-in java method? for example, .toUpperCase from java.lang.String and .indexOf from clojure.lang.PersistantVector.

Is there anyway I can find useful java method without looking at the source code?

Upvotes: 1

Views: 152

Answers (3)

mikera
mikera

Reputation: 106401

As others have pointed out, you can get the java.* and javax.* documentation online pretty easily as it is part of core Java.

For the clojure.*, your best reference is the source. Even so, I'd recommend not relying on it since this code should really be considered an implementation detail of Clojure. You have no guarantee that the functionality won't change in future versions of Clojure and break any code that depends on it.

Upvotes: 4

Nathan Hughes
Nathan Hughes

Reputation: 96454

If the package for the class starts with java or javax then you can look it up in the Java documentation on Oracle's website.

For Clojure implementation classes (where the package name starts with clojure) you are probably stuck with looking at the source code. There is documentation for the intended API (the Clojure language) but not for the Java classes implementing it. You may be able to find some articles (like this one) depending on if what you're looking for is something a blogger has taken an interest in.

Upvotes: 2

Óscar López
Óscar López

Reputation: 236150

How about the Java API? All of Java's classes and methods are listed there. That covers all of the "clojure built-in java methods".

On the other hand, Clojure's classes are documented in here, Clojure's API. You have to learn to distinguish between Clojure's classes and Java's classes. All packages starting with java.* or javax.* belong to Java and are documented in the first link. The packages starting with clojure.* are from Clojure, you'll find their documentation in the second link.

Upvotes: 2

Related Questions