* BAEL-1068 - Javadoc example classes

* BAEL-1068 - Formatting change for pom.xml

* Updated javadoc comments to reflect article example
This commit is contained in:
Jonathan 2018-01-06 11:01:49 -06:00 committed by Grzegorz Piwowarek
parent 9b01c94acf
commit 8108875723
3 changed files with 96 additions and 0 deletions

View File

@ -390,6 +390,16 @@
</configuration>
</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>

View 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;
}
}

View 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;
}
}