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

A constant value as the DEX format encodes it (encoded_value), with its exact type: a Java char stays a Char, a byte a Byte. More...

#include <model/types.hpp>

Classes

struct  Array
 
struct  Boolean
 
struct  Byte
 
struct  Char
 
struct  Double
 
struct  Enum
 An enum constant, named by its static field. More...
 
struct  Field
 
struct  Float
 
struct  Int
 
struct  Long
 
struct  Method
 
struct  MethodType
 A method type (java.lang.invoke.MethodType), as a prototype descriptor. More...
 
struct  Null
 
struct  Short
 
struct  String
 
struct  Type
 A class literal, e.g. String.class. More...
 

Public Member Functions

bool operator== (const Value &) const =default
 

Public Attributes

std::variant< Null, Boolean, Byte, Short, Char, Int, Long, Float, Double, String, Type, Field, Method, Enum, MethodType, MethodHandle, Array, Shared< EncodedAnnotation > > data
 

Detailed Description

A constant value as the DEX format encodes it (encoded_value), with its exact type: a Java char stays a Char, a byte a Byte.

Build one from its alternative: Value{Value::Int{42}}, Value{Value::String{"x"}}. There is no implicit conversion from plain numbers, so a value can't get the wrong type by accident. Float and Double compare by their bits, so -0.0 and 0.0 differ and a NaN equals itself.

Member Function Documentation

◆ operator==()

bool dex::model::Value::operator== ( const Value &  ) const
default

Member Data Documentation

◆ data


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