1 /* src/vm/field.c - field functions
3 Copyright (C) 1996-2005, 2006 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 Contact: cacao@cacaojvm.org
27 Authors: Reinhard Grafl
29 Changes: Andreas Krall
35 $Id: field.c 4879 2006-05-05 17:34:49Z edwin $
50 /* field_free ******************************************************************
52 Frees a fields' resources.
54 *******************************************************************************/
56 void field_free(fieldinfo *f)
62 /* field_printflags ************************************************************
66 *******************************************************************************/
69 void field_printflags(fieldinfo *f)
76 if (f->flags & ACC_PUBLIC) printf(" PUBLIC");
77 if (f->flags & ACC_PRIVATE) printf(" PRIVATE");
78 if (f->flags & ACC_PROTECTED) printf(" PROTECTED");
79 if (f->flags & ACC_STATIC) printf(" STATIC");
80 if (f->flags & ACC_FINAL) printf(" FINAL");
81 if (f->flags & ACC_SYNCHRONIZED) printf(" SYNCHRONIZED");
82 if (f->flags & ACC_VOLATILE) printf(" VOLATILE");
83 if (f->flags & ACC_TRANSIENT) printf(" TRANSIENT");
84 if (f->flags & ACC_NATIVE) printf(" NATIVE");
85 if (f->flags & ACC_INTERFACE) printf(" INTERFACE");
86 if (f->flags & ACC_ABSTRACT) printf(" ABSTRACT");
91 /* field_print *****************************************************************
95 *******************************************************************************/
98 void field_print(fieldinfo *f)
101 printf("(fieldinfo*)NULL");
105 utf_display_printable_ascii_classname(f->class->name);
107 utf_display_printable_ascii(f->name);
109 utf_display_printable_ascii(f->descriptor);
116 /* field_println ***************************************************************
120 *******************************************************************************/
123 void field_println(fieldinfo *f)
130 /* field_fieldref_print ********************************************************
134 *******************************************************************************/
137 void field_fieldref_print(constant_FMIref *fr)
140 printf("(constant_FMIref *)NULL");
144 if (IS_FMIREF_RESOLVED(fr)) {
146 field_print(fr->p.field);
149 printf("<fieldref> ");
150 utf_display_printable_ascii_classname(fr->p.classref->name);
152 utf_display_printable_ascii(fr->name);
154 utf_display_printable_ascii(fr->descriptor);
159 /* field_fieldref_println ******************************************************
163 *******************************************************************************/
166 void field_fieldref_println(constant_FMIref *fr)
168 field_fieldref_print(fr);
174 * These are local overrides for various environment variables in Emacs.
175 * Please do not remove this and leave it at the end of the file, where
176 * Emacs will automagically detect them.
177 * ---------------------------------------------------------------------
180 * indent-tabs-mode: t