noope.input
Class DynamicEntityLoader

java.lang.Object
  |
  +--noope.input.EntityLoader
        |
        +--noope.input.DynamicEntityLoader

public class DynamicEntityLoader
extends EntityLoader

This EntityLoader class loads Entity-s dynamically.


Field Summary
protected  java.lang.String defaultPackage
          Stores the default package used if the class cannot be found with its exact name.
 
Constructor Summary
DynamicEntityLoader(java.lang.String aDefaultPackage)
          Constructs a new DynamicEntityLoader that first tries to load an Entity class with exactly the name provided, and, if that fails, tries to look in the package specified.
 
Method Summary
 Entity createEntity(java.lang.String className, BlockReaderLocation brL, BlockReader br, Physics phys)
          Dynamically loads the Entity class with the given name and creates an instance of it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultPackage

protected java.lang.String defaultPackage
Stores the default package used if the class cannot be found with its exact name.
Constructor Detail

DynamicEntityLoader

public DynamicEntityLoader(java.lang.String aDefaultPackage)
                    throws BRLoadingException
Constructs a new DynamicEntityLoader that first tries to load an Entity class with exactly the name provided, and, if that fails, tries to look in the package specified.
Method Detail

createEntity

public Entity createEntity(java.lang.String className,
                           BlockReaderLocation brL,
                           BlockReader br,
                           Physics phys)
                    throws BRLoadingException
Dynamically loads the Entity class with the given name and creates an instance of it.
Overrides:
createEntity in class EntityLoader