com.ibm.dtfj.analyzer.util
Class AnalyzerContextAttributes

java.lang.Object
  extended by com.ibm.dtfj.analyzer.util.AnalyzerContextAttributes

public class AnalyzerContextAttributes
extends java.lang.Object

Utility functions for manipulating analyzer context attributes. (See setContextAttribute(int, String))


Field Summary
static int DTFJ_VERSION_ATTRIBUTE
          Reserved value for the precedence associated with the attribute that represents the DTFJ API version.
static int JRE_VERSION_ATTRIBUTE
          Reserved value for the precedence associated with the attribute that represents the JRE version, for example 1.4.2, 5.0, etc.
static int JVM_TYPE_ATTRIBUTE
          Reserved value for the precedence associated with the attribute that represents the JVM type, for example Sov or J9.
 
Constructor Summary
AnalyzerContextAttributes()
           
 
Method Summary
static java.lang.String asString(java.util.List attributes)
          Print a list of context attributes as a String
 java.util.List getContextAttributes()
           
 void initializeBasicContextAttributes(com.ibm.dtfj.image.ImageFactory imageFactory, com.ibm.dtfj.runtime.ManagedRuntime runtime, java.util.logging.Logger logger)
          Initialize some basic context attributes.
 void setContextAttribute(int precedence, java.lang.String tag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DTFJ_VERSION_ATTRIBUTE

public static final int DTFJ_VERSION_ATTRIBUTE
Reserved value for the precedence associated with the attribute that represents the DTFJ API version.

See Also:
Constant Field Values

JVM_TYPE_ATTRIBUTE

public static final int JVM_TYPE_ATTRIBUTE
Reserved value for the precedence associated with the attribute that represents the JVM type, for example Sov or J9.

See Also:
Constant Field Values

JRE_VERSION_ATTRIBUTE

public static final int JRE_VERSION_ATTRIBUTE
Reserved value for the precedence associated with the attribute that represents the JRE version, for example 1.4.2, 5.0, etc.

See Also:
Constant Field Values
Constructor Detail

AnalyzerContextAttributes

public AnalyzerContextAttributes()
Method Detail

setContextAttribute

public void setContextAttribute(int precedence,
                                java.lang.String tag)
Parameters:
precedence - an integer representing the order in which multiple attributes should be considered when making decisions based on multiple attributes
tag - a string representing the value of the attribute to add
See Also:
IAnalyzerContext.setContextAttribute(int, java.lang.String)

getContextAttributes

public java.util.List getContextAttributes()
Returns:
a List of strings representing all the context attributes
See Also:
IAnalyzerContext.getContextAttributes()

asString

public static java.lang.String asString(java.util.List attributes)
Print a list of context attributes as a String

Parameters:
attributes - a list of context attributes as returned by getContextAttributes()
Returns:
the attributes as a human-readable string

initializeBasicContextAttributes

public void initializeBasicContextAttributes(com.ibm.dtfj.image.ImageFactory imageFactory,
                                             com.ibm.dtfj.runtime.ManagedRuntime runtime,
                                             java.util.logging.Logger logger)
Initialize some basic context attributes. This methods preloads the attributes with a few pre-defined entries associated with every AnalyzerContext.

Parameters:
imageFactory - the DTFJ ImageFactory in use (to find the DTFJ API version)
runtime - the DTFJ runtime in use
logger - a Logger on which to report errors


© Copyright IBM Corp. 2007, 2008 All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.