1 /* src/vmcore/field.c - field functions
3 Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
4 C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 J. Wenninger, Institut f. Computersprachen - TU Wien
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 $Id: field.c 7246 2007-01-29 18:49:05Z twisti $
36 #include "vmcore/field.h"
37 #include "vmcore/references.h"
38 #include "vmcore/utf8.h"
41 /* field_free ******************************************************************
43 Frees a fields' resources.
45 *******************************************************************************/
47 void field_free(fieldinfo *f)
53 /* field_printflags ************************************************************
57 *******************************************************************************/
60 void field_printflags(fieldinfo *f)
67 if (f->flags & ACC_PUBLIC) printf(" PUBLIC");
68 if (f->flags & ACC_PRIVATE) printf(" PRIVATE");
69 if (f->flags & ACC_PROTECTED) printf(" PROTECTED");
70 if (f->flags & ACC_STATIC) printf(" STATIC");
71 if (f->flags & ACC_FINAL) printf(" FINAL");
72 if (f->flags & ACC_SYNCHRONIZED) printf(" SYNCHRONIZED");
73 if (f->flags & ACC_VOLATILE) printf(" VOLATILE");
74 if (f->flags & ACC_TRANSIENT) printf(" TRANSIENT");
75 if (f->flags & ACC_NATIVE) printf(" NATIVE");
76 if (f->flags & ACC_INTERFACE) printf(" INTERFACE");
77 if (f->flags & ACC_ABSTRACT) printf(" ABSTRACT");
82 /* field_print *****************************************************************
86 *******************************************************************************/
89 void field_print(fieldinfo *f)
92 printf("(fieldinfo*)NULL");
96 utf_display_printable_ascii_classname(f->class->name);
98 utf_display_printable_ascii(f->name);
100 utf_display_printable_ascii(f->descriptor);
107 /* field_println ***************************************************************
111 *******************************************************************************/
114 void field_println(fieldinfo *f)
121 /* field_fieldref_print ********************************************************
125 *******************************************************************************/
128 void field_fieldref_print(constant_FMIref *fr)
131 printf("(constant_FMIref *)NULL");
135 if (IS_FMIREF_RESOLVED(fr)) {
137 field_print(fr->p.field);
140 printf("<fieldref> ");
141 utf_display_printable_ascii_classname(fr->p.classref->name);
143 utf_display_printable_ascii(fr->name);
145 utf_display_printable_ascii(fr->descriptor);
150 /* field_fieldref_println ******************************************************
154 *******************************************************************************/
157 void field_fieldref_println(constant_FMIref *fr)
159 field_fieldref_print(fr);
165 * These are local overrides for various environment variables in Emacs.
166 * Please do not remove this and leave it at the end of the file, where
167 * Emacs will automagically detect them.
168 * ---------------------------------------------------------------------
171 * indent-tabs-mode: t