Merge pull request #10797 from KarthickSridhar/article_javadoc_method_reference

[ BAEL-4254 ]  Referencing a method in JavaDoc comment.
This commit is contained in:
Greg 2021-06-14 11:52:02 -04:00 committed by GitHub
commit e2b035feca
4 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,12 @@
package com.baeldung.javadocmemberreference;
public class Animal {
public void run() {
}
public void run(String direction) {
}
}

View File

@ -0,0 +1,49 @@
package com.baeldung.javadocmemberreference;
import com.baeldung.vehicle.Car;
public class Person {
Person() {
}
/**
* Also, check the {@link #move() Move} method for more movement details.
*/
public void walk() {
}
/**
* Check this {@link #move(String) Move} method for direction oriented movement.
*/
public void move() {
}
public void move(String direction) {
}
/**
* Additionally, check this {@link Animal#run(String) Run} method for direction based run.
*/
public void run() {
}
/**
* Also consider checking {@link com.baeldung.vehicle.Vehicle#Vehicle() Vehicle} constructor to initialize vehicle object.
*/
public void goToWork() {
}
/**
* Have a look at {@link Car#getNumberOfSeats() SeatsAvailability} method for checking the available seats needed for driving.
*/
public void drive() {
}
}

View File

@ -0,0 +1,14 @@
package com.baeldung.vehicle;
public class Car {
public Car() {
}
public static int getNumberOfSeats() {
int availableSeats = 0;
// available seats calculation logic
return availableSeats;
}
}

View File

@ -0,0 +1,8 @@
package com.baeldung.vehicle;
public class Vehicle {
public Vehicle() {
}
}