cprover
java_bytecode_parsert Class Reference
Inheritance diagram for java_bytecode_parsert:
[legend]
Collaboration diagram for java_bytecode_parsert:
[legend]

Classes

class  bytecodet
 
struct  pool_entryt
 

Public Types

typedef java_bytecode_parse_treet::classt classt
 
typedef java_bytecode_parse_treet::classt::fieldst fieldst
 
typedef java_bytecode_parse_treet::classt::methodst methodst
 
typedef java_bytecode_parse_treet::methodt methodt
 
typedef java_bytecode_parse_treet::fieldt fieldt
 
typedef java_bytecode_parse_treet::methodt::instructionst instructionst
 
typedef java_bytecode_parse_treet::instructiont instructiont
 
typedef java_bytecode_parse_treet::annotationt annotationt
 
typedef java_bytecode_parse_treet::annotationst annotationst
 
typedef std::vector< pool_entrytconstant_poolt
 
- Public Types inherited from messaget
enum  message_levelt {
  M_ERROR =1, M_WARNING =2, M_RESULT =4, M_STATUS =6,
  M_STATISTICS =8, M_PROGRESS =9, M_DEBUG =10
}
 

Public Member Functions

 java_bytecode_parsert ()
 
virtual bool parse ()
 
- Public Member Functions inherited from parsert
virtual void clear ()
 
 parsert ()
 
virtual ~parsert ()
 
bool read (char &ch)
 
bool eof ()
 
void parse_error (const std::string &message, const std::string &before)
 
void inc_line_no ()
 
void set_line_no (unsigned _line_no)
 
void set_file (const irep_idt &file)
 
irep_idt get_file () const
 
unsigned get_line_no () const
 
unsigned get_column () const
 
void set_column (unsigned _column)
 
void set_source_location (exprt &e)
 
void set_function (const irep_idt &function)
 
void advance_column (unsigned token_width)
 
- Public Member Functions inherited from messaget
virtual void set_message_handler (message_handlert &_message_handler)
 
message_handlertget_message_handler ()
 
 messaget ()
 
 messaget (const messaget &other)
 
 messaget (message_handlert &_message_handler)
 
virtual ~messaget ()
 
mstreamtget_mstream (unsigned message_level)
 
mstreamterror ()
 
mstreamtwarning ()
 
mstreamtresult ()
 
mstreamtstatus ()
 
mstreamtstatistics ()
 
mstreamtprogress ()
 
mstreamtdebug ()
 

Public Attributes

java_bytecode_parse_treet parse_tree
 
constant_poolt constant_pool
 
- Public Attributes inherited from parsert
std::istream * in
 
std::string this_line
 
std::string last_line
 
std::vector< exprtstack
 

Protected Member Functions

pool_entrytpool_entry (u2 index)
 
exprtconstant (u2 index)
 
const typet type_entry (u2 index)
 
void get_bytecodes ()
 
void rClassFile ()
 
void rconstant_pool ()
 
void rinterfaces (classt &parsed_class)
 
void rfields (classt &parsed_class)
 
void rmethods (classt &parsed_class)
 
void rmethod (classt &parsed_class)
 
void rclass_attribute (classt &parsed_class)
 
void rRuntimeAnnotation_attribute (annotationst &)
 
void rRuntimeAnnotation (annotationt &)
 
void relement_value_pairs (annotationt::element_value_pairst &)
 
void relement_value_pair (annotationt::element_value_pairt &)
 
void rmethod_attribute (methodt &method)
 
void rfield_attribute (fieldt &)
 
void rcode_attribute (methodt &method)
 
void read_verification_type_info (methodt::verification_type_infot &)
 
void rbytecode (methodt::instructionst &)
 
void get_class_refs ()
 
void get_class_refs_rec (const typet &)
 
void skip_bytes (std::size_t bytes)
 
u8 read_bytes (size_t bytes)
 
u1 read_u1 ()
 
u2 read_u2 ()
 
u4 read_u4 ()
 
u8 read_u8 ()
 

Protected Attributes

std::vector< bytecodetbytecodes
 
- Protected Attributes inherited from parsert
source_locationt source_location
 
unsigned line_no
 
unsigned previous_line_no
 
unsigned column
 
- Protected Attributes inherited from messaget
message_handlertmessage_handler
 
