   # All class attributes should not be modified (e.g. by a running program)
   # once it has been constructed.
   constructor: (bytes_array) ->
-    @ml_cache = []
-    @fl_cache = []
+    @ml_cache = {}
+    @fl_cache = {}
     bytes_array = new util.BytesArray bytes_array
     throw "Magic number invalid" if (bytes_array.get_uint 4) != 0xCAFEBABE
     @minor_version = bytes_array.get_uint 2

      if field.name is field_spec.name
        return field

    ifaces = (c2t(@constant_pool.get(i).deref()) for i in @interfaces)
    for ifc in ifaces
      ifc_cls = rs.class_lookup ifc
      field = ifc_cls.field_lookup(rs, field_spec)
      return field if field?


  @for_array_type: (type) ->
    class_file = Object.create ClassFile.prototype # avoid calling the constructor
    class_file.constant_pool = new ConstantPool
    class_file.ml_cache = {}
    class_file.fl_cache = {}
    class_file.access_flags = {}
    class_file.this_class = type
    class_file.super_class = c2t('java/lang/Object')
    class_file.interfaces = []
    class_file.fields = []
    class_file.methods = {}
    class_file.attrs = []
    class_file

