org.jikesrvm.mm.mmtk
Class Factory

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

public final class Factory
extends Factory

This is a VM-specific class which defines factory methods for VM-specific types which must be instantiated within MMTk.

See Also:
Factory

Field Summary
private static String CONFIG_FILE_PROPERTY
           
private static String DEFAULT_MMTK_PROPERTIES
           
 
Constructor Summary
Factory()
           
 
Method Summary
 OptionSet getOptionSet()
          Create or retrieve the OptionSet used for MMTk options.
 ActivePlan newActivePlan()
          Create a new ActivePlan instance using the appropriate VM-specific concrete ActivePlan sub-class.
 Assert newAssert()
          Create a new Assert instance using the appropriate VM-specific concrete Assert sub-class.
 Barriers newBarriers()
          Create a new Barriers instance using the appropriate VM-specific concrete Barriers sub-class.
 BuildTimeConfig newBuildTimeConfig()
          Create a new BuildTimeConfig instance using the appropriate VM-specific concrete BuildTimeConfig sub-class.
 Collection newCollection()
          Create a new Collection instance using the appropriate VM-specific concrete Collection sub-class.
 Debug newDebug()
          Create a new debug object
 MMTk_Events newEvents()
          Create a new MMTk_Events instance using the appropriate VM-specific concrete MMTk_Events sub-class.
 FinalizableProcessor newFinalizableProcessor()
          Create a new FinalizbleProcessor instance using the appropriate VM-specific concrete FinalizableProcessor sub-class.
 ByteStream newGCspyByteStream(AbstractDriver driver, String name, byte minValue, byte maxValue, byte zeroValue, byte defaultValue, String stringPre, String stringPost, int presentation, int paintStyle, int indexMaxStream, Color colour, boolean summary)
          Create a new ByteStream instance using the appropriate VM-specific concrete ByteStream sub-class.
 IntStream newGCspyIntStream(AbstractDriver driver, String name, int minValue, int maxValue, int zeroValue, int defaultValue, String stringPre, String stringPost, int presentation, int paintStyle, int indexMaxStream, Color colour, boolean summary)
          Create a new IntStream instance using the appropriate VM-specific concrete IntStream sub-class.
 ServerInterpreter newGCspyServerInterpreter()
          Create a new ServerInterpreter instance using the appropriate VM-specific concrete ServerInterpreter sub-class.
 ServerSpace newGCspyServerSpace(ServerInterpreter serverInterpreter, String serverName, String driverName, String title, String blockInfo, int tileNum, String unused, boolean mainSpace)
          Create a new ServerSpace instance using the appropriate VM-specific concrete ServerSpace sub-class.
 ShortStream newGCspyShortStream(AbstractDriver driver, String name, short minValue, short maxValue, short zeroValue, short defaultValue, String stringPre, String stringPost, int presentation, int paintStyle, int indexMaxStream, Color colour, boolean summary)
          Create a new ShortStream instance using the appropriate VM-specific concrete ShortStream sub-class.
 Util newGCspyUtil()
          Create a new Util instance using the appropriate VM-specific concrete Util sub-class.
 Lock newLock(String name)
          Create a new Lock instance using the appropriate VM-specific concrete Lock sub-class.
 Memory newMemory()
          Create a new Memory instance using the appropriate VM-specific concrete Memory sub-class.
 Monitor newMonitor(String name)
          Create a new Monitor instance using the appropriate VM-specific concrete Lock sub-class.
 ObjectModel newObjectModel()
          Create a new ObjectModel instance using the appropriate VM-specific concrete ObjectModel sub-class.
 ReferenceProcessor newReferenceProcessor(ReferenceProcessor.Semantics semantics)
          Create a new ReferenceProcessor instance using the appropriate VM-specific concrete ReferenceProcessor sub-class.
 Scanning newScanning()
          Create a new Scanning instance using the appropriate VM-specific concrete Scanning sub-class.
 Statistics newStatistics()
          Create a new Statistics instance using the appropriate VM-specific concrete Statistics sub-class.
 Strings newStrings()
          Create a new Strings instance using the appropriate VM-specific concrete Strings sub-class.
 SynchronizedCounter newSynchronizedCounter()
          Create a new SynchronizedCounter instance using the appropriate VM-specific concrete SynchronizedCounter sub-class.
 TraceInterface newTraceInterface()
          Create a new TraceInterface instance using the appropriate VM-specific concrete TraceInterface sub-class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MMTK_PROPERTIES

