Method: Seasar::Container::S2ApplicationContext#setup_auto_aspect

Defined in:
lib/seasar/container/s2application-context.rb

#setup_auto_aspect(component_def) ⇒ Object

  • args

    1. Seasar::Container::ComponentDef component_def

  • return

    • nil



286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'lib/seasar/container/s2application-context.rb', line 286

def setup_auto_aspect(component_def)
  self.aspect_infos.each {|aspect_info|
    if aspect_info.applicable?(component_def)
      aspect_def = AspectDef.new(aspect_info.pointcut)
      if component_def.container.has_component_def(aspect_info.interceptor)
        aspect_def.child_component_def = component_def.container.get_component_def(aspect_info.interceptor)
      else
        aspect_def.value = aspect_info.interceptor
      end
      component_def.add_aspect_def(aspect_def)
    end
  }
end