Skip to content

Tag: abstract

How to get the class of a static object attribute

I have a parent class Tile and inherited classes Walltile, FloorTile, EntityTile. Each inherited class have BufferedImage attributes that is related with its name. I instantiate Tile and then i cast to the specific class, like: But i need to know if this Tile object is WallTile, FloorTile or EntityTile. For t…