- java.lang.Object
 -  
      
- jdk.jfr.SettingDescriptor
 
 
-  
       
public final class SettingDescriptor extends Object
描述事件设置。- 从以下版本开始:
 - 9
 
 
-  
        
       
-  
             
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 <A extends Annotation>
AgetAnnotation(类<A> annotationType)如果具有相同名称的注释元素可用,则返回指定类型的第一个注释,否则null。List<AnnotationElement>getAnnotationElements()返回此值描述符的注释元素的不可变列表。StringgetContentType()返回一个文本标识符,指定如何解释或格式化此SettingDescriptor对象表示的值。StringgetDefaultValue()返回此设置描述符的默认值。StringgetDescription()返回描述设置的句子(例如"Record event with duration above or equal to threshold")。StringgetLabel()返回描述设置的可读名称(例如,"Threshold")。StringgetName()返回设置的名称(例如,"threshold")。longgetTypeId()返回Java虚拟机(JVM)中类型的唯一ID。StringgetTypeName()返回与此设置描述符关联的类型的完全限定类名。 
 -  
             
 
-  
        
       
-  
             
方法详细信息
-  
getName
public String getName()
返回设置的名称(例如,"threshold")。- 结果
 - 
               这个名字,不是 
              
null 
 
-  
getLabel
public String getLabel()
返回描述设置的可读名称(例如,"Threshold")。如果设置缺少标签,则返回与此设置关联的类型的标签,如果不存在,则返回
null- 结果
 - 
               一个人类可读的名称,如果不存在, 
              
null 
 
-  
getDescription
public String getDescription()
返回描述设置的句子(例如"Record event with duration above or equal to threshold")。如果设置缺少说明,则返回与此设置关联的类型的说明,如果不存在,则返回
null。- 结果
 - 
               描述,或 
              
null如果不存在 
 
-  
getContentType
public String getContentType()
返回一个文本标识符,指定如何解释或格式化此SettingDescriptor对象表示的值。例如,如果设置描述符表示百分比,则
"jdk.jfr.Percentage"向客户端提示值“0.5”被格式化为“50%”。JDK提供以下预定义内容类型:
- jdk.jfr.Percentage
 - jdk.jfr.Timespan
 - jdk.jfr.Timestamp
 - jdk.jfr.Frequency
 - jdk.jfr.Flag
 - jdk.jfr.MemoryAddress
 - jdk.jfr.DataAmount
 - jdk.jfr.NetworkAddress
 
可以使用
ContentType创建用户定义的内容类型。如果设置缺少内容类型,则返回与此设置关联的类型的内容类型,如果不可用,则返回
null。- 结果
 - 
               内容类型,如果不存在, 
              
null - 另请参见:
 -  
              
ContentType 
 
-  
getTypeName
public String getTypeName()
返回与此设置描述符关联的类型的完全限定类名。- 结果
 - 
               类型名称,而不是 
              
null - 另请参见:
 -  
              
getTypeId() 
 
-  
getTypeId
public long getTypeId()
返回Java虚拟机(JVM)中类型的唯一ID。JVM实例之间的ID可能不同。
- 结果
 - 类型ID,不是负面的
 
 
-  
getAnnotation
public <A extends Annotation> A getAnnotation(类<A> annotationType)
如果具有相同名称的注释元素可用,则返回指定类型的第一个注释,否则null。- 参数类型
 -  
              
A- 要查询和返回的注释的类型(如果可用) - 参数
 -  
              
annotationType- 与注释类型对应的Class对象,而不是null - 结果
 - 
               此元素的指定注释类型的注释(如果可用),否则为 
              
null 
 
-  
getAnnotationElements
public List<AnnotationElement> getAnnotationElements()
返回此值描述符的注释元素的不可变列表。- 结果
 - 
               注释列表,而不是 
              
null 
 
-  
getDefaultValue
public String getDefaultValue()
返回此设置描述符的默认值。- 结果
 - 
               默认值,而不是 
              
null 
 
 -  
 
 -