mstreamt mstream
 

Additional Inherited Members

- Static Public Member Functions inherited from messaget
static mstreamteom (mstreamt &m)
 
static mstreamtendl (mstreamt &m)
 

Detailed Description

Definition at line 32 of file java_bytecode_parser.cpp.

Member Typedef Documentation

◆ annotationst

◆ annotationt

◆ classt

◆ constant_poolt

Definition at line 64 of file java_bytecode_parser.cpp.

◆ fieldst

◆ fieldt

◆ instructionst

◆ instructiont

◆ methodst

◆ methodt

Constructor & Destructor Documentation

◆ java_bytecode_parsert()

java_bytecode_parsert::java_bytecode_parsert ( )
inline

Definition at line 35 of file java_bytecode_parser.cpp.

References get_bytecodes().

Member Function Documentation

◆ constant()

exprt& java_bytecode_parsert::constant ( u2  index)
inlineprotected

◆ get_bytecodes()

void java_bytecode_parsert::get_bytecodes ( )
inlineprotected

Definition at line 98 of file java_bytecode_parser.cpp.

References bytecode_info, bytecodes, and bytecode_infot::mnemonic.

Referenced by java_bytecode_parsert().

◆ get_class_refs()

◆ get_class_refs_rec()

◆ parse()

bool java_bytecode_parsert::parse ( )
virtual

Implements parsert.

Definition at line 204 of file java_bytecode_parser.cpp.

References messaget::eom(), messaget::error(), and rClassFile().

Referenced by java_bytecode_parse().

◆ pool_entry()

◆ rbytecode()

◆ rclass_attribute()

◆ rClassFile()

◆ rcode_attribute()

◆ rconstant_pool()

◆ read_bytes()

u8 java_bytecode_parsert::read_bytes ( size_t  bytes)
inlineprotected

◆ read_u1()

u1 java_bytecode_parsert::read_u1 ( )
inlineprotected

◆ read_u2()

◆ read_u4()

u4 java_bytecode_parsert::read_u4 ( )
inlineprotected

◆ read_u8()

u8 java_bytecode_parsert::read_u8 ( )
inlineprotected

Definition at line 173 of file java_bytecode_parser.cpp.

References read_bytes().

Referenced by rconstant_pool().

◆ read_verification_type_info()

◆ relement_value_pair()

void java_bytecode_parsert::relement_value_pair ( annotationt::element_value_pairt element_value_pair)
protected

◆ relement_value_pairs()

void java_bytecode_parsert::relement_value_pairs ( annotationt::element_value_pairst element_value_pairs)
protected

◆ rfield_attribute()

void java_bytecode_parsert::rfield_attribute ( fieldt field)
protected

◆ rfields()

◆ rinterfaces()

void java_bytecode_parsert::rinterfaces ( classt parsed_class)
protected

◆ rmethod()

◆ rmethod_attribute()

◆ rmethods()

void java_bytecode_parsert::rmethods ( classt parsed_class)
protected

Definition at line 1316 of file java_bytecode_parser.cpp.

References read_u2(), and rmethod().

Referenced by rClassFile().

◆ rRuntimeAnnotation()

◆ rRuntimeAnnotation_attribute()

void java_bytecode_parsert::rRuntimeAnnotation_attribute ( annotationst annotations)
protected

◆ skip_bytes()

void java_bytecode_parsert::skip_bytes ( std::size_t  bytes)
inlineprotected

◆ type_entry()

const typet java_bytecode_parsert::type_entry ( u2  index)
inlineprotected

Definition at line 93 of file java_bytecode_parser.cpp.

References id2string(), java_type_from_string(), and pool_entry().

Referenced by rconstant_pool(), and rRuntimeAnnotation().

Member Data Documentation

◆ bytecodes

std::vector<bytecodet> java_bytecode_parsert::bytecodes
protected

Definition at line 75 of file java_bytecode_parser.cpp.

Referenced by get_bytecodes(), and rbytecode().

◆ constant_pool

constant_poolt java_bytecode_parsert::constant_pool

Definition at line 65 of file java_bytecode_parser.cpp.

Referenced by get_class_refs(), pool_entry(), and rconstant_pool().

◆ parse_tree

java_bytecode_parse_treet java_bytecode_parsert::parse_tree

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