Skip to content

Commit 8108875

Browse files
jonathanihmpivovarit
authored andcommitted
BAEL-1068 (eugenp#3070)
* BAEL-1068 - Javadoc example classes * BAEL-1068 - Formatting change for pom.xml * Updated javadoc comments to reflect article example
1 parent 9b01c94 commit 8108875

3 files changed

Lines changed: 96 additions & 0 deletions

File tree

‎core-java/pom.xml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,16 @@
389389
</arguments>
390390
</configuration>
391391
</plugin>
392+
393+
<plugin>
394+
<groupId>org.apache.maven.plugins</groupId>
395+
<artifactId>maven-javadoc-plugin</artifactId>
396+
<version>3.0.0-M1</version>
397+
<configuration>
398+
<source>1.8</source>
399+
<target>1.8</target>
400+
</configuration>
401+
</plugin>
392402

393403

394404
</plugins>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.baeldung.javadoc;
2+
3+
public class Person {
4+
/**
5+
* This is a first name
6+
*/
7+
private String firstName;
8+
private String lastName;
9+
10+
public String getFirstName() {
11+
return firstName;
12+
}
13+
public void setFirstName(String firstName) {
14+
this.firstName = firstName;
15+
}
16+
public String getLastName() {
17+
return lastName;
18+
}
19+
public void setLastName(String lastName) {
20+
this.lastName = lastName;
21+
}
22+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
package com.baeldung.javadoc;
2+
3+
/**
4+
* Hero is the main entity we will be using to . . .
5+
* @author Captain America
6+
*
7+
*/
8+
public class SuperHero extends Person {
9+
10+
/**
11+
* The public name of a hero that is common knowledge
12+
*/
13+
private String heroName;
14+
private String uniquePower;
15+
private int health;
16+
private int defense;
17+
18+
/**
19+
* <p>This is a simple description of the method. . .
20+
* <a href="http://www.supermanisthegreatest.com">Superman!</a>
21+
* </p>
22+
* @param incomingDamage the amount of incoming damage
23+
* @return the amount of health hero has after attack
24+
* @see <a href="http://www.link_to_jira/HERO-402">HERO-402</a>
25+
* @since 1.0
26+
*/
27+
public int successfullyAttacked(int incomingDamage, String damageType) {
28+
// do things
29+
return 0;
30+
}
31+
32+
public String getHeroName() {
33+
return heroName;
34+
}
35+
36+
public void setHeroName(String heroName) {
37+
this.heroName = heroName;
38+
}
39+
40+
public String getUniquePower() {
41+
return uniquePower;
42+
}
43+
44+
public void setUniquePower(String uniquePower) {
45+
this.uniquePower = uniquePower;
46+
}
47+
48+
public int getHealth() {
49+
return health;
50+
}
51+
52+
public void setHealth(int health) {
53+
this.health = health;
54+
}
55+
56+
public int getDefense() {
57+
return defense;
58+
}
59+
60+
public void setDefense(int defense) {
61+
this.defense = defense;
62+
}
63+
64+
}

0 commit comments

Comments
 (0)