private static final String DEFAULT_MMTK_PROPERTIES
See Also:
Constant Field Values

CONFIG_FILE_PROPERTY

private static final String CONFIG_FILE_PROPERTY
See Also:
Constant Field Values
Constructor Detail

Factory

public Factory()
Method Detail

getOptionSet

public OptionSet getOptionSet()
Description copied from class: Factory
Create or retrieve the OptionSet used for MMTk options.

Specified by:
getOptionSet in class Factory
Returns:
A concrete VM-specific OptionSet instance

newActivePlan

public ActivePlan newActivePlan()
Description copied from class: Factory
Create a new ActivePlan instance using the appropriate VM-specific concrete ActivePlan sub-class.

Specified by:
newActivePlan in class Factory
Returns:
A concrete VM-specific ActivePlan instance.
See Also:
ActivePlan

newAssert

public Assert newAssert()
Description copied from class: Factory
Create a new Assert instance using the appropriate VM-specific concrete Assert sub-class.

Specified by:
newAssert in class Factory
Returns:
A concrete VM-specific Assert instance.
See Also:
Assert

newBarriers

public Barriers newBarriers()
Description copied from class: Factory
Create a new Barriers instance using the appropriate VM-specific concrete Barriers sub-class.

Specified by:
newBarriers in class Factory
Returns:
A concrete VM-specific Barriers instance.
See Also:
Barriers

newCollection

public Collection newCollection()
Description copied from class: Factory
Create a new Collection instance using the appropriate VM-specific concrete Collection sub-class.

Specified by:
newCollection in class Factory
Returns:
A concrete VM-specific Collection instance.
See Also:
Collection

newBuildTimeConfig

public BuildTimeConfig newBuildTimeConfig()
Description copied from class: Factory
Create a new BuildTimeConfig instance using the appropriate VM-specific concrete BuildTimeConfig sub-class.

Specified by:
newBuildTimeConfig in class Factory
Returns:
A concrete VM-specific Collection instance.
See Also:
Collection

newLock

public Lock newLock(String name)
Description copied from class: Factory
Create a new Lock instance using the appropriate VM-specific concrete Lock sub-class.

Specified by:
newLock in class Factory
Parameters:
name - The string to be associated with this lock instance
Returns:
A concrete VM-specific Lock instance.
See Also:
Lock

newMonitor

public Monitor newMonitor(String name)
Description copied from class: Factory
Create a new Monitor instance using the appropriate VM-specific concrete Lock sub-class.

Specified by:
newMonitor in class Factory
Parameters:
name - The string to be associated with this monitor instance
Returns:
A concrete VM-specific Monitor instance.
See Also:
Monitor

newMemory

public Memory newMemory()
Description copied from class: Factory
Create a new Memory instance using the appropriate VM-specific concrete Memory sub-class.

Specified by:
newMemory in class Factory
Returns:
A concrete VM-specific Memory instance.
See Also:
Memory

newObjectModel

public ObjectModel newObjectModel()
Description copied from class: Factory
Create a new ObjectModel instance using the appropriate VM-specific concrete ObjectModel sub-class.

Specified by:
newObjectModel in class Factory
Returns:
A concrete VM-specific ObjectModel instance.
See Also:
ObjectModel

newReferenceProcessor

public ReferenceProcessor newReferenceProcessor(ReferenceProcessor.Semantics semantics)
Description copied from class: Factory
Create a new ReferenceProcessor instance using the appropriate VM-specific concrete ReferenceProcessor sub-class.

