cz.cuni.amis.pogamut.udk.communication.translator.itemdescriptor
Class ItemDescriptor
java.lang.Object
cz.cuni.amis.pogamut.udk.communication.translator.itemdescriptor.ItemDescriptor
- Direct Known Subclasses:
- 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
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.