Class SettingDescriptor
java.lang.Object
jdk.jfr.SettingDescriptor
-
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
AgetAnnotation(Class<A> annotationType) Returns the first annotation for the specified type if an annotation element with the same name is available,nullotherwise.Returns an immutable list of annotation elements for this value descriptor.Returns a textual identifier that specifies how a value that is represented by thisSettingDescriptorobject is interpreted or formatted.Returns the default value for this setting descriptor.Returns a sentence that describes the setting (for example"Record event with duration above or equal to threshold").getLabel()Returns a human-readable name that describes the setting (for example,"Threshold").getName()Returns the name of the setting (for example,"threshold").longReturns a unique ID for the type in the Java Virtual Machine (JVM).Returns the fully qualified class name of the type that is associated with this setting descriptor.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Method Details
-
getName
Returns the name of the setting (for example,"threshold").- Returns:
- the name, not
null
-
getLabel
Returns a human-readable name that describes the setting (for example,"Threshold").If the setting lacks a label, the label for the type that is associated with this setting is returned, or
nullif doesn't exist- Returns:
- a human-readable name, or
nullif doesn't exist
-
getDescription
Returns a sentence that describes the setting (for example"Record event with duration above or equal to threshold").If the setting lacks a description, the description for the type that is associated with this setting is returned, or
nullif doesn't exist.- Returns:
- the description, or
nullif doesn't exist
-
getContentType
Returns a textual identifier that specifies how a value that is represented by thisSettingDescriptorobject is interpreted or formatted.For example, if the setting descriptor represents a percentage, then
"jdk.jfr.Percentage"hints to a client that a value of "0.5" is formatted as "50%".The JDK provides the following predefined content types:
- jdk.jfr.Percentage
- jdk.jfr.Timespan
- jdk.jfr.Timestamp
- jdk.jfr.Frequency
- jdk.jfr.Flag
- jdk.jfr.MemoryAddress
- jdk.jfr.DataAmount
- jdk.jfr.NetworkAddress
User-defined content types can be created by using
ContentType.If the setting lacks a content type, the content type for the type that is associated with this setting is returned, or
nullif not available.- Returns:
- the content type, or
nullif doesn't exist - See Also:
-
getTypeName
Returns the fully qualified class name of the type that is associated with this setting descriptor.- Returns:
- the type name, not
null - See Also:
-
getTypeId
public long getTypeId()Returns a unique ID for the type in the Java Virtual Machine (JVM).The ID might not be the same between JVM instances.
- Returns:
- the type ID, not negative
-
getAnnotation
Returns the first annotation for the specified type if an annotation element with the same name is available,nullotherwise.- Type Parameters:
A- the type of the annotation to query for and return if available- Parameters:
annotationType- the Class object that corresponds to the annotation type, notnull- Returns:
- this element's annotation for the specified annotation type if
available,
nullotherwise
-
getAnnotationElements
Returns an immutable list of annotation elements for this value descriptor.- Returns:
- a list of annotations, not
null
-
getDefaultValue
Returns the default value for this setting descriptor.- Returns:
- the default value, not
null
-