APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.jfr.internal.tracing

public final Record Filter

extends Record
Class Inheritance
Record Components
className:String 
methodName:String 
annotationName:String 
modification:Modification 
Imports
jdk.internal.module.Checks

Class that represents the filter a user can specify for the MethodTrace and MethodTiming event.

Field Summary

Modifier and TypeField and Description
private final String
annotationName

Record Component accessed by annotationName().

private final String
className

Record Component accessed by className().

private final String
methodName

Record Component accessed by methodName().

private final Modification
modification

Record Component accessed by modification().

Constructor Summary

AccessConstructor and Description
public
Filter(String className, String methodName, String annotationName, Modification modification)

Method Summary

Modifier and TypeMethod and Description
public String
annotationName()

Record Component getter of annotationName.

public String
className()

Record Component getter of className.

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

private static boolean
isMethod(String methodName)

public static boolean
isValid(String filter)

private static boolean
public String
methodName()

Record Component getter of methodName.

public Modification
modification()

Record Component getter of modification.

pack-priv static Filter
of(String filter, Modification modification)

private static Filter
ofAnnotation(String filter, Modification modification)

private static Filter
ofClass(String filter, Modification modification)

private static Filter
ofMethod(String filter, Modification modification)

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

annotationNameback to summary
private final String annotationName

Record Component accessed by annotationName().

classNameback to summary
private final String className

Record Component accessed by className().

methodNameback to summary
private final String methodName

Record Component accessed by methodName().

modificationback to summary
private final Modification modification

Record Component accessed by modification().

Constructor Detail

Filterback to summary
public Filter(String className, String methodName, String annotationName, Modification modification)

Method Detail

annotationNameback to summary
public String annotationName()

Record Component getter of annotationName.

classNameback to summary
public String className()

Record Component getter of className.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

isMethodback to summary
private static boolean isMethod(String methodName)
isValidback to summary
public static boolean isValid(String filter)
isValidClassNameback to summary
private static boolean isValidClassName(String text)
methodNameback to summary
public String methodName()

Record Component getter of methodName.

modificationback to summary
public Modification modification()

Record Component getter of modification.

ofback to summary
pack-priv static Filter of(String filter, Modification modification)
ofAnnotationback to summary
private static Filter ofAnnotation(String filter, Modification modification)
ofClassback to summary
private static Filter ofClass(String filter, Modification modification)
ofMethodback to summary
private static Filter ofMethod(String filter, Modification modification)
toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.