-
Notifications
You must be signed in to change notification settings - Fork 2
/
attr_invoke_dynamic.go
69 lines (60 loc) · 1.54 KB
/
attr_invoke_dynamic.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package classfile
/*
CONSTANT_InvokeDynamic_info {
u1 tag;
u2 bootstrap_method_attr_index;
u2 name_and_type_index;
}
*/
type ConstantInvokeDynamicInfo struct {
BootstrapMethodAttrIndex uint16
NameAndTypeIndex uint16
}
func readConstantInvokeDynamicInfo(reader *ClassReader) ConstantInvokeDynamicInfo {
return ConstantInvokeDynamicInfo{
BootstrapMethodAttrIndex: reader.readUint16(),
NameAndTypeIndex: reader.readUint16(),
}
}
func (self ConstantInvokeDynamicInfo) readInfo(reader *ClassReader) {
self.NameAndTypeIndex = reader.readUint16()
self.BootstrapMethodAttrIndex = reader.readUint16()
}
/*
CONSTANT_MethodHandle_info {
u1 tag;
u1 reference_kind;
u2 reference_index;
}
*/
type ConstantMethodHandleInfo struct {
ReferenceKind uint8
ReferenceIndex uint16
}
func readConstantMethodHandleInfo(reader *ClassReader) ConstantMethodHandleInfo {
return ConstantMethodHandleInfo{
ReferenceKind: reader.readUint8(),
ReferenceIndex: reader.readUint16(),
}
}
func (self ConstantMethodHandleInfo) readInfo(reader *ClassReader) {
self.ReferenceKind = reader.readUint8()
self.ReferenceIndex = reader.readUint16()
}
/*
CONSTANT_MethodType_info {
u1 tag;
u2 descriptor_index;
}
*/
type ConstantMethodTypeInfo struct {
DescriptorIndex uint16
}
func readConstantMethodTypeInfo(reader *ClassReader) ConstantMethodTypeInfo {
return ConstantMethodTypeInfo{
DescriptorIndex: reader.readUint16(),
}
}
func (self *ConstantMethodTypeInfo) readInfo(reader *ClassReader) {
self.DescriptorIndex = reader.readUint16()
}