dex++ 0.3.1
C++ and C API reference
Loading...
Searching...
No Matches
dex::AnnotationValue Struct Reference

A fully resolved annotation element value. More...

#include <analysis/annotations.hpp>

Classes

struct  EnumValue
 Enum constant, identified by its static field (VALUE_ENUM). More...
 
struct  FieldValue
 A field as a value (VALUE_FIELD; rare outside system annotations). More...
 
struct  MethodHandleValue
 Method handle (VALUE_METHOD_HANDLE): what it does and the member it does it to. More...
 
struct  MethodTypeValue
 Method prototype (VALUE_METHOD_TYPE), as a full "(...)ret" descriptor. More...
 
struct  MethodValue
 A method as a value (VALUE_METHOD; rare outside system annotations). More...
 
struct  TypeValue
 Class literal, e.g. target = String.class (VALUE_TYPE). More...
 

Public Attributes

std::variant< std::nullptr_t, bool, int64_t, double, std::string, TypeValue, EnumValue, FieldValue, MethodValue, MethodTypeValue, MethodHandleValue, std::vector< AnnotationValue >, std::shared_ptr< const Annotation > > value
 

Detailed Description

A fully resolved annotation element value.

Pool indices from the raw encoded_value are resolved to owned identities: strings/descriptors are copied out, enum/field references become FieldId, method references become MethodId. All integral primitives (byte, short, char, int, long) widen to int64_t and float widens to double — the source primitive width is not preserved at this layer. Values are owned and independent of the AnalysisContext's lifetime.

The nested types are plain values, named after the DEX encoded_value kind they hold. They are not handles: none of them refers to the context.

Member Data Documentation

◆ value

std::variant<std::nullptr_t, bool, int64_t, double, std::string, TypeValue, EnumValue, FieldValue, MethodValue, MethodTypeValue, MethodHandleValue, std::vector<AnnotationValue>, std::shared_ptr<const Annotation> > dex::AnnotationValue::value

The documentation for this struct was generated from the following file: