FieldMap(com.caucho.bytecode.JavaClass baseClass,
String fieldName)
{
ConstantPool pool = baseClass.getConstantPool();
FieldRefConstant fieldRef = pool.getFieldRef(fieldName);
if (fieldRef == null)
return;
_fieldRef = fieldRef.getIndex();
MethodRefConstant methodRef;
String getterName = "__caucho_get_" + fieldName;
methodRef = pool.addMethodRef(baseClass.getThisClass(),
getterName,
"()" + fieldRef.getType());
_getterRef = methodRef.getIndex();
String setterName = "__caucho_set_" + fieldName;
methodRef = pool.addMethodRef(baseClass.getThisClass(),
setterName,
"(" + fieldRef.getType() + ")V");
_setterRef = methodRef.getIndex();
}