Class: Seasar::Container::TooManyRegistrationComponentDef
- Inherits:
-
SimpleComponentDef
- Object
- ComponentDef
- SimpleComponentDef
- Seasar::Container::TooManyRegistrationComponentDef
- Defined in:
- lib/seasar/container/toomany-registration-component-def.rb
Instance Attribute Summary collapse
-
#component_defs ⇒ Object
Returns the value of attribute component_defs.
Attributes inherited from ComponentDef
#autobinding_def, #component_class, #component_name, #container, #instance_def, #onetime_proc, #procedure
Instance Method Summary collapse
-
#add_component_def(component_def) ⇒ Object
-
args 1.
-
-
#get_component ⇒ Object
(also: #get, #component, #[])
-
args - none - return - Object.
-
-
#get_component_classes ⇒ Object
-
args - none - return - Array.
-
-
#initialize(key) ⇒ TooManyRegistrationComponentDef
constructor
-
args 1.
-
Methods inherited from ComponentDef
#add_arg_def, #add_aspect_def, #add_property_def, #get_arg_def, #get_arg_def_size, #get_arg_defs, #get_aspect_def, #get_aspect_def_size, #get_component_deployer, #get_concreate_class, #get_property_def, #get_property_def_size, #get_property_defs, #has_property_def
Constructor Details
#initialize(key) ⇒ TooManyRegistrationComponentDef
-
args
-
String|Symbol key
-
25 26 27 28 |
# File 'lib/seasar/container/toomany-registration-component-def.rb', line 25 def initialize(key) @key = key @component_defs = [] end |
Instance Attribute Details
#component_defs ⇒ Object
Returns the value of attribute component_defs.
29 30 31 |
# File 'lib/seasar/container/toomany-registration-component-def.rb', line 29 def component_defs @component_defs end |
Instance Method Details
#add_component_def(component_def) ⇒ Object
-
args
-
Seasar::Container::ComponentDef component_def
-
-
return
-
none
-
37 38 39 |
# File 'lib/seasar/container/toomany-registration-component-def.rb', line 37 def add_component_def(component_def) @component_defs << component_def end |
#get_component ⇒ Object Also known as: get, component, []
-
args
-
none
-
-
return
-
Object
-
47 48 49 |
# File 'lib/seasar/container/toomany-registration-component-def.rb', line 47 def get_component raise Seasar::Container::Exception::TooManyRegistrationRuntimeException.new(@key, self.get_component_classes) end |
#get_component_classes ⇒ Object
-
args
-
none
-
-
return
-
Array
-
60 61 62 63 64 65 66 |
# File 'lib/seasar/container/toomany-registration-component-def.rb', line 60 def get_component_classes component_classes = [] @component_defs.each {|component_def| component_classes << component_def.component_class } return component_classes end |