       @_batman.keyAccessors ||= new Batman.SimpleHash
       @_batman.keyAccessors.set(key, getAccessorObject(this, accessor)) for key in keys
 
-  _defineAccessor: @_defineAccessor
-
-  @_defineWrapAccessor: (keys..., wrapper) ->
+  _defineWrapAccessor: (keys..., wrapper) ->
     Batman.initializeObject(this)
     if keys.length is 0
       @_defineAccessor wrapSingleAccessor(@_defineAccessor(), wrapper)


  @accessor '_batmanID', -> @_batmanID()

Batman.Object = BatmanObject

#= require ./observable/observable
#= require ./hash/simple_hash

getAccessorObject = (base, accessor) ->
  if typeof accessor is 'function'
    accessor = {get: accessor}
  for deprecated in ['cachable', 'cacheable']
    if deprecated of accessor
      Batman.developer.warn "Property accessor option \"#{deprecated}\" is deprecated. Use \"cache\" instead."
      accessor.cache = accessor[deprecated] unless 'cache' of accessor
  accessor

promiseWrapper = (fetcher) ->
  (defaultAccessor) ->
    get: (key) ->
      return existingValue if (existingValue = defaultAccessor.get.apply(this, arguments))?
      asyncDeliver = false
      newValue = undefined
      @_batman.promises ?= {}
      @_batman.promises[key] ?= do =>
        deliver = (err, result) =>
          @set(key, result) if asyncDeliver
          newValue = result
        returnValue = fetcher.call(this, deliver, key)
        newValue = returnValue unless newValue?
        true
      asyncDeliver = true
      newValue
    cache: true

wrapSingleAccessor = (core, wrapper) ->
  wrapper = wrapper?(core) or wrapper
  for k, v of core
    wrapper[k] = v unless k of wrapper
  wrapper

ObjectFunctions =
  _defineAccessor: (keys..., accessor) ->
    if not accessor?
      return Batman.Property.defaultAccessorForBase(this)
    else if keys.length is 0 and Batman.typeOf(accessor) not in ['Object', 'Function']
