Class StendhalRPObjectFactory

java.lang.Object
marauroa.server.game.rp.RPObjectFactory
games.stendhal.server.core.engine.StendhalRPObjectFactory

public class StendhalRPObjectFactory extends RPObjectFactory
Creates concrete objects of Stendhal classes.
Author:
hendrik
  • Constructor Details

    • StendhalRPObjectFactory

      public StendhalRPObjectFactory()
  • Method Details

    • transform

      public RPObject transform(RPObject object)
      Description copied from class: RPObjectFactory
      This method is called when object is serialized back from database to zone, so you can define which subclass of RPObject we are going to use. This implements a factory pattern. If you are not interested in this feature, just return the object
      Overrides:
      transform in class RPObjectFactory
      Parameters:
      object - the original object
      Returns:
      the new instance of the object
    • getFactory

      public static RPObjectFactory getFactory()
      returns the factory instance (this method is called by Marauroa using reflection).
      Returns:
      RPObjectFactory