BAEL-1068 (#3070)
* BAEL-1068 - Javadoc example classes * BAEL-1068 - Formatting change for pom.xml * Updated javadoc comments to reflect article example
This commit is contained in:
parent
9b01c94acf
commit
8108875723
@ -389,6 +389,16 @@
|
|||||||
</arguments>
|
</arguments>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>3.0.0-M1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
|
22
core-java/src/main/java/com/baeldung/javadoc/Person.java
Normal file
22
core-java/src/main/java/com/baeldung/javadoc/Person.java
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package com.baeldung.javadoc;
|
||||||
|
|
||||||
|
public class Person {
|
||||||
|
/**
|
||||||
|
* This is a first name
|
||||||
|
*/
|
||||||
|
private String firstName;
|
||||||
|
private String lastName;
|
||||||
|
|
||||||
|
public String getFirstName() {
|
||||||
|
return firstName;
|
||||||
|
}
|
||||||
|
public void setFirstName(String firstName) {
|
||||||
|
this.firstName = firstName;
|
||||||
|
}
|
||||||
|
public String getLastName() {
|
||||||
|
return lastName;
|
||||||
|
}
|
||||||
|
public void setLastName(String lastName) {
|
||||||
|
this.lastName = lastName;
|
||||||
|
}
|
||||||
|
}
|
64
core-java/src/main/java/com/baeldung/javadoc/SuperHero.java
Normal file
64
core-java/src/main/java/com/baeldung/javadoc/SuperHero.java
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
package com.baeldung.javadoc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hero is the main entity we will be using to . . .
|
||||||
|
* @author Captain America
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class SuperHero extends Person {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The public name of a hero that is common knowledge
|
||||||
|
*/
|
||||||
|
private String heroName;
|
||||||
|
private String uniquePower;
|
||||||
|
private int health;
|
||||||
|
private int defense;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>This is a simple description of the method. . .
|
||||||
|
* <a href="http://www.supermanisthegreatest.com">Superman!</a>
|
||||||
|
* </p>
|
||||||
|
* @param incomingDamage the amount of incoming damage
|
||||||
|
* @return the amount of health hero has after attack
|
||||||
|
* @see <a href="http://www.link_to_jira/HERO-402">HERO-402</a>
|
||||||
|
* @since 1.0
|
||||||
|
*/
|
||||||
|
public int successfullyAttacked(int incomingDamage, String damageType) {
|
||||||
|
// do things
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHeroName() {
|
||||||
|
return heroName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeroName(String heroName) {
|
||||||
|
this.heroName = heroName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUniquePower() {
|
||||||
|
return uniquePower;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUniquePower(String uniquePower) {
|
||||||
|
this.uniquePower = uniquePower;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHealth() {
|
||||||
|
return health;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHealth(int health) {
|
||||||
|
this.health = health;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDefense() {
|
||||||
|
return defense;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDefense(int defense) {
|
||||||
|
this.defense = defense;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user