Package org.glassfish.pfl.tf.spi
Interface EnhancedClassData
-
- All Known Implementing Classes:
EnhancedClassDataASMImpl
,EnhancedClassDataBase
,EnhancedClassDataReflectiveImpl
public interface EnhancedClassData
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
EnhancedClassData.MethodType
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DESCRIPTION_NAME
static java.lang.String
INFO_METHOD_NAME
static java.lang.String
MM_NAME
static org.objectweb.asm.Type
MM_TYPE
static java.lang.String
OBJECT_NAME
static org.objectweb.asm.Type
OBJECT_TYPE
static java.lang.String
SH_NAME
static org.objectweb.asm.Type
SH_TYPE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EnhancedClassData.MethodType
classifyMethod(java.lang.String fullMethodDescriptor)
Classify the method.java.util.Map<java.lang.String,java.lang.String>
getAnnotationToHolderName()
Map from MM annotation name to the name of the holder field that contains the SynchronizedHolder for the corresponding MethodMonitor.java.lang.String
getClassName()
Return the internal name of the class.java.util.List<java.lang.String>
getDescriptions()
List of descriptions of monitored methods and info methods.java.lang.String
getHolderName(java.lang.String fullMethodDescriptor)
Name of the holder fields corresponding to a particular method.int
getMethodIndex(java.lang.String methodName)
Index of method name in the list of method names.java.util.List<java.lang.String>
getMethodMMAnnotationName()
List of annotation names for each info method and monitored method.java.util.List<java.lang.String>
getMethodNames()
List of method names for all MM methods and info methods in the class.java.util.List<java.lang.String>
getTimingPointNames()
List of timing point names corresponding to method names.java.util.List<TimingPointType>
getTimingPointTypes()
List of timing point types of monitored methods and info methods.boolean
isTracedClass()
Returns true iff this class is monitored.void
updateInfoDesc()
Enhance all of the descriptors for infoMethods.
-
-
-
Field Detail
-
OBJECT_TYPE
static final org.objectweb.asm.Type OBJECT_TYPE
-
OBJECT_NAME
static final java.lang.String OBJECT_NAME
-
SH_TYPE
static final org.objectweb.asm.Type SH_TYPE
-
SH_NAME
static final java.lang.String SH_NAME
-
MM_TYPE
static final org.objectweb.asm.Type MM_TYPE
-
MM_NAME
static final java.lang.String MM_NAME
-
INFO_METHOD_NAME
static final java.lang.String INFO_METHOD_NAME
-
DESCRIPTION_NAME
static final java.lang.String DESCRIPTION_NAME
-
-
Method Detail
-
getClassName
java.lang.String getClassName()
Return the internal name of the class.- Returns:
- The class name.
-
isTracedClass
boolean isTracedClass()
Returns true iff this class is monitored.- Returns:
- true iff this class has one or more MM annotations.
-
getAnnotationToHolderName
java.util.Map<java.lang.String,java.lang.String> getAnnotationToHolderName()
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.- Returns:
- Map from MM annotations defined on this class to the names of the holder fields.
-
classifyMethod
EnhancedClassData.MethodType classifyMethod(java.lang.String fullMethodDescriptor)
Classify the method.- Parameters:
fullMethodDescriptor
- The full method descriptor of the method.- Returns:
- The kind of the corresponding method.
-
getHolderName
java.lang.String getHolderName(java.lang.String fullMethodDescriptor)
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.- Parameters:
fullMethodDescriptor
- The full method descriptor of the method.- Returns:
- The name of the holder field used for this method.
-
getMethodNames
java.util.List<java.lang.String> getMethodNames()
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.- Returns:
- List of all method tracing names in sorted order.
-
getTimingPointNames
java.util.List<java.lang.String> getTimingPointNames()
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.- Returns:
- List of timing point names, in the same order as in getMethodTracingNames.
-
getDescriptions
java.util.List<java.lang.String> getDescriptions()
List of descriptions of monitored methods and info methods. If no description was given in the annotations, the value is "".- Returns:
- List of descriptions in the same order as in getMethodTracingNames.
-
getTimingPointTypes
java.util.List<TimingPointType> 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.- Returns:
- List of TimingPointTypes in the same order as in getMethodTracingNames.
-
getMethodMMAnnotationName
java.util.List<java.lang.String> getMethodMMAnnotationName()
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.
- Returns:
- List of annotation names for methods.
-
getMethodIndex
int getMethodIndex(java.lang.String methodName)
Index of method name in the list of method names.- Parameters:
methodName
- The method name as defined for tracing.- Returns:
- the method index
-
updateInfoDesc
void updateInfoDesc()
Enhance all of the descriptors for infoMethods.
-
-