|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.util.DeepObject
com.threerings.config.ManagedConfig
com.threerings.config.ParameterizedConfig
public class ParameterizedConfig
A configuration that may include a number of parameters to be configured when the configuration is referenced.
| Field Summary | |
|---|---|
protected ArgumentMap |
_args
The arguments applied to the configuration, if any. |
protected ParameterizedConfig |
_base
The instance from which the configuration is derived, if any (used to prevent the base from being garbage-collected). |
protected SoftCache<ArgumentMap,ParameterizedConfig> |
_derived
Maps arguments to derived instances. |
Parameter[] |
parameters
The parameters of the configuration. |
| Fields inherited from class com.threerings.config.ManagedConfig |
|---|
_cfgmgr, _listeners, _name, _updateConfigs, _updateResources |
| Constructor Summary | |
|---|---|
ParameterizedConfig()
|
|
| Method Summary | |
|---|---|
protected void |
applyArguments(ParameterizedConfig instance,
ArgumentMap args)
Applies the arguments in the provided map to the specified instance. |
protected void |
applyArguments(ParameterizedConfig instance,
ArgumentMap args,
Parameter[] params)
Applies the arguments in the provided map to the specified instance. |
protected ParameterizedConfig |
getBound(Scope scope)
Returns an instance of this config bound in the specified scope. |
ParameterizedConfig |
getInstance(Scope scope,
ArgumentMap args)
Returns the derived instance in the specified scope with the supplied arguments. |
protected static Parameter |
getParameter(Parameter[] params,
String name)
Returns a reference to the parameter with the supplied name, or null if it
doesn't exist. |
Parameter |
getParameter(String name)
Returns a reference to the parameter with the supplied name, or null if it
doesn't exist. |
ConfigReference<? extends ManagedConfig> |
getReference()
Returns a reference to this configuration based on its name and arguments. |
protected void |
maybeFireOnConfigManager()
Fires a configuration updated event on the config manager if appropriate. |
void |
validateOuters(String where)
Validates the outer object references in this config. |
boolean |
validateReferences(String where,
PrintStream out)
Validates the references in this config. |
void |
wasUpdated()
Notes that this configuration has been updated. |
| Methods inherited from class com.threerings.config.ManagedConfig |
|---|
addListener, addUpdateDependencies, clearUpdateDependencies, configUpdated, fireConfigUpdated, getConfigManager, getInstance, getInstance, getInstance, getInstance, getName, getUpdateReferences, getUpdateResources, init, removeListener, resourceModified, setName, updateFromSource |
| Methods inherited from class com.threerings.util.DeepObject |
|---|
clone, copy, copy, equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
@Editable(weight=1.0) public Parameter[] parameters
@DeepOmit protected transient ParameterizedConfig _base
@DeepOmit protected transient ArgumentMap _args
@DeepOmit protected transient SoftCache<ArgumentMap,ParameterizedConfig> _derived
| Constructor Detail |
|---|
public ParameterizedConfig()
| Method Detail |
|---|
public Parameter getParameter(String name)
null if it
doesn't exist.
public ConfigReference<? extends ManagedConfig> getReference()
ManagedConfig
getReference in class ManagedConfig
public ParameterizedConfig getInstance(Scope scope,
ArgumentMap args)
ManagedConfig
getInstance in class ManagedConfigpublic void wasUpdated()
ManagedConfig
wasUpdated in class ManagedConfig
public boolean validateReferences(String where,
PrintStream out)
ManagedConfig
validateReferences in class ManagedConfigpublic void validateOuters(String where)
ManagedConfig
validateOuters in class ManagedConfigprotected void maybeFireOnConfigManager()
ManagedConfig
maybeFireOnConfigManager in class ManagedConfigprotected ParameterizedConfig getBound(Scope scope)
protected void applyArguments(ParameterizedConfig instance,
ArgumentMap args)
protected void applyArguments(ParameterizedConfig instance,
ArgumentMap args,
Parameter[] params)
protected static Parameter getParameter(Parameter[] params,
String name)
null if it
doesn't exist.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||