com.twitter.common.util
Class BuildInfo

java.lang.Object
  extended by com.twitter.common.util.BuildInfo

public class BuildInfo
extends Object

Handles loading of a build properties file, and provides keys to look up known values in the properties.


Nested Class Summary
static class BuildInfo.Key
          Values of keys that are expected to exist in the loaded properties file.
 
Constructor Summary
BuildInfo()
          Creates a build info container that will use the default properties file path.
BuildInfo(Properties properties)
           
BuildInfo(String resourcePath)
          Creates a build info container, reading from the given path.
 
Method Summary
 Properties getProperties()
          Fetches the properties stored in the resource location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildInfo

public BuildInfo()
Creates a build info container that will use the default properties file path.


BuildInfo

public BuildInfo(String resourcePath)
Creates a build info container, reading from the given path.

Parameters:
resourcePath - The resource path to read build properties from.

BuildInfo

public BuildInfo(Properties properties)
Method Detail

getProperties

public Properties getProperties()
Fetches the properties stored in the resource location.

Returns:
The loaded properties, or a default properties object if there was a problem loading the specified proeprites resource.