public class ClientInstance
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static ClientInstance |
get() |
<T> T |
getComponent(java.lang.Class<T> type)
Gets a global component instance.
|
java.util.Properties |
getProperties() |
java.lang.String |
getProperty(java.lang.String key) |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue) |
long |
getStartTime() |
boolean |
hasProperty(java.lang.String propName) |
<T> T |
removeComponent(java.lang.Class<T> type)
Removes a global component instance.
|
<T> T |
setComponent(java.lang.Class<T> type,
T component)
Registers a component instance with the client, so it may be reference globally.
|
java.lang.Object |
setProperty(java.lang.String key,
java.lang.String value) |
public long getStartTime()
public java.util.Properties getProperties()
public java.lang.String getProperty(java.lang.String key)
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
public java.lang.Object setProperty(java.lang.String key, java.lang.String value)
public boolean hasProperty(java.lang.String propName)
propName
- property namepublic <T> T getComponent(java.lang.Class<T> type)
type
- the class type of the component - requiredjava.lang.IllegalStateException
- of the component isn't foundpublic <T> T removeComponent(java.lang.Class<T> type)
type
- the class type of the component - requiredpublic <T> T setComponent(java.lang.Class<T> type, T component)
type
- the class type of the component - requiredcomponent
- the component instancepublic static ClientInstance get()