com.threerings.config
Class ConfigReference<T extends ManagedConfig>

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.config.ConfigReference<T>
All Implemented Interfaces:
Exportable, com.threerings.io.Streamable, Copyable, Cloneable

public class ConfigReference<T extends ManagedConfig>
extends DeepObject
implements Exportable, com.threerings.io.Streamable

A reference to a configuration that can be embedded in, for example, other configurations.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
com.threerings.io.Streamable.Closure
 
Constructor Summary
ConfigReference()
          No-arg constructor for deserialization.
ConfigReference(String name)
          Creates a new reference to the named configuration.
ConfigReference(String name, String firstKey, Object firstValue, Object... otherArgs)
          Creates a new reference to the named configuration with the specified arguments.
 
Method Summary
 Object copy(Object dest)
          Creates a copy of this object, (re)populating the supplied destination object if possible.
 boolean equals(Object other)
           
 ArgumentMap getArguments()
          Returns a reference to the argument map.
 String getName()
          Returns the name of the referenced config.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigReference

public ConfigReference(String name)
Creates a new reference to the named configuration.


ConfigReference

public ConfigReference(String name,
                       String firstKey,
                       Object firstValue,
                       Object... otherArgs)
Creates a new reference to the named configuration with the specified arguments.


ConfigReference

public ConfigReference()
No-arg constructor for deserialization.

Method Detail

getName

public String getName()
Returns the name of the referenced config.


getArguments

public ArgumentMap getArguments()
Returns a reference to the argument map.


copy

public Object copy(Object dest)
Description copied from interface: Copyable
Creates a copy of this object, (re)populating the supplied destination object if possible.

Specified by:
copy in interface Copyable
Overrides:
copy in class DeepObject
Returns:
either a reference to the destination object, if it could be repopulated, or a new object containing the copied state.

equals

public boolean equals(Object other)
Overrides:
equals in class DeepObject

hashCode

public int hashCode()
Overrides:
hashCode in class DeepObject

toString

public String toString()
Overrides:
toString in class DeepObject


Copyright © 2011. All Rights Reserved.