| 40 | MethodRef(u16, u16), |
| 41 | InterfaceMethodRef(u16, u16), |
| 42 | NameAndType(u16, u16), |
| 43 | MethodHandle(u8, u16), |
| 44 | MethodType(u16), |
| 45 | Dynamic(u16, u16), |
| 46 | InvokeDynamic(u16, u16), |
| 47 | Module(u16), |
| 48 | Package(u16), |
| 49 | } |
| 50 | |
| 51 | impl From<&Constant<'_>> for ConstantKey { |
| 52 | fn from(constant: &Constant<'_>) -> Self { |
| 53 | match constant { |
| 54 | Constant::Utf8(value) => Self::Utf8(value.as_ref().to_owned()), |
| 55 | Constant::Integer(value) => Self::Integer(*value), |
| 56 | Constant::Float(value) => Self::Float(value.to_bits()), |
| 57 | Constant::Long(value) => Self::Long(*value), |
| 58 | Constant::Double(value) => Self::Double(value.to_bits()), |
| 59 | Constant::Class(index) => Self::Class(*index), |
| 60 | Constant::String(index) => Self::String(*index), |
| 61 | Constant::FieldRef { |