cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor
Class ItemDescriptor
java.lang.Object
cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.ItemDescriptor
- Direct Known Subclasses:
- AdrenalineDescriptor, AmmoDescriptor, ArmorDescriptor, GeneralDescriptor, HealthDescriptor, OtherDescriptor, ShieldDescriptor, WeaponDescriptor
public class ItemDescriptor
- extends Object
A parent of all item descriptors.
Contains attributes common for all descriptors plus some common functions.
- Author:
- Ondrej, knight
NONE
public static final ItemDescriptor NONE
ItemDescriptor
public ItemDescriptor()
getAmount
public int getAmount()
getInventoryType
public String getInventoryType()
getPickupType
public ItemType getPickupType()
getItemCategory
public ItemType.Category getItemCategory()
fieldToName
protected String fieldToName(String string)
- Converts a fully qualified field name (e.g. private boolean cz.cuni.amis.MyClass.myBoolean)
to a field name (e.g. myBoolean).
- Parameters:
string
- - complete identifier of a field in a class
- Returns:
- name of a field
firstCharToUpperCase
protected String firstCharToUpperCase(String input)
doReflexion
protected void doReflexion(Object configMsg,
Class<? extends ItemDescriptor> clazz)
- This method does the mapping from a map of attributes contained it ITCMsg and the attributes of the descriptor.
NOTE: names of the attributes must be equal to the keys of the HashMap contained in ITCMsg.
- Parameters:
configMsg
-
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.