1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-08 16:33:07 +00:00

Clean up in the entire source code

Major clean up in the source code reformatting it and organizing
imports.
This commit is contained in:
2011-09-16 13:58:41 -03:00
parent 654cc11552
commit 665e82c97a
88 changed files with 305 additions and 155 deletions

View File

@@ -42,6 +42,9 @@ public class PluginLoader implements Loader, Unloader {
/** /**
* Returns list of suitable Template classes to load/unload * Returns list of suitable Template classes to load/unload
* *
* @param classes
* loaded classes
*
* @return list of Template classes to load/unload * @return list of Template classes to load/unload
*/ */
@SuppressWarnings({ "unchecked", "unused" }) @SuppressWarnings({ "unchecked", "unused" })

View File

@@ -26,6 +26,7 @@ import com.l2jserver.model.world.NPC;
public class MonsterAI extends NPCAI { public class MonsterAI extends NPCAI {
/** /**
* @param creature * @param creature
* the creature
*/ */
protected MonsterAI(NPC creature) { protected MonsterAI(NPC creature) {
super(creature); super(creature);

View File

@@ -38,7 +38,9 @@ import com.l2jserver.service.network.keygen.BlowfishKeygenService;
public class L2JGameServerMain { public class L2JGameServerMain {
/** /**
* Main method * Main method
* @param args no arguments are used *
* @param args
* no arguments are used
*/ */
public static void main(String[] args) { public static void main(String[] args) {
final L2JGameServer server = new L2JGameServer(); final L2JGameServer server = new L2JGameServer();

View File

@@ -30,6 +30,7 @@ public interface Desire extends Comparable<Desire> {
* *
* @return hashcode for this object * @return hashcode for this object
*/ */
@Override
int hashCode(); int hashCode();
/** /**
@@ -39,6 +40,7 @@ public interface Desire extends Comparable<Desire> {
* another object to compare with * another object to compare with
* @return result of object comparation * @return result of object comparation
*/ */
@Override
boolean equals(Object obj); boolean equals(Object obj);
/** /**

View File

@@ -24,7 +24,8 @@ package com.l2jserver.game.ai.desires;
public interface DesireIteratorFilter { public interface DesireIteratorFilter {
/** /**
* This method is called each time for every desire that is in the queue.<br> * This method is called each time for every desire that is in the queue.<br>
* <br> {@link java.util.ConcurrentModificationException} will be thrown by * <br>
* {@link java.util.ConcurrentModificationException} will be thrown by
* {@link com.l2jserver.game.ai.desires.DesireQueue#iterateDesires(DesireIteratorHandler, DesireIteratorFilter[])} * {@link com.l2jserver.game.ai.desires.DesireQueue#iterateDesires(DesireIteratorHandler, DesireIteratorFilter[])}
* if any of the following methods will be called from here: * if any of the following methods will be called from here:
* <ul> * <ul>

View File

@@ -33,7 +33,8 @@ public interface DesireIteratorHandler {
/** /**
* This method is called each time for every desire that is in the queue.<br> * This method is called each time for every desire that is in the queue.<br>
* Remove of desire must be handeled by <b>iterator.remove();</b><br> * Remove of desire must be handeled by <b>iterator.remove();</b><br>
* <br> {@link java.util.ConcurrentModificationException} will be thrown by * <br>
* {@link java.util.ConcurrentModificationException} will be thrown by
* {@link com.l2jserver.game.ai.desires.DesireQueue#iterateDesires(DesireIteratorHandler, DesireIteratorFilter[])} * {@link com.l2jserver.game.ai.desires.DesireQueue#iterateDesires(DesireIteratorHandler, DesireIteratorFilter[])}
* if any of the following methods will be called from here: * if any of the following methods will be called from here:
* <ul> * <ul>

View File

@@ -59,9 +59,13 @@ public class Lineage2PipelineFactory implements ChannelPipelineFactory {
/** /**
* Creates a new instance of this pipeline * Creates a new instance of this pipeline
* @param injector the {@link Guice} {@link Injector} *
* @param networkService the network service * @param injector
* @param worldService the world service * the {@link Guice} {@link Injector}
* @param networkService
* the network service
* @param worldService
* the world service
*/ */
@Inject @Inject
public Lineage2PipelineFactory(Injector injector, public Lineage2PipelineFactory(Injector injector,

View File

@@ -94,7 +94,8 @@ public class Shortcut extends AbstractModel<ShortcutID> {
public final int id; public final int id;
/** /**
* @param id the numeric id * @param id
* the numeric id
*/ */
ShortcutType(int id) { ShortcutType(int id) {
this.id = id; this.id = id;

View File

@@ -33,7 +33,8 @@ public abstract class ID<T> {
protected final T id; protected final T id;
/** /**
* @param id the raw id * @param id
* the raw id
*/ */
@Inject @Inject
protected ID(T id) { protected ID(T id) {

View File

@@ -34,7 +34,8 @@ import com.l2jserver.model.world.Actor;
*/ */
public abstract class ActorID<T extends Actor> extends ObjectID<T> { public abstract class ActorID<T extends Actor> extends ObjectID<T> {
/** /**
* @param id the raw id * @param id
* the raw id
*/ */
@Inject @Inject
public ActorID(@Assisted int id) { public ActorID(@Assisted int id) {

View File

@@ -38,8 +38,10 @@ public final class CharacterID extends ActorID<L2Character> {
private transient final CharacterDAO characterDao; private transient final CharacterDAO characterDao;
/** /**
* @param id the raw id * @param id
* @param characterDao the character DAO * the raw id
* @param characterDao
* the character DAO
*/ */
@Inject @Inject
public CharacterID(@Assisted int id, CharacterDAO characterDao) { public CharacterID(@Assisted int id, CharacterDAO characterDao) {

View File

@@ -38,8 +38,10 @@ public final class ClanID extends ObjectID<Clan> {
private final ClanDAO clanDao; private final ClanDAO clanDao;
/** /**
* @param id the raw id * @param id
* @param clanDao the clan DAO * the raw id
* @param clanDao
* the clan DAO
*/ */
@Inject @Inject
protected ClanID(@Assisted int id, ClanDAO clanDao) { protected ClanID(@Assisted int id, ClanDAO clanDao) {

View File

@@ -38,8 +38,10 @@ public final class ItemID extends ObjectID<Item> {
private final ItemDAO itemDao; private final ItemDAO itemDao;
/** /**
* @param id the raw id * @param id
* @param itemDao the item DAO * the raw id
* @param itemDao
* the item DAO
*/ */
@Inject @Inject
protected ItemID(@Assisted int id, ItemDAO itemDao) { protected ItemID(@Assisted int id, ItemDAO itemDao) {

View File

@@ -37,8 +37,10 @@ public final class PetID extends ActorID<Pet> {
private final PetDAO petDao; private final PetDAO petDao;
/** /**
* @param id the raw id * @param id
* @param petDao the pet DAO * the raw id
* @param petDao
* the pet DAO
*/ */
@Inject @Inject
protected PetID(int id, PetDAO petDao) { protected PetID(int id, PetDAO petDao) {

View File

@@ -28,7 +28,8 @@ import com.l2jserver.service.game.template.TemplateService;
* An {@link TemplateID} instance representing an {@link ActorTemplate} object * An {@link TemplateID} instance representing an {@link ActorTemplate} object
* *
* @param <T> * @param <T>
* the type of {@link ActorTemplate} this {@link TemplateID} represents * the type of {@link ActorTemplate} this {@link TemplateID}
* represents
* @author <a href="http://www.rogiel.com">Rogiel</a> * @author <a href="http://www.rogiel.com">Rogiel</a>
*/ */
public class ActorTemplateID<T extends ActorTemplate<?>> extends public class ActorTemplateID<T extends ActorTemplate<?>> extends
@@ -39,8 +40,10 @@ public class ActorTemplateID<T extends ActorTemplate<?>> extends
private transient final TemplateService templateService; private transient final TemplateService templateService;
/** /**
* @param id the raw id * @param id
* @param templateService the template service * the raw id
* @param templateService
* the template service
*/ */
@Inject @Inject
protected ActorTemplateID(@Assisted int id, TemplateService templateService) { protected ActorTemplateID(@Assisted int id, TemplateService templateService) {

View File

@@ -30,8 +30,10 @@ import com.l2jserver.service.game.template.TemplateService;
*/ */
public class CharacterTemplateID extends ActorTemplateID<CharacterTemplate> { public class CharacterTemplateID extends ActorTemplateID<CharacterTemplate> {
/** /**
* @param id the raw id * @param id
* @param templateService the template service * the raw id
* @param templateService
* the template service
*/ */
@Inject @Inject
public CharacterTemplateID(@Assisted int id, TemplateService templateService) { public CharacterTemplateID(@Assisted int id, TemplateService templateService) {

View File

@@ -37,8 +37,10 @@ public class ItemTemplateID extends TemplateID<ItemTemplate, Integer> {
private final TemplateService templateService; private final TemplateService templateService;
/** /**
* @param id the raw id * @param id
* @param templateService the template service * the raw id
* @param templateService
* the template service
*/ */
@Inject @Inject
public ItemTemplateID(@Assisted int id, TemplateService templateService) { public ItemTemplateID(@Assisted int id, TemplateService templateService) {

View File

@@ -33,8 +33,10 @@ import com.l2jserver.util.jaxb.NPCTemplateIDAdapter;
@XmlJavaTypeAdapter(value = NPCTemplateIDAdapter.class) @XmlJavaTypeAdapter(value = NPCTemplateIDAdapter.class)
public class NPCTemplateID extends ActorTemplateID<NPCTemplate> { public class NPCTemplateID extends ActorTemplateID<NPCTemplate> {
/** /**
* @param id the raw id * @param id
* @param templateService the template service * the raw id
* @param templateService
* the template service
*/ */
@Inject @Inject
public NPCTemplateID(@Assisted int id, TemplateService templateService) { public NPCTemplateID(@Assisted int id, TemplateService templateService) {

View File

@@ -34,8 +34,10 @@ public class SkillTemplateID extends TemplateID<SkillTemplate, Integer> {
private final TemplateService templateService; private final TemplateService templateService;
/** /**
* @param id the raw id * @param id
* @param templateService the template service * the raw id
* @param templateService
* the template service
*/ */
@Inject @Inject
public SkillTemplateID(@Assisted int id, TemplateService templateService) { public SkillTemplateID(@Assisted int id, TemplateService templateService) {

View File

@@ -40,8 +40,10 @@ public class TeleportationTemplateID extends
private final TemplateService templateService; private final TemplateService templateService;
/** /**
* @param id the raw id * @param id
* @param templateService the template service * the raw id
* @param templateService
* the template service
*/ */
@Inject @Inject
public TeleportationTemplateID(@Assisted int id, public TeleportationTemplateID(@Assisted int id,

View File

@@ -14,7 +14,8 @@ public enum CharacterRace {
public final int id; public final int id;
/** /**
* @param id the race numeric id * @param id
* the race numeric id
*/ */
CharacterRace(int id) { CharacterRace(int id) {
this.id = id; this.id = id;

View File

@@ -70,7 +70,8 @@ public class Item extends PositionableObject {
private long count = 1; private long count = 1;
/** /**
* @param templateID the item template id * @param templateID
* the item template id
*/ */
public Item(ItemTemplateID templateID) { public Item(ItemTemplateID templateID) {
this.templateID = templateID; this.templateID = templateID;

View File

@@ -361,6 +361,7 @@ public class L2Character extends Player {
/** /**
* @return the stats * @return the stats
*/ */
@Override
public CharacterStats getStats() { public CharacterStats getStats() {
return stats; return stats;
} }

View File

@@ -101,8 +101,10 @@ public class NPC extends Actor {
} }
/** /**
* @param maxHP the maximum HP * @param maxHP
* @throws UnsupportedOperationException always * the maximum HP
* @throws UnsupportedOperationException
* always
*/ */
public void setMaxHP(double maxHP) { public void setMaxHP(double maxHP) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
@@ -116,8 +118,10 @@ public class NPC extends Actor {
} }
/** /**
* @param maxMP the maximum MP * @param maxMP
* @throws UnsupportedOperationException always * the maximum MP
* @throws UnsupportedOperationException
* always
*/ */
public void setMaxMP(double maxMP) { public void setMaxMP(double maxMP) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();

View File

@@ -37,7 +37,8 @@ public class Pet extends Player {
private ItemID itemID; private ItemID itemID;
/** /**
* @param templateID the pet template id * @param templateID
* the pet template id
*/ */
public Pet(ActorTemplateID<?> templateID) { public Pet(ActorTemplateID<?> templateID) {
super(templateID); super(templateID);

View File

@@ -26,7 +26,8 @@ import com.l2jserver.model.id.template.ActorTemplateID;
*/ */
public abstract class Player extends Actor { public abstract class Player extends Actor {
/** /**
* @param templateID the actor template id * @param templateID
* the actor template id
*/ */
public Player(ActorTemplateID<?> templateID) { public Player(ActorTemplateID<?> templateID) {
super(templateID); super(templateID);

View File

@@ -55,7 +55,8 @@ public abstract class PositionableObject extends AbstractObject {
} }
/** /**
* @param coord sets the current position * @param coord
* sets the current position
*/ */
public void setPosition(Coordinate coord) { public void setPosition(Coordinate coord) {
desireUpdate(); desireUpdate();

View File

@@ -79,7 +79,8 @@ public enum ActorExperience {
public final int level; public final int level;
/** /**
* @param experience the minimum experience for the level * @param experience
* the minimum experience for the level
*/ */
ActorExperience(long experience) { ActorExperience(long experience) {
this.experience = experience; this.experience = experience;

View File

@@ -139,6 +139,7 @@ public class CharacterShortcutContainer implements Iterable<Shortcut> {
/** /**
* Compares two shortcut slots * Compares two shortcut slots
*
* @author <a href="http://www.rogiel.com">Rogiel</a> * @author <a href="http://www.rogiel.com">Rogiel</a>
*/ */
public static class ShortcutSlotComparator implements Comparator<Shortcut>, public static class ShortcutSlotComparator implements Comparator<Shortcut>,

View File

@@ -28,7 +28,8 @@ import com.l2jserver.util.calculator.Calculator;
*/ */
public class CharacterCalculator extends ActorCalculator { public class CharacterCalculator extends ActorCalculator {
/** /**
* @param calculators the calculators * @param calculators
* the calculators
*/ */
public CharacterCalculator( public CharacterCalculator(
Calculator<ActorCalculatorContext, StatType>... calculators) { Calculator<ActorCalculatorContext, StatType>... calculators) {

View File

@@ -32,7 +32,9 @@ public class CharacterCalculatorContext extends ActorCalculatorContext {
/** /**
* Creates a new context * Creates a new context
* @param character the character *
* @param character
* the character
*/ */
public CharacterCalculatorContext(L2Character character) { public CharacterCalculatorContext(L2Character character) {
super(character); super(character);

View File

@@ -25,8 +25,10 @@ import com.l2jserver.model.world.actor.stat.StatType;
*/ */
public abstract class CharacterFormula extends CharacterCalculatorFunction { public abstract class CharacterFormula extends CharacterCalculatorFunction {
/** /**
* @param order the calculation order * @param order
* @param type the stat type * the calculation order
* @param type
* the stat type
*/ */
public CharacterFormula(int order, StatType type) { public CharacterFormula(int order, StatType type) {
super(order, type); super(order, type);

View File

@@ -41,6 +41,7 @@ public class MaximumCPAddCalculator extends CharacterFormula {
super(0x100, StatType.MAX_CP); super(0x100, StatType.MAX_CP);
} }
@Override
protected double calculate(L2Character c, CharacterTemplate t, double value) { protected double calculate(L2Character c, CharacterTemplate t, double value) {
int lvl = c.getLevel() - t.getMinimumLevel(); int lvl = c.getLevel() - t.getMinimumLevel();
double mod = t.getBaseCPModifier() * lvl; double mod = t.getBaseCPModifier() * lvl;

View File

@@ -42,6 +42,7 @@ public class MaximumCPBonusCalculator extends CharacterFormula {
super(0x100, StatType.MAX_CP); super(0x100, StatType.MAX_CP);
} }
@Override
protected double calculate(L2Character c, CharacterTemplate t, double value) { protected double calculate(L2Character c, CharacterTemplate t, double value) {
return value return value
* BaseStats.CON.calculateBonus(c.getStats().getConcentration()); * BaseStats.CON.calculateBonus(c.getStats().getConcentration());

View File

@@ -41,6 +41,7 @@ public class MaximumHPAddCalculator extends CharacterFormula {
super(0x100, StatType.MAX_HP); super(0x100, StatType.MAX_HP);
} }
@Override
public double calculate(L2Character c, CharacterTemplate t, double value) { public double calculate(L2Character c, CharacterTemplate t, double value) {
int lvl = c.getLevel() - t.getMinimumLevel(); int lvl = c.getLevel() - t.getMinimumLevel();
double mod = t.getBaseHPModifier() * lvl; double mod = t.getBaseHPModifier() * lvl;

View File

@@ -32,7 +32,9 @@ public class NPCCalculatorContext extends ActorCalculatorContext {
/** /**
* Creates a new calculator context * Creates a new calculator context
* @param npc the {@link NPC} *
* @param npc
* the {@link NPC}
*/ */
public NPCCalculatorContext(NPC npc) { public NPCCalculatorContext(NPC npc) {
super(npc); super(npc);

View File

@@ -28,7 +28,7 @@ public abstract class ServiceException extends L2Exception {
* The Java Serialization API serial * The Java Serialization API serial
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* Creates a new instance of this exception * Creates a new instance of this exception
*/ */

View File

@@ -27,7 +27,7 @@ public class ServiceRestartException extends ServiceException {
* The Java Serialization API serial * The Java Serialization API serial
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* Creates a new instance of this exception * Creates a new instance of this exception
*/ */

View File

@@ -26,7 +26,7 @@ public class ServiceStartException extends ServiceException {
* The Java Serialization API serial * The Java Serialization API serial
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* Creates a new instance of this exception * Creates a new instance of this exception
*/ */

View File

@@ -26,7 +26,7 @@ public class ServiceStopException extends ServiceException {
* The Java Serialization API serial * The Java Serialization API serial
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* Creates a new instance of this exception * Creates a new instance of this exception
*/ */

View File

@@ -20,8 +20,10 @@ package com.l2jserver.service.cache;
* This interface represents a Map structure for cache usage. * This interface represents a Map structure for cache usage.
* *
* @author <a href="http://www.rogiel.com">Rogiel</a> * @author <a href="http://www.rogiel.com">Rogiel</a>
* @param <K> the key type * @param <K>
* @param <V> the value type * the key type
* @param <V>
* the value type
*/ */
public interface Cache<K, V> extends Iterable<V> { public interface Cache<K, V> extends Iterable<V> {
/** /**

View File

@@ -56,7 +56,8 @@ public interface CacheService extends Service {
* the cache value type * the cache value type
* @param name * @param name
* the cache name * the cache name
* @param size the maximum cache size * @param size
* the maximum cache size
* @size the maximum cache size * @size the maximum cache size
* @return the created cache * @return the created cache
*/ */
@@ -73,7 +74,8 @@ public interface CacheService extends Service {
* the cache value type * the cache value type
* @param name * @param name
* the cache name * the cache name
* @param size the maximum cache size * @param size
* the maximum cache size
* @size the maximum cache size * @size the maximum cache size
* @return the created cache * @return the created cache
*/ */

View File

@@ -180,7 +180,8 @@ public class EhCacheService extends AbstractService implements CacheService {
private final net.sf.ehcache.Cache cache; private final net.sf.ehcache.Cache cache;
/** /**
* @param cache the backing cache * @param cache
* the backing cache
*/ */
public EhCacheFacade(net.sf.ehcache.Cache cache) { public EhCacheFacade(net.sf.ehcache.Cache cache) {
this.cache = cache; this.cache = cache;

View File

@@ -24,6 +24,7 @@ import java.lang.annotation.Target;
/** /**
* Indicate to the proxy that this method should not be cached. * Indicate to the proxy that this method should not be cached.
*
* @author <a href="http://www.rogiel.com">Rogiel</a> * @author <a href="http://www.rogiel.com">Rogiel</a>
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)

View File

@@ -35,8 +35,10 @@ class MethodInvocation {
private final Object[] args; private final Object[] args;
/** /**
* @param method the method invoked * @param method
* @param args the invocation arguments * the method invoked
* @param args
* the invocation arguments
*/ */
public MethodInvocation(Method method, Object[] args) { public MethodInvocation(Method method, Object[] args) {
this.method = method; this.method = method;

View File

@@ -43,7 +43,7 @@ public class SoftCacheService extends AbstractService implements CacheService {
* The logger * The logger
*/ */
private final Logger log = LoggerFactory.getLogger(this.getClass()); private final Logger log = LoggerFactory.getLogger(this.getClass());
/** /**
* The interface cache * The interface cache
*/ */
@@ -61,7 +61,7 @@ public class SoftCacheService extends AbstractService implements CacheService {
Preconditions.checkNotNull(instance, "instance"); Preconditions.checkNotNull(instance, "instance");
Preconditions.checkArgument(interfaceType.isInterface(), Preconditions.checkArgument(interfaceType.isInterface(),
"interfaceType is not an interface"); "interfaceType is not an interface");
log.debug("Decorating {} with cache", interfaceType); log.debug("Decorating {} with cache", interfaceType);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@@ -101,7 +101,8 @@ public class SoftCacheService extends AbstractService implements CacheService {
@Override @Override
public <K, V> Cache<K, V> createEternalCache(String name, int size) { public <K, V> Cache<K, V> createEternalCache(String name, int size) {
log.debug("Creating eternal cache {} with minimum size of {}", name, size); log.debug("Creating eternal cache {} with minimum size of {}", name,
size);
return new EternalCache<K, V>(name); return new EternalCache<K, V>(name);
} }
@@ -130,11 +131,13 @@ public class SoftCacheService extends AbstractService implements CacheService {
* value object) * value object)
* *
* @author <a href="http://www.rogiel.com">Rogiel</a> * @author <a href="http://www.rogiel.com">Rogiel</a>
* @param <K> the key type * @param <K>
* @param <V> the value type * the key type
* @param <V>
* the value type
*/ */
private class SoftCache<K, V> extends AbstractReferenceCache<K, V> implements private class SoftCache<K, V> extends AbstractReferenceCache<K, V>
Cache<K, V> { implements Cache<K, V> {
/** /**
* This class is a {@link SoftReference} with additional responsibility * This class is a {@link SoftReference} with additional responsibility
* of holding key object * of holding key object

View File

@@ -42,7 +42,8 @@ public abstract class AbstractDAO<T extends Model<?>, I extends ID<?>>
protected final DatabaseService database; protected final DatabaseService database;
/** /**
* @param database the database service * @param database
* the database service
*/ */
@Inject @Inject
protected AbstractDAO(DatabaseService database) { protected AbstractDAO(DatabaseService database) {

View File

@@ -41,7 +41,8 @@ public abstract class AbstractJDBCDAO<T extends Model<?>, I extends ID<?>>
protected final JDBCDatabaseService database; protected final JDBCDatabaseService database;
/** /**
* @param database the database service * @param database
* the database service
*/ */
@Inject @Inject
protected AbstractJDBCDAO(DatabaseService database) { protected AbstractJDBCDAO(DatabaseService database) {

View File

@@ -64,9 +64,12 @@ public abstract class JDBCCharacterFriendDAO extends
+ "_friend"; + "_friend";
/** /**
* @param database the database service * @param database
* @param idProvider the frind id provider * the database service
* @param charIdProvider the character id provider * @param idProvider
* the frind id provider
* @param charIdProvider
* the character id provider
*/ */
@Inject @Inject
public JDBCCharacterFriendDAO(DatabaseService database, public JDBCCharacterFriendDAO(DatabaseService database,

View File

@@ -80,10 +80,14 @@ public abstract class JDBCItemDAO extends AbstractJDBCDAO<Item, ItemID>
public static final String COORD_Z = "coord_z"; public static final String COORD_Z = "coord_z";
/** /**
* @param database the database service * @param database
* @param idFactory the item id provider * the database service
* @param templateIdFactory the item template id provider * @param idFactory
* @param charIdFactory the character id provider * the item id provider
* @param templateIdFactory
* the item template id provider
* @param charIdFactory
* the character id provider
*/ */
@Inject @Inject
public JDBCItemDAO(DatabaseService database, public JDBCItemDAO(DatabaseService database,

View File

@@ -31,9 +31,12 @@ import com.l2jserver.service.database.jdbc.JDBCCharacterFriendDAO;
public class H2CharacterFriendDAO extends JDBCCharacterFriendDAO implements public class H2CharacterFriendDAO extends JDBCCharacterFriendDAO implements
CharacterFriendDAO { CharacterFriendDAO {
/** /**
* @param database the database service * @param database
* @param idProvider the frind id provider * the database service
* @param charIdProvider the character id provider * @param idProvider
* the frind id provider
* @param charIdProvider
* the character id provider
*/ */
@Inject @Inject
public H2CharacterFriendDAO(DatabaseService database, public H2CharacterFriendDAO(DatabaseService database,

View File

@@ -31,10 +31,14 @@ import com.l2jserver.service.database.jdbc.JDBCItemDAO;
*/ */
public class H2ItemDAO extends JDBCItemDAO implements ItemDAO { public class H2ItemDAO extends JDBCItemDAO implements ItemDAO {
/** /**
* @param database the database service * @param database
* @param idFactory the item id provider * the database service
* @param templateIdFactory the item template id provider * @param idFactory
* @param charIdFactory the character id provider * the item id provider
* @param templateIdFactory
* the item template id provider
* @param charIdFactory
* the character id provider
*/ */
@Inject @Inject
public H2ItemDAO(DatabaseService database, ItemIDProvider idFactory, public H2ItemDAO(DatabaseService database, ItemIDProvider idFactory,

View File

@@ -31,9 +31,12 @@ import com.l2jserver.service.database.jdbc.JDBCNPCDAO;
*/ */
public class H2NPCDAO extends JDBCNPCDAO implements NPCDAO { public class H2NPCDAO extends JDBCNPCDAO implements NPCDAO {
/** /**
* @param database the database service * @param database
* @param idProvider the npc id provider * the database service
* @param templateIdProvider the npc template id provider * @param idProvider
* the npc id provider
* @param templateIdProvider
* the npc template id provider
*/ */
@Inject @Inject
public H2NPCDAO(DatabaseService database, NPCIDProvider idProvider, public H2NPCDAO(DatabaseService database, NPCIDProvider idProvider,

View File

@@ -31,9 +31,12 @@ import com.l2jserver.service.database.jdbc.JDBCCharacterFriendDAO;
public class MySQL5CharacterFriendDAO extends JDBCCharacterFriendDAO implements public class MySQL5CharacterFriendDAO extends JDBCCharacterFriendDAO implements
CharacterFriendDAO { CharacterFriendDAO {
/** /**
* @param database the database service * @param database
* @param idProvider the frind id provider * the database service
* @param charIdProvider the character id provider * @param idProvider
* the frind id provider
* @param charIdProvider
* the character id provider
*/ */
@Inject @Inject
public MySQL5CharacterFriendDAO(DatabaseService database, public MySQL5CharacterFriendDAO(DatabaseService database,

View File

@@ -31,10 +31,14 @@ import com.l2jserver.service.database.jdbc.JDBCItemDAO;
*/ */
public class MySQL5ItemDAO extends JDBCItemDAO implements ItemDAO { public class MySQL5ItemDAO extends JDBCItemDAO implements ItemDAO {
/** /**
* @param database the database service * @param database
* @param idFactory the item id provider * the database service
* @param templateIdFactory the item template id provider * @param idFactory
* @param charIdFactory the character id provider * the item id provider
* @param templateIdFactory
* the item template id provider
* @param charIdFactory
* the character id provider
*/ */
@Inject @Inject
public MySQL5ItemDAO(DatabaseService database, ItemIDProvider idFactory, public MySQL5ItemDAO(DatabaseService database, ItemIDProvider idFactory,

View File

@@ -31,9 +31,12 @@ import com.l2jserver.service.database.jdbc.JDBCNPCDAO;
*/ */
public class MySQL5NPCDAO extends JDBCNPCDAO implements NPCDAO { public class MySQL5NPCDAO extends JDBCNPCDAO implements NPCDAO {
/** /**
* @param database the database service * @param database
* @param idProvider the npc id provider * the database service
* @param templateIdProvider the npc template id provider * @param idProvider
* the npc id provider
* @param templateIdProvider
* the npc template id provider
*/ */
@Inject @Inject
public MySQL5NPCDAO(DatabaseService database, NPCIDProvider idProvider, public MySQL5NPCDAO(DatabaseService database, NPCIDProvider idProvider,

View File

@@ -69,9 +69,12 @@ public class AttackServiceImpl extends AbstractService implements AttackService
private final WorldEventDispatcher eventDispatcher; private final WorldEventDispatcher eventDispatcher;
/** /**
* @param threadService the thread service * @param threadService
* @param npcService the npc service * the thread service
* @param eventDispatcher the world service event dispatcher * @param npcService
* the npc service
* @param eventDispatcher
* the world service event dispatcher
*/ */
@Inject @Inject
public AttackServiceImpl(ThreadService threadService, public AttackServiceImpl(ThreadService threadService,
@@ -107,8 +110,10 @@ public class AttackServiceImpl extends AbstractService implements AttackService
private final Actor target; private final Actor target;
/** /**
* @param attacker the attacker * @param attacker
* @param target the target * the attacker
* @param target
* the target
*/ */
public AttackCallable(Actor attacker, Actor target) { public AttackCallable(Actor attacker, Actor target) {
this.attacker = attacker; this.attacker = attacker;
@@ -125,8 +130,9 @@ public class AttackServiceImpl extends AbstractService implements AttackService
// TODO calculate miss // TODO calculate miss
// TODO calculate critical // TODO calculate critical
// TODO calculate soulshot // TODO calculate soulshot
log.debug("Attack dealt {} damage, but only {} is effective", damage, dealDamage); log.debug("Attack dealt {} damage, but only {} is effective",
damage, dealDamage);
// reduce target life // reduce target life
target.setHP(target.getHP() - dealDamage); target.setHP(target.getHP() - dealDamage);

View File

@@ -33,7 +33,7 @@ public class DuelServiceImpl extends AbstractService implements DuelService {
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
private final Logger log = LoggerFactory.getLogger(this.getClass()); private final Logger log = LoggerFactory.getLogger(this.getClass());
@Override @Override
public void start(L2Character character1, L2Character character2) { public void start(L2Character character1, L2Character character2) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -33,7 +33,7 @@ public class GameTimeServiceImpl extends AbstractService implements
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
private final Logger log = LoggerFactory.getLogger(this.getClass()); private final Logger log = LoggerFactory.getLogger(this.getClass());
@Override @Override
public int getGameTime() { public int getGameTime() {
return (int) (System.currentTimeMillis() % GAME_DAY) / 1000; return (int) (System.currentTimeMillis() % GAME_DAY) / 1000;

View File

@@ -26,4 +26,5 @@ public class CharacterAlreadyRunningServiceException extends
/** /**
* The Java Serialization API serial * The Java Serialization API serial
*/ */
private static final long serialVersionUID = 1L;} private static final long serialVersionUID = 1L;
}

View File

@@ -26,4 +26,5 @@ public class CharacterAlreadyWalkingServiceException extends
/** /**
* The Java Serialization API serial * The Java Serialization API serial
*/ */
private static final long serialVersionUID = 1L;} private static final long serialVersionUID = 1L;
}

View File

@@ -25,4 +25,5 @@ public class CharacterInJailServiceException extends CharacterServiceException {
/** /**
* The Java Serialization API serial * The Java Serialization API serial
*/ */
private static final long serialVersionUID = 1L;} private static final long serialVersionUID = 1L;
}

View File

@@ -21,9 +21,9 @@ package com.l2jserver.service.game.character;
* *
* @author <a href="http://www.rogiel.com">Rogiel</a> * @author <a href="http://www.rogiel.com">Rogiel</a>
*/ */
public class CharacterInvalidNameException extends public class CharacterInvalidNameException extends CharacterServiceException {
CharacterServiceException {
/** /**
* The Java Serialization API serial * The Java Serialization API serial
*/ */
private static final long serialVersionUID = 1L;} private static final long serialVersionUID = 1L;
}

View File

@@ -26,4 +26,5 @@ public class CharacterNameAlreadyExistsException extends
/** /**
* The Java Serialization API serial * The Java Serialization API serial
*/ */
private static final long serialVersionUID = 1L;} private static final long serialVersionUID = 1L;
}

View File

@@ -26,4 +26,5 @@ public class CharacterNotInJailServiceException extends
/** /**
* The Java Serialization API serial * The Java Serialization API serial
*/ */
private static final long serialVersionUID = 1L;} private static final long serialVersionUID = 1L;
}

View File

@@ -26,7 +26,7 @@ public class CharacterServiceException extends ServiceException {
* The Java Serialization API serial * The Java Serialization API serial
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* Creates a new instance of this exception * Creates a new instance of this exception
*/ */

View File

@@ -45,8 +45,10 @@ public class DatabaseChatLoggingService extends AbstractService implements
private final CharacterIDProvider charIdProvider; private final CharacterIDProvider charIdProvider;
/** /**
* @param chatMessageDao the chat message DAO * @param chatMessageDao
* @param charIdProvider the character id provider * the chat message DAO
* @param charIdProvider
* the character id provider
*/ */
@Inject @Inject
protected DatabaseChatLoggingService(ChatMessageDAO chatMessageDao, protected DatabaseChatLoggingService(ChatMessageDAO chatMessageDao,

View File

@@ -329,7 +329,8 @@ public class SimpleChatService extends AbstractService implements ChatService {
private final CharacterID character; private final CharacterID character;
/** /**
* @param character the target character {@link ID} * @param character
* the target character {@link ID}
*/ */
public PrivateChatChannelImpl(CharacterID character) { public PrivateChatChannelImpl(CharacterID character) {
Preconditions.checkNotNull(character, "character"); Preconditions.checkNotNull(character, "character");

View File

@@ -34,8 +34,10 @@ public class Tile {
private final byte flags; private final byte flags;
/** /**
* @param point the file point * @param point
* @param flags the tile flags * the file point
* @param flags
* the tile flags
*/ */
public Tile(Point point, byte flags) { public Tile(Point point, byte flags) {
this.point = point; this.point = point;

View File

@@ -40,7 +40,7 @@ public class AStarPathingService extends AbstractService implements
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
private final Logger log = LoggerFactory.getLogger(this.getClass()); private final Logger log = LoggerFactory.getLogger(this.getClass());
@Override @Override
public Path findPath(PositionableObject object, Point3D point) { public Path findPath(PositionableObject object, Point3D point) {
return null; return null;

View File

@@ -185,8 +185,10 @@ public class MapperPathingService extends AbstractService implements
private final Point3D target; private final Point3D target;
/** /**
* @param source the source point * @param source
* @param target the taget point * the source point
* @param target
* the taget point
*/ */
public VoidPath(Point3D source, Point3D target) { public VoidPath(Point3D source, Point3D target) {
this.source = source; this.source = source;

View File

@@ -32,7 +32,8 @@ public class DefaultClassListener implements ClassListener {
private final Injector injector; private final Injector injector;
/** /**
* @param injector the {@link Guice} {@link Injector} * @param injector
* the {@link Guice} {@link Injector}
*/ */
public DefaultClassListener(Injector injector) { public DefaultClassListener(Injector injector) {
this.injector = injector; this.injector = injector;

View File

@@ -85,11 +85,16 @@ public class CachedWorldIDService extends AbstractService implements
private boolean loaded = false; private boolean loaded = false;
/** /**
* @param cacheService the cache service * @param cacheService
* @param allocator the id allocator * the cache service
* @param characterDao the character DAO * @param allocator
* @param itemDao the item dao * the id allocator
* @param npcDao the NPC dao * @param characterDao
* the character DAO
* @param itemDao
* the item dao
* @param npcDao
* the NPC dao
*/ */
@Inject @Inject
public CachedWorldIDService(CacheService cacheService, public CachedWorldIDService(CacheService cacheService,

View File

@@ -34,7 +34,8 @@ public class KnownListFilter extends AndFilter<PositionableObject> {
public static final int KNOWNLIST_RANGE = 2000; public static final int KNOWNLIST_RANGE = 2000;
/** /**
* @param object the object to locate known objects * @param object
* the object to locate known objects
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public KnownListFilter(PositionableObject object) { public KnownListFilter(PositionableObject object) {

View File

@@ -58,7 +58,7 @@ public class NettyNetworkService extends AbstractService implements
* The logger * The logger
*/ */
private final Logger log = LoggerFactory.getLogger(this.getClass()); private final Logger log = LoggerFactory.getLogger(this.getClass());
/** /**
* The {@link WorldService} instance * The {@link WorldService} instance
*/ */
@@ -87,9 +87,12 @@ public class NettyNetworkService extends AbstractService implements
private Set<Lineage2Client> clients = CollectionFactory.newSet(); private Set<Lineage2Client> clients = CollectionFactory.newSet();
/** /**
* @param configService the configuration service * @param configService
* @param injector the {@link Guice} {@link Injector} * the configuration service
* @param worldService the world service * @param injector
* the {@link Guice} {@link Injector}
* @param worldService
* the world service
*/ */
@Inject @Inject
public NettyNetworkService(ConfigurationService configService, public NettyNetworkService(ConfigurationService configService,
@@ -113,9 +116,9 @@ public class NettyNetworkService extends AbstractService implements
@Override @Override
public void register(final Lineage2Client client) { public void register(final Lineage2Client client) {
Preconditions.checkNotNull(client, "client"); Preconditions.checkNotNull(client, "client");
log.debug("Registering client: {}", client); log.debug("Registering client: {}", client);
clients.add(client); clients.add(client);
client.getChannel().getCloseFuture() client.getChannel().getCloseFuture()
.addListener(new ChannelFutureListener() { .addListener(new ChannelFutureListener() {
@@ -130,7 +133,7 @@ public class NettyNetworkService extends AbstractService implements
@Override @Override
public void unregister(Lineage2Client client) { public void unregister(Lineage2Client client) {
Preconditions.checkNotNull(client, "client"); Preconditions.checkNotNull(client, "client");
log.debug("Unregistering client: {}", client); log.debug("Unregistering client: {}", client);
clients.remove(client); clients.remove(client);
} }
@@ -138,9 +141,9 @@ public class NettyNetworkService extends AbstractService implements
@Override @Override
public Lineage2Client discover(CharacterID character) { public Lineage2Client discover(CharacterID character) {
Preconditions.checkNotNull(character, "character"); Preconditions.checkNotNull(character, "character");
log.debug("Discovering client object for {}", character); log.debug("Discovering client object for {}", character);
for (final Lineage2Client client : clients) { for (final Lineage2Client client : clients) {
if (character.equals(client.getCharacterID())) if (character.equals(client.getCharacterID()))
return client; return client;
@@ -151,9 +154,9 @@ public class NettyNetworkService extends AbstractService implements
@Override @Override
public void broadcast(ServerPacket packet) { public void broadcast(ServerPacket packet) {
Preconditions.checkNotNull(packet, "packet"); Preconditions.checkNotNull(packet, "packet");
log.debug("Broadcasting {} packet to all connected clients", packet); log.debug("Broadcasting {} packet to all connected clients", packet);
channel.write(packet); channel.write(packet);
} }

View File

@@ -79,8 +79,10 @@ public class BroadcastServiceImpl extends AbstractService implements
private final WorldEventDispatcher eventDispatcher; private final WorldEventDispatcher eventDispatcher;
/** /**
* @param worldService the world service * @param worldService
* @param eventDispatcher the world service event disptacher * the world service
* @param eventDispatcher
* the world service event disptacher
*/ */
@Inject @Inject
public BroadcastServiceImpl(WorldService worldService, public BroadcastServiceImpl(WorldService worldService,

View File

@@ -37,7 +37,7 @@ public class PseudoRandomBlowfishKeygenService extends AbstractService
* The logger * The logger
*/ */
private final Logger log = LoggerFactory.getLogger(this.getClass()); private final Logger log = LoggerFactory.getLogger(this.getClass());
/** /**
* The random number generator * The random number generator
*/ */
@@ -51,7 +51,7 @@ public class PseudoRandomBlowfishKeygenService extends AbstractService
@Override @Override
public byte[] generate() { public byte[] generate() {
log.debug("Generating a new key"); log.debug("Generating a new key");
final byte[] key = new byte[16]; final byte[] key = new byte[16];
// randomize the 8 first bytes // randomize the 8 first bytes
for (int i = 0; i < key.length; i++) { for (int i = 0; i < key.length; i++) {

View File

@@ -38,7 +38,7 @@ public class SecureBlowfishKeygenService extends AbstractService implements
* The logger * The logger
*/ */
private final Logger log = LoggerFactory.getLogger(this.getClass()); private final Logger log = LoggerFactory.getLogger(this.getClass());
/** /**
* The random number generator * The random number generator
*/ */
@@ -52,7 +52,7 @@ public class SecureBlowfishKeygenService extends AbstractService implements
@Override @Override
public byte[] generate() { public byte[] generate() {
log.debug("Generating a new key"); log.debug("Generating a new key");
final byte[] key = new byte[16]; final byte[] key = new byte[16];
// randomize the 8 first bytes // randomize the 8 first bytes
for (int i = 0; i < key.length; i++) { for (int i = 0; i < key.length; i++) {

View File

@@ -37,9 +37,13 @@ public class RGBColor {
/** /**
* Creates a new RGB (red-green-blue) color * Creates a new RGB (red-green-blue) color
* @param r the red byte *
* @param g the green byte * @param r
* @param b the blue byte * the red byte
* @param g
* the green byte
* @param b
* the blue byte
*/ */
protected RGBColor(byte r, byte g, byte b) { protected RGBColor(byte r, byte g, byte b) {
this.red = r; this.red = r;
@@ -88,7 +92,9 @@ public class RGBColor {
/** /**
* Creates an {@link RGBColor} from an byte array * Creates an {@link RGBColor} from an byte array
* @param rgb the RGB byte array *
* @param rgb
* the RGB byte array
* @return the {@link RGBColor} * @return the {@link RGBColor}
*/ */
public static RGBColor fromByteArray(byte[] rgb) { public static RGBColor fromByteArray(byte[] rgb) {
@@ -96,7 +102,8 @@ public class RGBColor {
} }
/** /**
* @param color the color integer * @param color
* the color integer
* @return the {@link RGBColor} * @return the {@link RGBColor}
*/ */
public static RGBColor fromInteger(int color) { public static RGBColor fromInteger(int color) {

View File

@@ -245,6 +245,7 @@ public class ComplexCalculator<T extends CalculatorContext, V extends Enum<V>>
functions.clear(); functions.clear();
} }
@Override
public double calculate(V v, T ctx, double value) { public double calculate(V v, T ctx, double value) {
for (final Function<T, V> function : getList(v)) { for (final Function<T, V> function : getList(v)) {
value = function.calculate(ctx, value); value = function.calculate(ctx, value);
@@ -257,6 +258,7 @@ public class ComplexCalculator<T extends CalculatorContext, V extends Enum<V>>
return 0; return 0;
} }
@Override
public double calculate(V v, T ctx) { public double calculate(V v, T ctx) {
return calculate(v, ctx, 0); return calculate(v, ctx, 0);
} }

View File

@@ -55,6 +55,7 @@ public class SimpleCalculator<T extends CalculatorContext, V extends Enum<V>>
Arrays.sort(this.functions, FunctionOrderComparator.SHARED_INSTANCE); Arrays.sort(this.functions, FunctionOrderComparator.SHARED_INSTANCE);
} }
@Override
public double calculate(V v, T ctx, double value) { public double calculate(V v, T ctx, double value) {
if (v != this.value) if (v != this.value)
return value; return value;
@@ -64,6 +65,7 @@ public class SimpleCalculator<T extends CalculatorContext, V extends Enum<V>>
return value; return value;
} }
@Override
public double calculate(V v, T ctx) { public double calculate(V v, T ctx) {
return calculate(ctx, 0); return calculate(ctx, 0);
} }

View File

@@ -49,6 +49,7 @@ public class CoordinateAdapter extends
/** /**
* Internal usage class: class used to read coordinate data from XML file * Internal usage class: class used to read coordinate data from XML file
*
* @author <a href="http://www.rogiel.com">Rogiel</a> * @author <a href="http://www.rogiel.com">Rogiel</a>
*/ */
protected static class CoordinateElement { protected static class CoordinateElement {
@@ -75,9 +76,12 @@ public class CoordinateAdapter extends
} }
/** /**
* @param x the x cord * @param x
* @param y the y cord * the x cord
* @param z the z cord * @param y
* the y cord
* @param z
* the z cord
*/ */
public CoordinateElement(int x, int y, int z) { public CoordinateElement(int x, int y, int z) {
super(); super();

View File

@@ -41,7 +41,8 @@ public class ItemTemplateIDAdapter extends XmlAdapter<Integer, ItemTemplateID> {
} }
/** /**
* @param provider the item template id provider * @param provider
* the item template id provider
*/ */
@Inject @Inject
public ItemTemplateIDAdapter(ItemTemplateIDProvider provider) { public ItemTemplateIDAdapter(ItemTemplateIDProvider provider) {

View File

@@ -42,7 +42,8 @@ public class NPCTemplateIDAdapter extends XmlAdapter<Integer, NPCTemplateID> {
} }
/** /**
* @param provider the {@link NPC} template id provider * @param provider
* the {@link NPC} template id provider
*/ */
@Inject @Inject
public NPCTemplateIDAdapter(NPCTemplateIDProvider provider) { public NPCTemplateIDAdapter(NPCTemplateIDProvider provider) {

View File

@@ -43,7 +43,8 @@ public class SkillTemplateIDAdapter extends
} }
/** /**
* @param provider the {@link Skill} template id provider * @param provider
* the {@link Skill} template id provider
*/ */
@Inject @Inject
public SkillTemplateIDAdapter(SkillTemplateIDProvider provider) { public SkillTemplateIDAdapter(SkillTemplateIDProvider provider) {

View File

@@ -42,7 +42,8 @@ public class TeleportationTemplateIDAdapter extends
} }
/** /**
* @param provider the teleportation template id provider * @param provider
* the teleportation template id provider
*/ */
@Inject @Inject
public TeleportationTemplateIDAdapter( public TeleportationTemplateIDAdapter(

View File

@@ -34,7 +34,7 @@ public class PathTransformer implements Transformer<Path> {
@Override @Override
public String transform(Path value) { public String transform(Path value) {
if(value == null) if (value == null)
return ""; return "";
return value.toString(); return value.toString();
} }

View File

@@ -23,6 +23,7 @@ import java.util.Arrays;
public class EndianessTest { public class EndianessTest {
/** /**
* @param args * @param args
* the arguments
*/ */
public static void main(String[] args) { public static void main(String[] args) {
final ByteBuffer bigEndian = ByteBuffer.allocate(8); final ByteBuffer bigEndian = ByteBuffer.allocate(8);