1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-10 01:12:52 +00:00

Written javadoc for many classes

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-14 01:51:40 -03:00
parent 14b928cc3b
commit e9c6f1b027
85 changed files with 1205 additions and 26 deletions

View File

@@ -14,7 +14,20 @@ import com.l2jserver.util.transformer.impl.IntegerTransformer;
import com.l2jserver.util.transformer.impl.LongTransformer;
import com.l2jserver.util.transformer.impl.ShortTransformer;
/**
* The {@link TransformerFactory} return the transformer instance for any given
* type.
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public class TransformerFactory {
/**
* return the transformer instance the given <tt>type</tt>.
*
* @param type
* the type
* @return the transformer
*/
public static final Transformer<?> getTransfromer(Class<?> type) {
if (type == Byte.class || type == Byte.TYPE) {
return ByteTransformer.SHARED_INSTANCE;
@@ -30,11 +43,11 @@ public class TransformerFactory {
return DoubleTransformer.SHARED_INSTANCE;
} else if (type == Boolean.class || type == Boolean.TYPE) {
return BooleanTransformer.SHARED_INSTANCE;
} else if(type == InetSocketAddress.class) {
} else if (type == InetSocketAddress.class) {
return InetSocketAddressTransformer.SHARED_INSTANCE;
} else if(type == File.class) {
} else if (type == File.class) {
return FileTransformer.SHARED_INSTANCE;
}else if(type == Class.class) {
} else if (type == Class.class) {
return ClassTransformer.SHARED_INSTANCE;
}
return null;