org.jikesrvm.mm.mmtk
Class BuildTimeConfig

java.lang.Object
  extended by org.mmtk.vm.BuildTimeConfig
      extended by org.jikesrvm.mm.mmtk.BuildTimeConfig

public class BuildTimeConfig
extends BuildTimeConfig

Read build-time configuration information for MMTk from a Java properties file. Properties read through this mechanism should be read at build time and saved in static final fields.

This is a wrapper for a java.util.Properties object.


Field Summary
private  Properties props
          The underlying properties object
 
Constructor Summary
BuildTimeConfig(String property_file_property)
           
BuildTimeConfig(String property_file_property, String default_property_file)
           
 
Method Summary
 boolean getBooleanProperty(String name)
          Return a property of type boolean
 boolean getBooleanProperty(String name, boolean dflt)
          Return a property of type boolean, with default.
 int getIntProperty(String name)
          Return a property of type int
 int getIntProperty(String name, int dflt)
          Return a property of type String, with default.
 String getPlanName()
           
private  Properties getProperties(String property_file_property, String default_property_file)
           
 String getStringProperty(String name)
          Return a property of type String
 String getStringProperty(String name, String dflt)
          Return a property of type String, with default.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

props

private Properties props
The underlying properties object

Constructor Detail

BuildTimeConfig

public BuildTimeConfig(String property_file_property,
                       String default_property_file)

BuildTimeConfig

public BuildTimeConfig(String property_file_property)
Method Detail

getProperties

private Properties getProperties(String property_file_property,
                                 String default_property_file)
Parameters:
property_file_property - The name of the property that sets the location of the properties file
default_property_file - The default properties file.

getPlanName

public String getPlanName()
Specified by:
getPlanName in class BuildTimeConfig
Returns:
The name of the current MMTk plan

getBooleanProperty

public boolean getBooleanProperty(String name,
                                  boolean dflt)
Description copied from class: BuildTimeConfig
Return a property of type boolean, with default.

Specified by:
getBooleanProperty in class BuildTimeConfig
Parameters:
name - The name of the property
dflt - Default value
Returns:
The value of the property

getBooleanProperty

public boolean getBooleanProperty(String name)
Description copied from class: BuildTimeConfig
Return a property of type boolean

Specified by:
getBooleanProperty in class BuildTimeConfig
Parameters:
name - The name of the property
Returns:
The value of the property

getIntProperty

public int getIntProperty(String name,
                          int dflt)
Description copied from class: BuildTimeConfig
Return a property of type String, with default.

Specified by:
getIntProperty in class BuildTimeConfig
Parameters:
name - The name of the property
dflt - Default value
Returns:
The value of the property

getIntProperty

public int getIntProperty(String name)
Description copied from class: BuildTimeConfig
Return a property of type int

Specified by:
getIntProperty in class BuildTimeConfig
Parameters:
name - The name of the property
Returns:
The value of the property

getStringProperty

public String getStringProperty(String name,
                                String dflt)
Description copied from class: BuildTimeConfig
Return a property of type String, with default.

Specified by:
getStringProperty in class BuildTimeConfig
Parameters:
name - The name of the property
dflt - Default value
Returns:
The value of the property

getStringProperty

public String getStringProperty(String name)
Description copied from class: BuildTimeConfig
Return a property of type String

Specified by:
getStringProperty in class BuildTimeConfig
Parameters:
name - The name of the property
Returns:
The value of the property