Class planetSpec
java.lang.Object
name.moore.kevin.ze.XMLdata.XMLbase
name.moore.kevin.ze.XMLdata.specs.planetSpec
The read-only properties of a particular type or classification (eg class
"M") of a planet.
These properties are fixed and thus have no setter methods since there is no
in-game reason to change them or create them.
Objects are initialised by loading XML via XStream.
Use the fictional star-trek classifications so we don't have to reinvent the wheel :) Memory-alpha wikipedia
- Author:
- Kevin Moore
<dev@kevin.moore.name>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class name.moore.kevin.ze.XMLdata.XMLbase
defaultXMLmessage, duplicatedXMLmessage, getDescription, getKey, getSpec, missingXMLmessage
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
size
The relative size of a planet of this specification. -
texture
The name of the texture resource associated with this spec eg "earth.jpg". This is added to a 'display' component.- See Also:
display
-
-
Constructor Details
-
planetSpec
public planetSpec()
-
-
Method Details
-
getSize
- Returns:
-
getTexture
- Returns:
-
readResolve
Description copied from class:XMLbaseCalled automatically when loading from XML as part of JDK serialisation.Used to do some validation of that incoming XML by asserting that properties are set and have defaults as required. Output warning messages if a default is applied. Output error messages if a required XML element is missing and return null to indicate an invalid object.
- Overrides:
readResolvein classXMLbase- Returns:
- null if we can't create a valid object
-
getEntityClass
Description copied from class:XMLbaseDerived classes have to override this and say what class eg engine.class they are. This allows us to use this base class but discover the derived class.- Specified by:
getEntityClassin classXMLbase- Returns:
-