Specified by:
newReferenceProcessor in class Factory
Returns:
A concrete VM-specific ReferenceProcessor instance.
See Also:
ReferenceProcessor

newFinalizableProcessor

public FinalizableProcessor newFinalizableProcessor()
Description copied from class: Factory
Create a new FinalizbleProcessor instance using the appropriate VM-specific concrete FinalizableProcessor sub-class.

Specified by:
newFinalizableProcessor in class Factory
Returns:
A concrete VM-specific FinalizableProcessor instance.
See Also:
FinalizableProcessor

newScanning

public Scanning newScanning()
Description copied from class: Factory
Create a new Scanning instance using the appropriate VM-specific concrete Scanning sub-class.

Specified by:
newScanning in class Factory
Returns:
A concrete VM-specific Scanning instance.
See Also:
Scanning

newStatistics

public Statistics newStatistics()
Description copied from class: Factory
Create a new Statistics instance using the appropriate VM-specific concrete Statistics sub-class.

Specified by:
newStatistics in class Factory
Returns:
A concrete VM-specific Statistics instance.
See Also:
Statistics

newStrings

public Strings newStrings()
Description copied from class: Factory
Create a new Strings instance using the appropriate VM-specific concrete Strings sub-class.

Specified by:
newStrings in class Factory
Returns:
A concrete VM-specific Strings instance.
See Also:
Strings

newSynchronizedCounter

public SynchronizedCounter newSynchronizedCounter()
Description copied from class: Factory
Create a new SynchronizedCounter instance using the appropriate VM-specific concrete SynchronizedCounter sub-class.

Specified by:
newSynchronizedCounter in class Factory
Returns:
A concrete VM-specific SynchronizedCounter instance.
See Also:
SynchronizedCounter

newTraceInterface

public TraceInterface newTraceInterface()
Description copied from class: Factory
Create a new TraceInterface instance using the appropriate VM-specific concrete TraceInterface sub-class.

Specified by:
newTraceInterface in class Factory
Returns:
A concrete VM-specific TraceInterface instance.
See Also:
TraceInterface

newEvents

public MMTk_Events newEvents()
Description copied from class: Factory
Create a new MMTk_Events instance using the appropriate VM-specific concrete MMTk_Events sub-class.

Specified by:
newEvents in class Factory

newDebug

public Debug newDebug()
Description copied from class: Factory
Create a new debug object

Specified by:
newDebug in class Factory

newGCspyUtil

public Util newGCspyUtil()
Create a new Util instance using the appropriate VM-specific concrete Util sub-class.

Specified by:
newGCspyUtil in class Factory
Returns:
A concrete VM-specific Util instance.
See Also:
Util

newGCspyServerInterpreter

public ServerInterpreter newGCspyServerInterpreter()
Description copied from class: Factory
Create a new ServerInterpreter instance using the appropriate VM-specific concrete ServerInterpreter sub-class.

Specified by:
newGCspyServerInterpreter in class Factory
Returns:
A concrete VM-specific ServerInterpreter instance.
See Also:
ServerInterpreter

newGCspyServerSpace

public ServerSpace newGCspyServerSpace(ServerInterpreter serverInterpreter,
                                       String serverName,
                                       String driverName,
                                       String title,
                                       String blockInfo,
                                       int tileNum,
                                       String unused,
                                       boolean mainSpace)
Description copied from class: Factory
Create a new ServerSpace instance using the appropriate VM-specific concrete ServerSpace sub-class.

Specified by:
newGCspyServerSpace in class Factory
Parameters:
serverInterpreter - The server that owns this space
serverName - The server's name
driverName - The space driver's name
title - Title for the space
blockInfo - A label for each block
tileNum - Max number of tiles in this space
unused - A label for unused blocks
mainSpace - Whether this space is the main space
Returns:
A concrete VM-specific ServerSpace instance.
See Also:
ServerSpace

