Merge pull request #10797 from KarthickSridhar/article_javadoc_method_reference
[ BAEL-4254 ] Referencing a method in JavaDoc comment.
This commit is contained in:
commit
e2b035feca
|
@ -0,0 +1,12 @@
|
|||
package com.baeldung.javadocmemberreference;
|
||||
|
||||
public class Animal {
|
||||
|
||||
public void run() {
|
||||
|
||||
}
|
||||
|
||||
public void run(String direction) {
|
||||
|
||||
}
|
||||
}
|
|
@ -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() {
|
||||
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.baeldung.vehicle;
|
||||
|
||||
public class Vehicle {
|
||||
|
||||
public Vehicle() {
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue