Package org.glassfish.pfl.tf.spi
Class EnhancedClassDataBase
java.lang.Object
org.glassfish.pfl.tf.spi.EnhancedClassDataBase
- All Implemented Interfaces:
EnhancedClassData
- Direct Known Subclasses:
EnhancedClassDataASMImpl
,EnhancedClassDataReflectiveImpl
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.glassfish.pfl.tf.spi.EnhancedClassData
EnhancedClassData.MethodType
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected final List
<TimingPointType> protected Util
Fields inherited from interface org.glassfish.pfl.tf.spi.EnhancedClassData
DESCRIPTION_NAME, INFO_METHOD_NAME, MM_NAME, MM_TYPE, OBJECT_NAME, OBJECT_TYPE, SH_NAME, SH_TYPE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
EnhancedClassDataBase
(Util util, Set<String> annotationNames) -
Method Summary
Modifier and TypeMethodDescriptionclassifyMethod
(String fullMethodDescriptor) Classify the method.Map from MM annotation name to the name of the holder field that contains the SynchronizedHolder for the corresponding MethodMonitor.Return the internal name of the class.List of descriptions of monitored methods and info methods.getHolderName
(String fullMethodDescriptor) Name of the holder fields corresponding to a particular method.int
getMethodIndex
(String methodName) Index of method name in the list of method names.List of annotation names for each info method and monitored method.List of method names for all MM methods and info methods in the class.List of timing point names corresponding to method names.List of timing point types of monitored methods and info methods.boolean
Returns true iff this class is monitored.void
Enhance all of the descriptors for infoMethods.
-
Field Details
-
util
-
annotationNames
-
className
-
annoNamesForClass
-
annoToHolderName
-
methodNames
-
methodDescriptions
-
methodTPTs
-
methodTPNames
-
methodAnnoList
-
infoMethodDescs
-
mmMethodDescs
-
methodToAnno
-
-
Constructor Details
-
EnhancedClassDataBase
-
-
Method Details
-
getClassName
Description copied from interface:EnhancedClassData
Return the internal name of the class.- Specified by:
getClassName
in interfaceEnhancedClassData
- Returns:
- The class name.
-
getAnnotationToHolderName
Description copied from interface:EnhancedClassData
Map from MM annotation name to the name of the holder field that contains the SynchronizedHolder for the corresponding MethodMonitor. The domain of this map is the set of MM annotations on this class.- Specified by:
getAnnotationToHolderName
in interfaceEnhancedClassData
- Returns:
- Map from MM annotations defined on this class to the names of the holder fields.
-
getMethodNames
Description copied from interface:EnhancedClassData
List of method names for all MM methods and info methods in the class. Order is significant, as the index of the method in the list is the ordinal used to represent it. This list is in sorted order.- Specified by:
getMethodNames
in interfaceEnhancedClassData
- Returns:
- List of all method tracing names in sorted order.
-
getMethodIndex
Description copied from interface:EnhancedClassData
Index of method name in the list of method names.- Specified by:
getMethodIndex
in interfaceEnhancedClassData
- Parameters:
methodName
- The method name as defined for tracing.- Returns:
- the method index
-
getHolderName
Description copied from interface:EnhancedClassData
Name of the holder fields corresponding to a particular method. Note that the full descriptor (name + arg/return descriptor) is used to unambiguously identify the method in the class.- Specified by:
getHolderName
in interfaceEnhancedClassData
- Parameters:
fullMethodDescriptor
- The full method descriptor of the method.- Returns:
- The name of the holder field used for this method.
-
classifyMethod
Description copied from interface:EnhancedClassData
Classify the method.- Specified by:
classifyMethod
in interfaceEnhancedClassData
- Parameters:
fullMethodDescriptor
- The full method descriptor of the method.- Returns:
- The kind of the corresponding method.
-
isTracedClass
public boolean isTracedClass()Description copied from interface:EnhancedClassData
Returns true iff this class is monitored.- Specified by:
isTracedClass
in interfaceEnhancedClassData
- Returns:
- true iff this class has one or more MM annotations.
-
updateInfoDesc
public void updateInfoDesc()Description copied from interface:EnhancedClassData
Enhance all of the descriptors for infoMethods.- Specified by:
updateInfoDesc
in interfaceEnhancedClassData
-
getDescriptions
List of descriptions of monitored methods and info methods. If no description was given in the annotations, the value is "".- Specified by:
getDescriptions
in interfaceEnhancedClassData
- Returns:
- List of descriptions in the same order as in getMethodTracingNames.
-
getTimingPointTypes
List of timing point types of monitored methods and info methods. The list contains BOTH for a monitored method. An info method that does not represent a timing point is represented by NONE.- Specified by:
getTimingPointTypes
in interfaceEnhancedClassData
- Returns:
- List of TimingPointTypes in the same order as in getMethodTracingNames.
-
getTimingPointNames
Description copied from interface:EnhancedClassData
List of timing point names corresponding to method names. For monitored methods, this is just the method name. For info methods whose tpType is not NONE, this is specified in tpName.- Specified by:
getTimingPointNames
in interfaceEnhancedClassData
- Returns:
- List of timing point names, in the same order as in getMethodTracingNames.
-
getMethodMMAnnotationName
Description copied from interface:EnhancedClassData
List of annotation names for each info method and monitored method. It is interpreted as follows:- If the entry in the list is not null, it is the only annotation applicable to this method. This is the case for monitored methods.
- If the entry in the list is null, all annotations on the enclosing class apply to this method. This is the case for an InfoMethod, which can be called from any monitored method regardless of the annotation on the monitored method.
- Specified by:
getMethodMMAnnotationName
in interfaceEnhancedClassData
- Returns:
- List of annotation names for methods.
-