Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

field.h

Go to the documentation of this file.
00001 #ifndef _field_h_included_
00002 #define _field_h_included_
00003 
00004 /*!
00005  * @file field.h
00006  *
00007  * @brief Field management functions for the JVM.
00008  *
00009  *
00010  * @section Control
00011  *
00012  * \$URL: https://svn.apache.org/path/name/field.h $ \$Id: field.h 0 09/28/2005 dlydick $
00013  *
00014  * Copyright 2005 The Apache Software Foundation
00015  * or its licensors, as applicable.
00016  *
00017  * Licensed under the Apache License, Version 2.0 ("the License");
00018  * you may not use this file except in compliance with the License.
00019  * You may obtain a copy of the License at
00020  *
00021  *     http://www.apache.org/licenses/LICENSE-2.0
00022  *
00023  * Unless required by applicable law or agreed to in writing,
00024  * software distributed under the License is distributed on an
00025  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
00026  * either express or implied.
00027  *
00028  * See the License for the specific language governing permissions
00029  * and limitations under the License.
00030  *
00031  * @version \$LastChangedRevision: 0 $
00032  *
00033  * @date \$LastChangedDate: 09/28/2005 $
00034  *
00035  * @author \$LastChangedBy: dlydick $
00036  *         Original code contributed by Daniel Lydick on 09/28/2005.
00037  *
00038  * @section Reference
00039  *
00040  */
00041 
00042 ARCH_COPYRIGHT_APACHE(field, h, "$URL: https://svn.apache.org/path/name/field.h $ $Id: field.h 0 09/28/2005 dlydick $");
00043 
00044 
00045 #include "jvalue.h"
00046 
00047 
00048 /*!
00049  * @def FIELD
00050  * @brief Access structures of a class' field table at certain index.
00051  *
00052  * Each class has a table of fields, divided into class static fields
00053  * and object instance fields.  This macro references one of
00054  * them using the @b clsidx index for the class and @b fldidx for 
00055  * the field table entry in that class.
00056  *
00057  * @param clsidx  Class table index into the global
00058  *                @link #rjvm.class rjvm.class[]@endlink array (via
00059  *                @link #pjvm pjvm->class[]@endlink).
00060  * 
00061  * @param fldidx  Index into method table for this class.
00062  * 
00063  * @returns pointer to a field table entry
00064  * 
00065  */
00066 #define FIELD(clsidx, fldidx) \
00067     (CLASS_OBJECT_LINKAGE(clsidx)->pcfs->fields[fldidx])
00068 
00069 
00070 /* Prototypes for functions in 'field.h' */
00071 
00072 extern jvm_field_index field_find_by_cp_entry(jvm_class_index  clsidx,
00073                                               cp_info_dup     *fldname,
00074                                               cp_info_dup     *flddesc);
00075 
00076 extern rboolean field_index_is_class_static(jvm_class_index clsidx,
00077                                             jvm_field_index fldidx);
00078 
00079 extern rboolean field_name_is_class_static(jvm_class_index  clsidx,
00080                                            cp_info_dup     *fldname,
00081                                            cp_info_dup     *flddesc);
00082 
00083 extern rboolean field_index_is_object_instance(jvm_class_index clsidx,
00084                                                jvm_field_index fldidx);
00085 
00086 extern rboolean field_name_is_object_instance(jvm_class_index  clsidx,
00087                                               cp_info_dup     *fldname,
00088                                               cp_info_dup     *flddesc);
00089 
00090 extern jvm_field_lookup_index
00091     field_index_get_class_static_lookup(jvm_class_index clsidx,
00092                                         jvm_field_index fldidx);
00093 
00094 extern jvm_field_lookup_index
00095     field_name_get_class_static_lookup(jvm_class_index  clsidx,
00096                                        cp_info_dup     *fldname,
00097                                        cp_info_dup     *flddesc);
00098 
00099 extern jvm_field_lookup_index
00100     field_index_get_object_instance_lookup(jvm_class_index clsidx,
00101                                            jvm_field_index fldidx);
00102 
00103 extern jvm_field_lookup_index
00104     field_name_get_object_instance_lookup(jvm_class_index  clsidx,
00105                                           cp_info_dup     *fldname,
00106                                           cp_info_dup     *flddesc);
00107 
00108 extern jvalue *field_index_get_class_static_pjvalue(
00109                    jvm_class_index  clsidx,
00110                    jvm_field_index fldidx);
00111 
00112 extern jvalue *field_name_get_class_static_pjvalue(
00113                    jvm_class_index  clsidx,
00114                    cp_info_dup     *fldname,
00115                    cp_info_dup     *flddesc);
00116 
00117 extern jvalue *field_index_get_object_instance_pjvalue(
00118                    jvm_object_hash objhash,
00119                    jvm_field_index fldidx);
00120 
00121 extern jvalue *field_name_get_object_instance_pjvalue(
00122                    jvm_object_hash  objhash,
00123                    cp_info_dup     *fldname,
00124                    cp_info_dup     *flddesc);
00125 
00126 extern jvm_field_index field_index_put_class_static_pjvalue(
00127                    jvm_class_index  clsidx,
00128                    jvm_field_index  fldidx,
00129                    jvalue          *_jvalue);
00130 
00131 extern jvm_field_index field_name_put_class_static_pjvalue(
00132                    jvm_class_index  clsidx,
00133                    cp_info_dup     *fldname,
00134                    cp_info_dup     *flddesc,
00135                    jvalue          *_jvalue);
00136 
00137 extern jvm_field_index field_index_put_object_instance_pjvalue(
00138                    jvm_object_hash  objhash,
00139                    jvm_field_index  fldidx,
00140                    jvalue          *_jvalue);
00141 
00142 extern jvm_field_index field_name_put_object_instance_pjvalue(
00143                    jvm_object_hash  objhash,
00144                    cp_info_dup     *fldname,
00145                    cp_info_dup     *flddesc,
00146                    jvalue          *_jvalue);
00147 
00148 #endif /* _field_h_included_ */
00149 
00150 /* EOF */
00151 

Generated on Fri Sep 30 18:59:28 2005 by  doxygen 1.4.4