JVM
fields.c File Reference
#include "fields.h"
#include "readfunctions.h"
#include "validity.h"
#include "utf8.h"
#include "debugging.h"
Include dependency graph for fields.c:

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)
 

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: