JVM
fields.h File Reference
#include <stdint.h>
#include "javaclass.h"
#include "attributes.h"
Include dependency graph for fields.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  field_info
 

Typedefs

typedef struct field_info field_info
 

Functions

char readField (JavaClass *jc, field_info *entry)
 Reads a field_info from the file. More...
 
void freeFieldAttributes (field_info *entry)
 Releases attributes used by the field_info struct. More...
 
void printAllFields (JavaClass *jc)
 Function to print all fields of the class file. More...
 
field_infogetFieldMatching (JavaClass *jc, const uint8_t *name, int32_t name_len, const uint8_t *descriptor, int32_t descriptor_len, uint16_t flag_mask)
 

Typedef Documentation

§ field_info

typedef struct field_info field_info

Function Documentation

§ freeFieldAttributes()

void freeFieldAttributes ( field_info entry)

Releases attributes used by the field_info struct.

Parameters
field_info*entry - pointer to the field_info that contains the attributes
Note
This function does not free the *entry pointer, just attributes
Here is the call graph for this function:
Here is the caller graph for this function:

§ getFieldMatching()

field_info* getFieldMatching ( JavaClass jc,
const uint8_t *  name,
int32_t  name_len,
const uint8_t *  descriptor,
int32_t  descriptor_len,
uint16_t  flag_mask 
)
Here is the call graph for this function:
Here is the caller graph for this function:

§ printAllFields()

void printAllFields ( JavaClass jc)

Function to print all fields of the class file.

Parameters
JavaClass*jc - pointer to JavaClass structure that must already be loaded
Here is the call graph for this function:
Here is the caller graph for this function:

§ readField()

char readField ( JavaClass jc,
field_info entry 
)

Reads a field_info from the file.

Parameters
JavaClass*jc - pointer to the structure to be read
field_info*entry - where the data read is written
Returns
char - retuns 0 if something unexpected happened or failure, 1 in case of success
Here is the call graph for this function:
Here is the caller graph for this function: