Package org.openjdk.jmc.agent
Interface TransformRegistry
- All Known Implementing Classes:
DefaultTransformRegistry
public interface TransformRegistry
-
Method Summary
Modifier and TypeMethodDescriptionClears all classes and their corresponding transforms in the registry.Returns the names of all classes stored in the registry.Returns the currently instrumented configuration.getTransformData(String className) Returns the unmodifiable list ofTransformDescriptors for the named class.booleanhasPendingTransforms(String className) The named class has transforms that have not been executed yet.booleanDetermines if classes should be reverted to their pre instrumentation versions.Modifies class information in the registry according to the xml description.voidsetCurrentConfiguration(String xmlDescription) Set the current configuration that will be instrumentedvoidsetRevertInstrumentation(boolean shouldRevert) Signify classes are or are not being reverted to their pre instrumentation versions.
-
Method Details
-
hasPendingTransforms
The named class has transforms that have not been executed yet.- Parameters:
className- the name of the class to be transformed.- Returns:
- true if the class has transforms scheduled. false if not.
-
getTransformData
Returns the unmodifiable list ofTransformDescriptors for the named class.- Parameters:
className- the class for which to retrieve the transformation metadata.- Returns:
- the list of transformation metadata for the named class; may be empty but never
null.
-
getClassNames
Returns the names of all classes stored in the registry.- Returns:
- the unmodifiable set of class names.
-
getCurrentConfiguration
String getCurrentConfiguration()Returns the currently instrumented configuration.- Returns:
- an XML snippet of the configuration.
-
setCurrentConfiguration
Set the current configuration that will be instrumented- Parameters:
xmlDescription- an XML snippet describing the current configuration
-
modify
Modifies class information in the registry according to the xml description.- Parameters:
xmlDescription- an XML snippet describing the wanted modifications.- Returns:
- a set of class names associated with modified
TransformDescriptors. - Throws:
XMLValidationException- if the supplied XML fails to validate.
-
clearAllTransformData
Clears all classes and their corresponding transforms in the registry.- Returns:
- the set of class names that were cleared.
-
setRevertInstrumentation
void setRevertInstrumentation(boolean shouldRevert) Signify classes are or are not being reverted to their pre instrumentation versions.- Parameters:
shouldRevert- true if class instrumentation should be reverted, false otherwise.
-
isRevertIntrumentation
boolean isRevertIntrumentation()Determines if classes should be reverted to their pre instrumentation versions.- Returns:
- true, if classes should be reverted and false otherwise.
-