public final class jdk.jfr.EventFactory
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.jfr.EventFactory
super_class: java.lang.Object
{
private static final long REGISTERED_ID;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.lang.Class<? extends jdk.jfr.Event> eventClass;
descriptor: Ljava/lang/Class;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/Class<+Ljdk/jfr/Event;>;
private final java.lang.invoke.MethodHandle constructorHandle;
descriptor: Ljava/lang/invoke/MethodHandle;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.List<jdk.jfr.AnnotationElement> sanitizedAnnotation;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<Ljdk/jfr/AnnotationElement;>;
private final java.util.List<jdk.jfr.ValueDescriptor> sanitizedFields;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<Ljdk/jfr/ValueDescriptor;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: ldc Ljdk/jfr/Registered;
invokestatic jdk.jfr.internal.Type.getTypeId:(Ljava/lang/Class;)J
putstatic jdk.jfr.EventFactory.REGISTERED_ID:J
return
LocalVariableTable:
Start End Slot Name Signature
private void <init>(java.lang.Class<? extends jdk.jfr.Event>, java.util.List<jdk.jfr.AnnotationElement>, java.util.List<jdk.jfr.ValueDescriptor>);
descriptor: (Ljava/lang/Class;Ljava/util/List;Ljava/util/List;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
invokestatic java.lang.invoke.MethodHandles.lookup:()Ljava/lang/invoke/MethodHandles$Lookup;
aload 1
iconst_0
anewarray java.lang.Class
invokevirtual java.lang.Class.getConstructor:([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
invokevirtual java.lang.invoke.MethodHandles$Lookup.unreflectConstructor:(Ljava/lang/reflect/Constructor;)Ljava/lang/invoke/MethodHandle;
putfield jdk.jfr.EventFactory.constructorHandle:Ljava/lang/invoke/MethodHandle;
2: aload 0
aload 1
putfield jdk.jfr.EventFactory.eventClass:Ljava/lang/Class;
3: aload 0
aload 2
putfield jdk.jfr.EventFactory.sanitizedAnnotation:Ljava/util/List;
4: aload 0
aload 3
putfield jdk.jfr.EventFactory.sanitizedFields:Ljava/util/List;
5: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/jfr/EventFactory;
0 6 1 eventClass Ljava/lang/Class<+Ljdk/jfr/Event;>;
0 6 2 sanitizedAnnotation Ljava/util/List<Ljdk/jfr/AnnotationElement;>;
0 6 3 sanitizedFields Ljava/util/List<Ljdk/jfr/ValueDescriptor;>;
Exceptions:
throws java.lang.IllegalAccessException, java.lang.NoSuchMethodException, java.lang.SecurityException
Signature: (Ljava/lang/Class<+Ljdk/jfr/Event;>;Ljava/util/List<Ljdk/jfr/AnnotationElement;>;Ljava/util/List<Ljdk/jfr/ValueDescriptor;>;)V
MethodParameters:
Name Flags
eventClass
sanitizedAnnotation
sanitizedFields
public static jdk.jfr.EventFactory create(java.util.List<jdk.jfr.AnnotationElement>, java.util.List<jdk.jfr.ValueDescriptor>);
descriptor: (Ljava/util/List;Ljava/util/List;)Ljdk/jfr/EventFactory;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=11, args_size=2
start local 0 start local 1 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
2: invokestatic jdk.jfr.internal.JVMSupport.ensureWithInternalError:()V
3: invokestatic jdk.jfr.internal.Utils.checkRegisterPermission:()V
4: aload 0
ldc Ljdk/jfr/AnnotationElement;
invokestatic jdk.jfr.internal.Utils.sanitizeNullFreeList:(Ljava/util/List;Ljava/lang/Class;)Ljava/util/List;
astore 2
start local 2 5: aload 1
ldc Ljdk/jfr/ValueDescriptor;
invokestatic jdk.jfr.internal.Utils.sanitizeNullFreeList:(Ljava/util/List;Ljava/lang/Class;)Ljava/util/List;
astore 3
start local 3 6: new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
astore 4
start local 4 7: aload 3
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 6
goto 19
StackMap locals: java.util.List java.util.List java.util.List java.util.List java.util.Set top java.util.Iterator
StackMap stack:
8: aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast jdk.jfr.ValueDescriptor
astore 5
start local 5 9: aload 5
invokevirtual jdk.jfr.ValueDescriptor.getName:()Ljava/lang/String;
astore 7
start local 7 10: aload 5
invokevirtual jdk.jfr.ValueDescriptor.isArray:()Z
ifeq 12
11: new java.lang.IllegalArgumentException
dup
ldc "Array types are not allowed for fields"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
12: StackMap locals: java.util.List java.util.List java.util.List java.util.List java.util.Set jdk.jfr.ValueDescriptor java.util.Iterator java.lang.String
StackMap stack:
aload 5
invokevirtual jdk.jfr.ValueDescriptor.getTypeName:()Ljava/lang/String;
invokestatic jdk.jfr.internal.Type.isValidJavaFieldType:(Ljava/lang/String;)Z
ifne 14
13: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
aload 5
invokevirtual jdk.jfr.ValueDescriptor.getTypeName:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " is not a valid type for an event field"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
14: StackMap locals:
StackMap stack:
aload 5
invokevirtual jdk.jfr.ValueDescriptor.getName:()Ljava/lang/String;
invokestatic jdk.jfr.internal.Type.isValidJavaIdentifier:(Ljava/lang/String;)Z
ifne 16
15: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
aload 7
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " is not a valid name for an event field"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
16: StackMap locals:
StackMap stack:
aload 4
aload 7
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifeq 18
17: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Name of fields must be unique. Found two instances of "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 7
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
18: StackMap locals:
StackMap stack:
aload 4
aload 7
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
end local 7 end local 5 19: StackMap locals: java.util.List java.util.List java.util.List java.util.List java.util.Set top java.util.Iterator
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 8
20: iconst_1
istore 5
start local 5 21: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 6
start local 6 22: aload 2
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 8
goto 31
StackMap locals: java.util.List java.util.List java.util.List java.util.List java.util.Set int java.util.List top java.util.Iterator
StackMap stack:
23: aload 8
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast jdk.jfr.AnnotationElement
astore 7
start local 7 24: aload 7
invokevirtual jdk.jfr.AnnotationElement.getTypeId:()J
lstore 9
start local 9 25: aload 7
invokevirtual jdk.jfr.AnnotationElement.isInBoot:()Z
ifeq 31
26: lload 9
getstatic jdk.jfr.EventFactory.REGISTERED_ID:J
lcmp
ifne 30
27: getstatic java.lang.Boolean.FALSE:Ljava/lang/Boolean;
aload 7
ldc "value"
invokevirtual jdk.jfr.AnnotationElement.getValue:(Ljava/lang/String;)Ljava/lang/Object;
invokevirtual java.lang.Boolean.equals:(Ljava/lang/Object;)Z
ifeq 31
28: iconst_0
istore 5
29: goto 31
30: StackMap locals: java.util.List java.util.List java.util.List java.util.List java.util.Set int java.util.List jdk.jfr.AnnotationElement java.util.Iterator long
StackMap stack:
aload 6
aload 7
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 9 end local 7 31: StackMap locals: java.util.List java.util.List java.util.List java.util.List java.util.Set int java.util.List top java.util.Iterator
StackMap stack:
aload 8
invokeinterface java.util.Iterator.hasNext:()Z
ifne 23
32: aload 6
new jdk.jfr.AnnotationElement
dup
ldc Ljdk/jfr/Registered;
iconst_0
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
invokespecial jdk.jfr.AnnotationElement.<init>:(Ljava/lang/Class;Ljava/lang/Object;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
33: new jdk.jfr.internal.EventClassBuilder
dup
aload 6
aload 3
invokespecial jdk.jfr.internal.EventClassBuilder.<init>:(Ljava/util/List;Ljava/util/List;)V
astore 7
start local 7 34: aload 7
invokevirtual jdk.jfr.internal.EventClassBuilder.build:()Ljava/lang/Class;
astore 8
start local 8 35: iload 5
ifeq 37
36: invokestatic jdk.jfr.internal.MetadataRepository.getInstance:()Ljdk/jfr/internal/MetadataRepository;
aload 8
aload 2
aload 3
invokevirtual jdk.jfr.internal.MetadataRepository.register:(Ljava/lang/Class;Ljava/util/List;Ljava/util/List;)Ljdk/jfr/EventType;
pop
37: StackMap locals: java.util.List java.util.List java.util.List java.util.List java.util.Set int java.util.List jdk.jfr.internal.EventClassBuilder java.lang.Class
StackMap stack:
new jdk.jfr.EventFactory
dup
aload 8
aload 2
aload 3
invokespecial jdk.jfr.EventFactory.<init>:(Ljava/lang/Class;Ljava/util/List;Ljava/util/List;)V
38: areturn
39: StackMap locals:
StackMap stack: java.lang.IllegalAccessException
astore 9
start local 9 40: new java.lang.IllegalAccessError
dup
new java.lang.StringBuilder
dup
ldc "Could not access constructor of generated event handler, "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 9
invokevirtual java.lang.IllegalAccessException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalAccessError.<init>:(Ljava/lang/String;)V
athrow
end local 9 41: StackMap locals:
StackMap stack: java.lang.NoSuchMethodException
astore 9
start local 9 42: new java.lang.InternalError
dup
new java.lang.StringBuilder
dup
ldc "Could not find constructor in generated event handler, "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 9
invokevirtual java.lang.NoSuchMethodException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
athrow
end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 43 0 annotationElements Ljava/util/List<Ljdk/jfr/AnnotationElement;>;
0 43 1 fields Ljava/util/List<Ljdk/jfr/ValueDescriptor;>;
5 43 2 sanitizedAnnotation Ljava/util/List<Ljdk/jfr/AnnotationElement;>;
6 43 3 sanitizedFields Ljava/util/List<Ljdk/jfr/ValueDescriptor;>;
7 43 4 nameSet Ljava/util/Set<Ljava/lang/String;>;
9 19 5 v Ljdk/jfr/ValueDescriptor;
10 19 7 name Ljava/lang/String;
21 43 5 needRegister Z
22 43 6 bootAnnotations Ljava/util/List<Ljdk/jfr/AnnotationElement;>;
24 31 7 ae Ljdk/jfr/AnnotationElement;
25 31 9 id J
34 43 7 ecb Ljdk/jfr/internal/EventClassBuilder;
35 43 8 eventClass Ljava/lang/Class<+Ljdk/jfr/Event;>;
40 41 9 e Ljava/lang/IllegalAccessException;
42 43 9 e Ljava/lang/NoSuchMethodException;
Exception table:
from to target type
37 38 39 Class java.lang.IllegalAccessException
37 38 41 Class java.lang.NoSuchMethodException
Signature: (Ljava/util/List<Ljdk/jfr/AnnotationElement;>;Ljava/util/List<Ljdk/jfr/ValueDescriptor;>;)Ljdk/jfr/EventFactory;
MethodParameters:
Name Flags
annotationElements
fields
public jdk.jfr.Event newEvent();
descriptor: ()Ljdk/jfr/Event;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
getfield jdk.jfr.EventFactory.constructorHandle:Ljava/lang/invoke/MethodHandle;
invokevirtual java.lang.invoke.MethodHandle.invoke:()Ljdk/jfr/Event;
1: areturn
2: StackMap locals:
StackMap stack: java.lang.Throwable
astore 1
start local 1 3: new java.lang.InstantiationError
dup
new java.lang.StringBuilder
dup
ldc "Could not instantiate dynamically generated event class "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield jdk.jfr.EventFactory.eventClass:Ljava/lang/Class;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc ". "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
invokevirtual java.lang.Throwable.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.InstantiationError.<init>:(Ljava/lang/String;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/jfr/EventFactory;
3 4 1 e Ljava/lang/Throwable;
Exception table:
from to target type
0 1 2 Class java.lang.Throwable
public jdk.jfr.EventType getEventType();
descriptor: ()Ljdk/jfr/EventType;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.jfr.EventFactory.eventClass:Ljava/lang/Class;
invokestatic jdk.jfr.EventType.getEventType:(Ljava/lang/Class;)Ljdk/jfr/EventType;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/jfr/EventFactory;
public void register();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: invokestatic jdk.jfr.internal.MetadataRepository.getInstance:()Ljdk/jfr/internal/MetadataRepository;
aload 0
getfield jdk.jfr.EventFactory.eventClass:Ljava/lang/Class;
aload 0
getfield jdk.jfr.EventFactory.sanitizedAnnotation:Ljava/util/List;
aload 0
getfield jdk.jfr.EventFactory.sanitizedFields:Ljava/util/List;
invokevirtual jdk.jfr.internal.MetadataRepository.register:(Ljava/lang/Class;Ljava/util/List;Ljava/util/List;)Ljdk/jfr/EventType;
pop
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/jfr/EventFactory;
public void unregister();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: invokestatic jdk.jfr.internal.MetadataRepository.getInstance:()Ljdk/jfr/internal/MetadataRepository;
aload 0
getfield jdk.jfr.EventFactory.eventClass:Ljava/lang/Class;
invokevirtual jdk.jfr.internal.MetadataRepository.unregister:(Ljava/lang/Class;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/jfr/EventFactory;
}
SourceFile: "EventFactory.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles