code: public <T extends CharacterSprite> T getCharacter (CharacterDescriptor desc,
          Class<T> charClass)
      {
          try {
              T sprite = charClass.newInstance();
              sprite.init(desc, this);
              return sprite;
  
          } catch (Exception e) {
              log.warning("Failed to instantiate character sprite.", e);
              return null;
          }
      }
docs: Returns a {@link CharacterSprite} representing the character
  described by the given {@link CharacterDescriptor}, or
  <code>null</code> if an error occurs.
  
  @param desc the character descriptor.
  @param charClass the {@link CharacterSprite} derived class that
  should be instantiated instead of the configured default (which is
  set via {@link #setCharacterClass}).