Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of @jls in javadoc?

Tags:

java

javadoc

  • @jls 4.3.2. The Class Object
  • @jls 9.8 Functional Interfaces
  • @jls 9.4.3 Interface Method Body
  • @since 1.8 */

Found this javadoc in some core java classes, what is meaning of this? when to use in writing javadoc?

like image 458
Makarand.Thorat Avatar asked Feb 21 '16 11:02

Makarand.Thorat


People also ask

Which can be declared inside interface declaration?

All variables declared inside interface are implicitly public, static and final. All methods declared inside interfaces are implicitly public and abstract, even if you don't use public or abstract keyword. Interface can extend one or more other interface.

Which of the following annotations would you apply to your interface to specify that it is an interface that contains only one abstract method?

In Java 8 you can use @FunctionalInterface annotation on interfaces with a single abstract method. It is an informative annotation type used to indicate that an interface type declaration is intended to be a functional interface. Annotation forcess to have exact one abstract mehtod. Save this answer.


1 Answers

@jls indicates a reference to a section of the Java Language Specification.

See for example:

  • 4.3.2 The Class Object
  • 9.8 Functional Interfaces
  • 9.4.3 Interface Method Body

The last annotation in your question, @since, is used to indicate the Java version (1.8 being Java 8) in which the documented class or method was first made available.

like image 104
Robby Cornelissen Avatar answered Sep 17 '22 19:09

Robby Cornelissen