public class PrototypeFactoryDeprecated
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
Map |
prototypes |
Constructor and Description |
---|
PrototypeFactoryDeprecated() |
Modifier and Type | Method and Description |
---|---|
void |
addNewPrototype(java.lang.String name,
java.lang.Class prototype)
Adds a new class to be able to retrieve instances of
|
java.lang.Object |
getNewInstance(java.lang.String prototypeName) |
public Map prototypes
public void addNewPrototype(java.lang.String name, java.lang.Class prototype)
name
- The name of the prototype. Generally prototype.getClass().getName()prototype
- The class object to be used for instantiation. Should be a class
with a constructor that takes 0 arguments.public java.lang.Object getNewInstance(java.lang.String prototypeName)
prototypeName
- The name of the prototype to be instantiatedjava.lang.IllegalAccessException
- If the empty constructor of the class given is not
allowed to be accessed.java.lang.InstantiationException