mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-09 17:02:53 +00:00
Written javadoc for many classes
Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
@@ -2,11 +2,25 @@ package com.l2jserver.model.template;
|
||||
|
||||
import com.l2jserver.model.id.TemplateID;
|
||||
|
||||
/**
|
||||
* An abstract {@link Template}
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*
|
||||
* @param <T>
|
||||
* the type of object created by this template
|
||||
*/
|
||||
public abstract class AbstractTemplate<T> implements Template<T> {
|
||||
/**
|
||||
* The {@link TemplateID}F
|
||||
*/
|
||||
private final TemplateID<?> id;
|
||||
|
||||
public AbstractTemplate(TemplateID<?> id) {
|
||||
super();
|
||||
/**
|
||||
* Creates a new instance
|
||||
* @param id
|
||||
*/
|
||||
protected AbstractTemplate(TemplateID<?> id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,13 @@ package com.l2jserver.model.template;
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.template.capability.Defendable;
|
||||
import com.l2jserver.model.template.capability.IncomingDamageIntercept;
|
||||
import com.l2jserver.model.world.Item;
|
||||
|
||||
/**
|
||||
* Template for Armor {@link Item}
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class ArmorTemplate extends ItemTemplate implements Defendable,
|
||||
IncomingDamageIntercept {
|
||||
public ArmorTemplate(ItemTemplateID id) {
|
||||
|
||||
@@ -10,6 +10,11 @@ import com.l2jserver.model.world.character.CharacterBaseAttributes;
|
||||
import com.l2jserver.model.world.character.CharacterClass;
|
||||
import com.l2jserver.util.Coordinate;
|
||||
|
||||
/**
|
||||
* Template for {@link L2Character}
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class CharacterTemplate extends AbstractTemplate<L2Character> {
|
||||
/**
|
||||
* The logger
|
||||
|
||||
@@ -2,7 +2,13 @@ package com.l2jserver.model.template;
|
||||
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.template.capability.Consumable;
|
||||
import com.l2jserver.model.world.Item;
|
||||
|
||||
/**
|
||||
* Template for consumable {@link Item}
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class ConsumableTemplate extends ItemTemplate implements
|
||||
Consumable {
|
||||
public ConsumableTemplate(ItemTemplateID id) {
|
||||
|
||||
@@ -6,6 +6,11 @@ import org.slf4j.LoggerFactory;
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.world.Item;
|
||||
|
||||
/**
|
||||
* Template for an {@link Item}
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class ItemTemplate extends AbstractTemplate<Item> {
|
||||
/**
|
||||
* The logger
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
package com.l2jserver.model.template;
|
||||
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.world.Item;
|
||||
|
||||
/**
|
||||
* Template for Potion {@link Item}
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class PotionTemplate extends ConsumableTemplate {
|
||||
public PotionTemplate(ItemTemplateID id) {
|
||||
super(id);
|
||||
|
||||
@@ -4,6 +4,11 @@ import com.l2jserver.model.id.template.SkillTemplateID;
|
||||
import com.l2jserver.model.template.capability.Castable;
|
||||
import com.l2jserver.model.world.character.CharacterClass;
|
||||
|
||||
/**
|
||||
* Template for skill
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class SkillTemplate extends AbstractTemplate<Void> implements
|
||||
Castable {
|
||||
public SkillTemplate(SkillTemplateID id) {
|
||||
|
||||
@@ -1,9 +1,30 @@
|
||||
package com.l2jserver.model.template;
|
||||
|
||||
import com.l2jserver.model.id.TemplateID;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
|
||||
/**
|
||||
* An template is like a base for an {@link WorldObject}. Normally, instead of
|
||||
* manually creating the object this can be done through templates, that easy
|
||||
* the need of setting the new objects parameters.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*
|
||||
* @param <T>
|
||||
* the {@link WorldObject} type
|
||||
*/
|
||||
public interface Template<T> {
|
||||
/**
|
||||
* Create a new {@link WorldObject}
|
||||
*
|
||||
* @return the created object
|
||||
*/
|
||||
T create();
|
||||
|
||||
/**
|
||||
* Return this {@link TemplateID}
|
||||
*
|
||||
* @return the template id
|
||||
*/
|
||||
TemplateID<?> getID();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,13 @@ package com.l2jserver.model.template;
|
||||
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.template.capability.Attackable;
|
||||
import com.l2jserver.model.world.Item;
|
||||
|
||||
/**
|
||||
* Template for Weapon {@link Item}
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class WeaponTemplate extends ItemTemplate implements Attackable {
|
||||
public WeaponTemplate(ItemTemplateID id) {
|
||||
super(id);
|
||||
|
||||
Reference in New Issue
Block a user