newGCspyByteStream

public ByteStream newGCspyByteStream(AbstractDriver driver,
                                     String name,
                                     byte minValue,
                                     byte maxValue,
                                     byte zeroValue,
                                     byte defaultValue,
                                     String stringPre,
                                     String stringPost,
                                     int presentation,
                                     int paintStyle,
                                     int indexMaxStream,
                                     Color colour,
                                     boolean summary)
Description copied from class: Factory
Create a new ByteStream instance using the appropriate VM-specific concrete ByteStream sub-class.

Specified by:
newGCspyByteStream in class Factory
Parameters:
driver - The driver that owns this Stream
name - The name of the stream (e.g. "Used space")
minValue - The minimum value for any item in this stream. Values less than this will be represented as "minValue-"
maxValue - The maximum value for any item in this stream. Values greater than this will be represented as "maxValue+"
zeroValue - The zero value for this stream
defaultValue - The default value for this stream
stringPre - A string to prefix values (e.g. "Used: ")
stringPost - A string to suffix values (e.g. " bytes.")
presentation - How a stream value is to be presented.
paintStyle - How the value is to be painted.
indexMaxStream - The index of the maximum stream if the presentation is *_VAR.
colour - The default colour for tiles of this stream
Returns:
A concrete VM-specific ByteStream instance.
See Also:
IntStream

newGCspyIntStream

public IntStream newGCspyIntStream(AbstractDriver driver,
                                   String name,
                                   int minValue,
                                   int maxValue,
                                   int zeroValue,
                                   int defaultValue,
                                   String stringPre,
                                   String stringPost,
                                   int presentation,
                                   int paintStyle,
                                   int indexMaxStream,
                                   Color colour,
                                   boolean summary)
Description copied from class: Factory
Create a new IntStream instance using the appropriate VM-specific concrete IntStream sub-class.

Specified by:
newGCspyIntStream in class Factory
Parameters:
driver - The driver that owns this Stream
name - The name of the stream (e.g. "Used space")
minValue - The minimum value for any item in this stream. Values less than this will be represented as "minValue-"
maxValue - The maximum value for any item in this stream. Values greater than this will be represented as "maxValue+"
zeroValue - The zero value for this stream
defaultValue - The default value for this stream
stringPre - A string to prefix values (e.g. "Used: ")
stringPost - A string to suffix values (e.g. " bytes.")
presentation - How a stream value is to be presented.
paintStyle - How the value is to be painted.
indexMaxStream - The index of the maximum stream if the presentation is *_VAR.
colour - The default colour for tiles of this stream
Returns:
A concrete VM-specific IntStream instance.
See Also:
IntStream

newGCspyShortStream

public ShortStream newGCspyShortStream(AbstractDriver driver,
                                       String name,
                                       short minValue,
                                       short maxValue,
                                       short zeroValue,
                                       short defaultValue,
                                       String stringPre,
                                       String stringPost,
                                       int presentation,
                                       int paintStyle,
                                       int indexMaxStream,
                                       Color colour,
                                       boolean summary)
Description copied from class: Factory
Create a new ShortStream instance using the appropriate VM-specific concrete ShortStream sub-class.

Specified by:
newGCspyShortStream in class Factory
Parameters:
driver - The driver that owns this Stream
name - The name of the stream (e.g. "Used space")
minValue - The minimum value for any item in this stream. Values less than this will be represented as "minValue-"
maxValue - The maximum value for any item in this stream. Values greater than this will be represented as "maxValue+"
zeroValue - The zero value for this stream
defaultValue - The default value for this stream
stringPre - A string to prefix values (e.g. "Used: ")
stringPost - A string to suffix values (e.g. " bytes.")
presentation - How a stream value is to be presented.
paintStyle - How the value is to be painted.
indexMaxStream - The index of the maximum stream if the presentation is *_VAR.
colour - The default colour for tiles of this stream
Returns:
A concrete VM-specific ShortStream instance.
See Also:
IntStream