Class DynamicInstatiator
The DyanmicInstatiator using which instances can be created from a fully classified class name. Is used for creating SessionListener instances.
Inheritance
Inherited Members
Namespace:
Assembly: .dll
Syntax
public final class DynamicInstatiator
Constructors
DynamicInstatiator()
Declaration
public DynamicInstatiator()
Methods
instantiateClass(Class<?> class_, Object[] arguments)
Instantiates an object of a given class name using the fitting constructor for the given arguments.
Declaration
public static final Object instantiateClass(Class<?> class_, Object[] arguments)
Parameters
Type | Name | Description |
---|---|---|
java.lang.Class<?> | class_ | The class to instantiate |
java.lang.Object[] | arguments | The constructor arguments |
Returns
Type | Description |
---|---|
java.lang.Object | An instance of the class if successful, null else |
instantiateSessionListener(String game, UUID sessionId)
Instantiates a SessionListener based on the dynamic mappings configuration.
Declaration
public static final ISessionListener instantiateSessionListener(String game, UUID sessionId)
Parameters
Type | Name | Description |
---|---|---|
java.lang.String | game | The game to instantiate a listener of |
java.util.UUID | sessionId | The sessionId to pass as a constructor argument to the listener |
Returns
Type | Description |
---|---|
ISessionListener | A SessionListener instance if successful, null else |
instatiateClass(String className, Object[] arguments)
Instantiates an object of a given class name using the fitting constructor for the given parameters.
Declaration
public static final Object instatiateClass(String className, Object[] arguments)
Parameters
Type | Name | Description |
---|---|---|
java.lang.String | className | The fully classified class name of the class to instantiate |
java.lang.Object[] | arguments | The constructor arguments |
Returns
Type | Description |
---|---|
java.lang.Object | An instance of the class if successful, null else |