Package games.stendhal.server.entity
Class EntityFactoryHelper
java.lang.Object
games.stendhal.server.entity.EntityFactoryHelper
A utility class for creating entities using ConfigurableFactory.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
EntityFactoryHelper
public EntityFactoryHelper()
-
-
Method Details
-
create
public static Entity create(String className, Map<String,String> parameters, Map<String,String> attributes)Create an entity using a [logical] class name, and apply optional attribute values.- Parameters:
className
- A base class name to load.parameters
- A collection of factory parameters.attributes
- A collection of entity attributes, ornull
.- Returns:
- A new entity, or
null
if allowed by the factory type. - Throws:
IllegalArgumentException
- If there is a problem with the attributes. The exception message should be a value suitable for meaningful user interpretation.- See Also:
ConfigurableFactory
-