com.codemesh.terp.data
Class Gprof.GprofConverter
java.lang.Object
com.codemesh.terp.data.Gprof.GprofConverter
- All Implemented Interfaces:
- Converter<Gprof.GprofExecutor>
- Enclosing interface:
- Gprof
public static class Gprof.GprofConverter
- extends java.lang.Object
- implements Converter<Gprof.GprofExecutor>
A converter that creates an Gprof.GprofExecutor for the
gprof profiling utility.
This converter is registered with the terp runtime under the
^gprof alias.
In addition to supporting initialization from String and File,
this converter has a default (null or empty map) initializer
that simply looks for an installed copy of gprof and returns it.
To locate an installed copy of gprof, the following rules are
used:
- Run "which gprof".
- If nothing was found, inspect some well known directories
for copies of gprof.
- See Also:
the executor type.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Gprof.GprofConverter
public Gprof.GprofConverter()
fromObject
public Gprof.GprofExecutor fromObject(java.lang.Object obj,
TerpContext ctx)
- Converts the given object into an object of the target type.
Conversions can be implemented in any way that makes sense.
Normally, converters will return null for null, but some converters
may choose to interpret null as an indicator to return a
default-initialized target object. An example of this type
of conversion is the ShellExecutor. null simply indicates that
no preference overrides of any kind have been provided.
This converter interprets null or an empty input map as
a request for the default instance of gprof.
- Specified by:
fromObject in interface Converter<Gprof.GprofExecutor>
- Parameters:
obj - the source object.ctx - the context in which the conversion takes place.
- Returns:
- an instance of the target type or null.
Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.