[webbeans-commits] Webbeans SVN: r111 - in ri/trunk: webbeans-api/src/main/java/javax/webbeans and 15 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-28 07:39:24 -0400 (Sun, 28 Sep 2008)
New Revision: 111
Added:
ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActiveException.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/
ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Conversation.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Observer.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/BeanImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ApplicationScopedAnnotationLiteral.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ConversationScopedAnnotationLiteral.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/CurrentAnnotationLiteral.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/DependentAnnotationLiteral.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/NamedAnnotationLiteral.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ProductionAnnotationLiteral.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/RequestScopedAnnotationLiteral.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/StandardAnnotationLiteral.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnimalStereotypeAnnotationLiteral.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnotherDeploymentTypeAnnotationLiteral.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AsynchronousAnnotationLiteral.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/FishStereotypeAnnotationLiteral.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedAnimalDeploymentTypeAnnotationLiteral.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedMamalStereotypeAnnotationLiteral.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/RiverFishStereotypeAnnotationLiteral.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/SynchronousAnnotationLiteral.java
Removed:
ri/trunk/webbeans-api/src/main/java/javax/webbeans/BoundTo.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Component.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/ComponentInstance.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Container.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Context.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActive.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Conversation.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destroys.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/DynamicBinding.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observer.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ComponentInstanceImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ContainerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ApplicationScopedBinding.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ConversationScopedBinding.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/CurrentBinding.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/DependentBinding.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/NamedBinding.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ProductionBinding.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/RequestScopedBinding.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/StandardBinding.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnimalStereotypeBinding.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnotherDeploymentTypeBinding.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AsynchronousBinding.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/FishStereotypeBinding.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedAnimalDeploymentTypeBinding.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedMamalStereotypeBinding.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/RiverFishStereotypeBinding.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/SynchronousBinding.java
Modified:
ri/trunk/webbeans-api/.settings/org.eclipse.jdt.core.prefs
ri/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/New.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Stereotype.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java
ri/trunk/webbeans-ri/.settings/org.eclipse.jdt.core.prefs
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/BasicContext.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/deployment/DeploymentStrategy.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventBus.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverMethod.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/init/Initialization.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/ComponentConstructor.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Element.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/EnterpriseConstructor.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/InjectableMethod.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/JMSConstructor.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/MethodConstructor.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Parameter.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/SimpleConstructor.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Unit.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractClassComponentModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractEnterpriseComponentModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EnterpriseComponentModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EventComponentModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/MergedStereotypesModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ProducerExpressionComponent.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ProducerMethodComponentModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/SimpleComponentModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/WebBeansFilter.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BindingTypeTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ContainerTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Baboon.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Cheetah.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Cougar.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Elephant.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Orangutan.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameOrangutan.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Chimpanzee.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Gibbon.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockContainerImpl.java
Log:
Lots of API changes due to spec updates from Gavin, update impl to match
Modified: ri/trunk/webbeans-api/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- ri/trunk/webbeans-api/.settings/org.eclipse.jdt.core.prefs 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/.settings/org.eclipse.jdt.core.prefs 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,259 +1,259 @@
-#Thu Jul 03 14:28:27 BST 2008
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+#Sun Sep 28 12:11:04 BST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.tabulation.size=3
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=3
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.lineSplit=80
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-eclipse.preferences.version=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.indentation.size=3
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=3
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.webbeans;
+
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies that an observer method is a transactional observer.
+ *
+ * @author Gavin King
+ *
+ */
+@Retention(RUNTIME)
+@Target(PARAMETER)
+public @interface AfterTransactionCompletion {
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.webbeans;
+
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies that an observer method is a transactional observer.
+ *
+ * @author Gavin King
+ *
+ */
+@Retention(RUNTIME)
+@Target(PARAMETER)
+public @interface AfterTransactionFailure {
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.webbeans;
+
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies that an observer method is a transactional observer.
+ *
+ * @author Gavin King
+ *
+ */
+@Retention(RUNTIME)
+@Target(PARAMETER)
+public @interface AfterTransactionSuccess {
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,104 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.webbeans;
+
+/**
+ * @author Pete Muir
+ * @author Gavin King
+ */
+import java.lang.annotation.Annotation;
+import java.lang.reflect.ParameterizedType;
+
+public abstract class AnnotationLiteral<T extends Annotation> implements
+ Annotation
+{
+
+ protected AnnotationLiteral()
+ {
+ if (!(getClass().getSuperclass() == AnnotationLiteral.class))
+ {
+ throw new RuntimeException(
+ "Not a direct subclass of AnnotationLiteral");
+ }
+ if (!(getClass().getGenericSuperclass() instanceof ParameterizedType))
+ {
+ throw new RuntimeException(
+ "Missing type parameter in AnnotationLiteral");
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private static <T> Class<T> getAnnotationType(Class<?> clazz)
+ {
+ ParameterizedType parameterized = (ParameterizedType) clazz
+ .getGenericSuperclass();
+ return (Class<T>) parameterized.getActualTypeArguments()[0];
+ }
+
+ /*
+ // Alternative impl of getAnnotationType
+ private static <T> Class<T> getAnnotationType(Class<?> clazz)
+ {
+
+ Type type = clazz.getGenericSuperclass();
+ Class<T> annotationType = null;
+ if (type instanceof ParameterizedType)
+ {
+ ParameterizedType parameterizedType = (ParameterizedType) type;
+ if (parameterizedType.getActualTypeArguments().length == 1)
+ {
+ annotationType = (Class<T>) parameterizedType
+ .getActualTypeArguments()[0];
+ }
+ }
+ if (annotationType == null && clazz != Object.class)
+ {
+ return getAnnotationType(clazz.getSuperclass());
+ } else
+ {
+ return annotationType;
+ }
+ }
+ *
+ */
+
+ // TODO: equals(), hashCode()
+
+ private Class<T> annotationType;
+
+
+
+ public Class<? extends Annotation> annotationType()
+ {
+ annotationType = getAnnotationType(getClass());
+ if (annotationType == null)
+ {
+ throw new RuntimeException(
+ "Unable to determine type of annotation literal for " + getClass());
+ }
+ return annotationType;
+ }
+
+ @Override
+ public String toString()
+ {
+ // TODO Make this closer to the spec for Annotation
+ String annotationName = "@" + annotationType().getName();
+ return annotationName;
+ }
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -19,8 +19,6 @@
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
@@ -32,7 +30,7 @@
* @author Pete Muir
*/
-@Target( { METHOD, FIELD, PARAMETER, TYPE })
+@Target( { TYPE, METHOD })
@Retention(RUNTIME)
@Documented
@ScopeType
Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.webbeans;
+
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies that an observer method is a transactional observer.
+ *
+ * @author Gavin King
+ *
+ */
+@Retention(RUNTIME)
+@Target(PARAMETER)
+public @interface BeforeTransactionCompletion {
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -17,7 +17,7 @@
package javax.webbeans;
-import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
@@ -26,10 +26,14 @@
/**
*
+ * Specifies that an annotation type is a Web Beans
+ * binding type.
+ *
* @author Pete Muir
+ * @author Gavin King
*/
-@Target(TYPE)
+@Target(ANNOTATION_TYPE)
@Retention(RUNTIME)
@Documented
public @interface BindingType
Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/BoundTo.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/BoundTo.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/BoundTo.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.webbeans;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- *
- * @author Pete Muir
- */
-
-@Target(TYPE)
-@Retention(RUNTIME)
-@Documented
-public @interface BoundTo
-{
-
- public String value();
-
-}
Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Component.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Component.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Component.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.webbeans;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- *
- * @author Pete Muir
- */
-
-@Production
-@Stereotype
-@Target( { TYPE, METHOD })
-@Retention(RUNTIME)
-@Documented
-public @interface Component
-{
-
-}
Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/ComponentInstance.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/ComponentInstance.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/ComponentInstance.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.webbeans;
-
-import java.lang.annotation.Annotation;
-import java.util.Set;
-
-/**
- *
- * @author Pete Muir
- */
-
-public abstract class ComponentInstance<T>
-{
-
- public abstract Set<Class> getTypes();
- public abstract Set<Annotation> getBindingTypes();
- public abstract Annotation getScopeType();
- public abstract Annotation getDeploymentType();
- public abstract String getName();
-
- public abstract T create(Container container);
- public abstract void destroy(Container container, T instance);
-
-}
\ No newline at end of file
Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Container.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Container.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Container.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,59 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.webbeans;
-
-import java.lang.annotation.Annotation;
-import java.util.Set;
-
-/**
- *
- * @author Pete Muir
- */
-
-public interface Container
-{
-
- public <T> T getInstanceByType(Class<T> type, Annotation... bindingTypes);
-
- public <T> T getInstanceByType(TypeLiteral<T> type,
- Annotation... bindingTypes);
-
- public <T> T resolveByType(Class<T> apiType, Annotation... bindingTypes);
-
- public <T> T resolveByType(TypeLiteral<T> apiType,
- Annotation... bindingTypes);
-
- public Object getInstanceByName(String name);
-
- public Set<ComponentInstance> resolveByName(String name);
-
- public void fireEvent(Object event, Annotation... bindings);
-
- public void addObserver(Observer observer);
-
- public void removeObserver(Observer observer);
-
- public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings);
-
- public void addContext(Context context);
-
- public Context getContext(Class<Annotation> scopeType);
-
- public Container addComponent(ComponentInstance component);
-
-}
Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Context.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Context.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Context.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,35 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.webbeans;
-
-import java.lang.annotation.Annotation;
-
-/**
- *
- * @author Pete Muir
- */
-
-public interface Context
-{
-
- public Class<? extends Annotation> getScopeType();
-
- public <T> T get(Container container, ComponentInstance<T> component, boolean create);
-
- public <T> void remove(Container container, ComponentInstance<T> component);
-}
Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActive.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActive.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActive.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,49 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.webbeans;
-
-/**
- * This exception is thrown if an invocation is performed on an inactive scope.
- *
- * @author Pete Muir
- * @author Shane Bryzak
- */
-
-public class ContextNotActive extends RuntimeException
-{
-
- public ContextNotActive()
- {
- }
-
- public ContextNotActive(String message)
- {
- super(message);
- }
-
- public ContextNotActive(Throwable cause)
- {
- super(cause);
- }
-
- public ContextNotActive(String message, Throwable cause)
- {
- super(message, cause);
- }
-
-}
Copied: ri/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActiveException.java (from rev 77, ri/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActive.java)
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActiveException.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActiveException.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.webbeans;
+
+/**
+ * This exception is thrown if an invocation is performed on an inactive scope.
+ *
+ * @author Pete Muir
+ * @author Shane Bryzak
+ */
+
+public class ContextNotActiveException extends RuntimeException
+{
+
+ public ContextNotActiveException()
+ {
+ }
+
+ public ContextNotActiveException(String message)
+ {
+ super(message);
+ }
+
+ public ContextNotActiveException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public ContextNotActiveException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+}
Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Conversation.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Conversation.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Conversation.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,30 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.webbeans;
-
-/**
- *
- * @author Pete Muir
- */
-
-public interface Conversation
-{
-
- public void begin();
- public void end();
-}
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -19,8 +19,6 @@
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
@@ -32,7 +30,7 @@
* @author Pete Muir
*/
-@Target( { METHOD, FIELD, PARAMETER, TYPE })
+@Target( { TYPE, METHOD })
@Retention(RUNTIME)
@Documented
@ScopeType
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -25,7 +25,9 @@
import java.lang.annotation.Target;
/**
+ * Specifies that a field of a decorator class is the delegate.
*
+ * @author Gavin King
* @author Pete Muir
*/
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -25,7 +25,9 @@
import java.lang.annotation.Target;
/**
+ * Specifies that a class is a decorator.
*
+ * @author Gavin King
* @author Pete Muir
*/
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -19,8 +19,6 @@
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
@@ -32,7 +30,7 @@
* @author Pete Muir
*/
-@Target( { METHOD, FIELD, PARAMETER, TYPE })
+@Target( { METHOD, TYPE })
@Retention(RUNTIME)
@Documented
@ScopeType
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -17,7 +17,7 @@
package javax.webbeans;
-import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
@@ -25,11 +25,14 @@
import java.lang.annotation.Target;
/**
+ * Specifies that an annotation type is a Web Beans
+ * component type.
*
+ * @author Gavin King
* @author Pete Muir
*/
-@Target(TYPE)
+@Target(ANNOTATION_TYPE)
@Retention(RUNTIME)
@Documented
public @interface DeploymentType
Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destroys.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destroys.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destroys.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,38 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.webbeans;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- *
- * @author Pete Muir
- */
-
-@Target(METHOD)
-@Retention(RUNTIME)
-@Documented
-public @interface Destroys
-{
-
-}
Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package javax.webbeans;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies that a method of a Web Bean component implementation class is a Web
+ * Beans remove method.
+ *
+ * @author Gavin King
+ *
+ */
+@Retention(RUNTIME)
+@Target(METHOD)
+public @interface Destructor {
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -25,7 +25,11 @@
import java.lang.annotation.Target;
/**
+ * Specifies that a parameter of a method of a Web Bean
+ * component implementation class is the parameter of
+ * a disposal method.
*
+ * @author Gavin King
* @author Pete Muir
*/
Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/DynamicBinding.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/DynamicBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/DynamicBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,75 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.webbeans;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-
-/**
- *
- * @author Pete Muir
- */
-
-public abstract class DynamicBinding<T extends Annotation> implements Annotation
-{
-
- private Class<T> annotationType;
-
- private static <T> Class<T> getAnnotationType(Class<?> clazz)
- {
-
- Type type = clazz.getGenericSuperclass();
- Class<T> annotationType = null;
- if (type instanceof ParameterizedType)
- {
- ParameterizedType parameterizedType = (ParameterizedType) type;
- if (parameterizedType.getActualTypeArguments().length == 1)
- {
- annotationType = (Class<T>) parameterizedType.getActualTypeArguments()[0];
- }
- }
- if (annotationType == null && clazz != Object.class)
- {
- return getAnnotationType(clazz.getSuperclass());
- }
- else
- {
- return annotationType;
- }
- }
-
- public Class<? extends Annotation> annotationType()
- {
- annotationType = getAnnotationType(getClass());
- if (annotationType == null)
- {
- throw new RuntimeException("Unable to determine type of dynamic binding for " + getClass());
- }
- return annotationType;
- }
-
- @Override
- public String toString()
- {
- // TODO Make this closer to the spec for Annotation
- String annotationName = "@" + annotationType().getName();
- return annotationName;
- }
-
-}
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -25,7 +25,10 @@
import java.lang.annotation.Target;
/**
+ * Specifies that an observer method is only called if the current instance of
+ * the Web Bean declaring the observer method already exists.
*
+ * @author Gavin King
* @author Pete Muir
*/
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -26,7 +26,11 @@
import java.lang.annotation.Target;
/**
+ * Specifies that a method of a Web Bean component
+ * implementation class is a Web Beans initializer method,
+ * or that a constructor is the Web Bean component constructor.
*
+ * @author Gavin King
* @author Pete Muir
*/
Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package javax.webbeans;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies that a class is an interceptor.
+ *
+ * @author Gavin King
+ *
+ */
+@Retention(RUNTIME)
+@Target(TYPE)
+public @interface Interceptor {
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -17,7 +17,7 @@
package javax.webbeans;
-import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
@@ -25,11 +25,14 @@
import java.lang.annotation.Target;
/**
+ * Specifies that an annotation type is a Web Beans
+ * interceptor binding type.
*
+ * @author Gavin King
* @author Pete Muir
*/
-@Target(TYPE)
+@Target(ANNOTATION_TYPE)
@Retention(RUNTIME)
@Documented
public @interface InterceptorBindingType
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -26,7 +26,9 @@
import java.lang.annotation.Target;
/**
+ * Specifies the Web Beans component name.
*
+ * @author Gavin King
* @author Pete Muir
*/
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/New.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/New.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/New.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -28,7 +28,9 @@
import java.lang.annotation.Target;
/**
+ * The special binding type.
*
+ * @author Gavin King
* @author Pete Muir
*/
Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package javax.webbeans;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies that a member of a binding type or interceptor binding type is to
+ * be ignored for the purposes of resolution.
+ *
+ * @author Gavin King
+ *
+ */
+@Retention(RUNTIME)
+@Target(METHOD)
+public @interface NonBinding {
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -17,8 +17,9 @@
package javax.webbeans;
import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
+import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
@@ -30,10 +31,12 @@
* observed by observer methods.
*
* @author David Allen
+ * @author Gvin King
*/
-@Target( { FIELD, LOCAL_VARIABLE, PARAMETER })
+@BindingType
@Retention(RUNTIME)
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
@Documented
public @interface Observable
{
Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observer.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observer.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observer.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,36 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* http://www.apache.org/licenses/LICENSE-2.0
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package javax.webbeans;
-
-import java.lang.annotation.Annotation;
-import java.util.Set;
-
-/**
- *
- * @author Pete Muir
- */
-
-public interface Observer<T>
-{
-
- public Class<T> getEventType();
- public Set<Annotation> getEventBindingTypes();
-
- public void notify(Container container, T event);
-
-}
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -25,7 +25,11 @@
import java.lang.annotation.Target;
/**
+ * Specifies that a parameter of a method of a Web Bean
+ * component implementation class is the event parameter
+ * of an observer method.
*
+ * @author Gavin King
* @author Pete Muir
*/
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -26,6 +26,10 @@
/**
*
+ * Specifies that a method of a Web Bean component
+ * implementation class is a Web Beans producer method.
+ *
+ * @author Gavin King
* @author Pete Muir
*/
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -26,7 +26,9 @@
import java.lang.annotation.Target;
/**
+ * Component type for application components.
*
+ * @author Gavin King
* @author Pete Muir
*/
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -19,8 +19,6 @@
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
@@ -32,7 +30,7 @@
* @author Pete Muir
*/
-@Target( { METHOD, FIELD, PARAMETER, TYPE })
+@Target( { TYPE, METHOD })
@Retention(RUNTIME)
@Documented
@ScopeType
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -17,7 +17,7 @@
package javax.webbeans;
-import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
@@ -25,11 +25,13 @@
import java.lang.annotation.Target;
/**
- *
+ * Specifies that an annotation type is a Web Beans
+ * scope type.
+ * @author Gavin King
* @author Pete Muir
*/
-@Target(TYPE)
+@Target(ANNOTATION_TYPE)
@Retention(RUNTIME)
@Documented
public @interface ScopeType
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -19,8 +19,6 @@
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
@@ -32,7 +30,7 @@
* @author Pete Muir
*/
-@Target( { METHOD, FIELD, PARAMETER, TYPE })
+@Target( { TYPE, METHOD })
@Retention(RUNTIME)
@Documented
@ScopeType
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -17,7 +17,6 @@
package javax.webbeans;
-import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@@ -26,11 +25,13 @@
import java.lang.annotation.Target;
/**
+ * Specifies that an implementation class directly specializes its superclass.
*
+ * @author Gavin King
* @author Pete Muir
*/
-@Target( { TYPE, METHOD })
+@Target(TYPE)
@Retention(RUNTIME)
@Documented
public @interface Specializes
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -26,7 +26,9 @@
import java.lang.annotation.Target;
/**
+ * Component type for standard components.
*
+ * @author Gavin King
* @author Pete Muir
*/
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Stereotype.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Stereotype.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Stereotype.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -17,7 +17,7 @@
package javax.webbeans;
-import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Annotation;
@@ -26,12 +26,14 @@
import java.lang.annotation.Target;
/**
+ * Specifies that an annotation type is a Web Beans stereotype.
*
* @author Pete Muir
+ * @author Gavin King
*/
-@Target(TYPE)
@Retention(RUNTIME)
+@Target(ANNOTATION_TYPE)
@Documented
public @interface Stereotype
{
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -17,12 +17,47 @@
package javax.webbeans;
+import java.lang.reflect.GenericArrayType;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+
/**
*
* @author Pete Muir
+ * @author Gavin King
*/
public class TypeLiteral<T>
{
+
+ protected TypeLiteral() {
+ if (!(getClass().getSuperclass() == TypeLiteral.class)) {
+ throw new RuntimeException("Not a direct subclass of TypeLiteral");
+ }
+ if (!(getClass().getGenericSuperclass() instanceof ParameterizedType)) {
+ throw new RuntimeException("Missing type parameter in TypeLiteral");
+ }
+ }
+ public final Type getType() {
+ ParameterizedType parameterized = (ParameterizedType) getClass()
+ .getGenericSuperclass();
+ return parameterized.getActualTypeArguments()[0];
+ }
+
+ @SuppressWarnings("unchecked")
+ public final Class<T> getRawType() {
+ Type type = getType();
+ if (type instanceof Class) {
+ return (Class<T>) type;
+ } else if (type instanceof ParameterizedType) {
+ return (Class<T>) ((ParameterizedType) type).getRawType();
+ } else if (type instanceof GenericArrayType) {
+ return (Class<T>) Object[].class;
+ } else {
+ throw new RuntimeException("Illegal type");
+ }
+ }
+ // TODO: equals(), hashCode()
+
}
Copied: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java (from rev 77, ri/trunk/webbeans-api/src/main/java/javax/webbeans/ComponentInstance.java)
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.webbeans.manager;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+
+/**
+ *
+ * @author Pete Muir
+ */
+
+public abstract class Bean<T>
+{
+
+ public abstract Set<Class> getTypes();
+ public abstract Set<Annotation> getBindingTypes();
+ public abstract Annotation getScopeType();
+ public abstract Annotation getDeploymentType();
+ public abstract String getName();
+
+ public abstract T create(Manager container);
+ public abstract void destroy(Manager container, T instance);
+
+}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java (from rev 77, ri/trunk/webbeans-api/src/main/java/javax/webbeans/Context.java)
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.webbeans.manager;
+
+import java.lang.annotation.Annotation;
+
+
+/**
+ *
+ * @author Pete Muir
+ */
+
+public interface Context
+{
+
+ public Class<? extends Annotation> getScopeType();
+
+ public <T> T get(Manager container, Bean<T> component, boolean create);
+
+ public <T> void remove(Manager container, Bean<T> component);
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Conversation.java (from rev 77, ri/trunk/webbeans-api/src/main/java/javax/webbeans/Conversation.java)
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Conversation.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Conversation.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,30 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.webbeans.manager;
+
+/**
+ *
+ * @author Pete Muir
+ */
+
+public interface Conversation
+{
+
+ public void begin();
+ public void end();
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Conversation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java (from rev 77, ri/trunk/webbeans-api/src/main/java/javax/webbeans/Container.java)
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,61 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.webbeans.manager;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+import javax.webbeans.TypeLiteral;
+
+/**
+ *
+ * @author Pete Muir
+ */
+
+public interface Manager
+{
+
+ public <T> T getInstanceByType(Class<T> type, Annotation... bindingTypes);
+
+ public <T> T getInstanceByType(TypeLiteral<T> type,
+ Annotation... bindingTypes);
+
+ public <T> T resolveByType(Class<T> apiType, Annotation... bindingTypes);
+
+ public <T> T resolveByType(TypeLiteral<T> apiType,
+ Annotation... bindingTypes);
+
+ public Object getInstanceByName(String name);
+
+ public Set<Bean> resolveByName(String name);
+
+ public void fireEvent(Object event, Annotation... bindings);
+
+ public void addObserver(Observer observer);
+
+ public void removeObserver(Observer observer);
+
+ public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings);
+
+ public void addContext(Context context);
+
+ public Context getContext(Class<Annotation> scopeType);
+
+ public Manager addComponent(Bean component);
+
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Observer.java (from rev 77, ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observer.java)
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Observer.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Observer.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.webbeans.manager;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+
+/**
+ *
+ * @author Pete Muir
+ */
+
+public interface Observer<T>
+{
+
+ public Class<T> getEventType();
+ public Set<Annotation> getEventBindingTypes();
+
+ public void notify(Manager container, T event);
+
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Observer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- ri/trunk/webbeans-ri/.settings/org.eclipse.jdt.core.prefs 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/.settings/org.eclipse.jdt.core.prefs 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,5 +1,259 @@
-#Thu Sep 11 11:33:04 BST 2008
+#Fri Sep 26 13:04:28 BST 2008
+eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=3
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=3
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/BasicContext.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/BasicContext.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/BasicContext.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -4,9 +4,9 @@
import java.util.HashMap;
import java.util.Map;
-import javax.webbeans.ComponentInstance;
-import javax.webbeans.Container;
-import javax.webbeans.Context;
+import javax.webbeans.manager.Bean;
+import javax.webbeans.manager.Context;
+import javax.webbeans.manager.Manager;
/**
* Basic implementation of javax.webbeans.Context, backed by a HashMap
@@ -16,17 +16,17 @@
*/
public class BasicContext implements Context
{
- private Map<ComponentInstance<?>, Object> values;
+ private Map<Bean<?>, Object> values;
private Class<? extends Annotation> scopeType;
public BasicContext(Class<? extends Annotation> scopeType)
{
this.scopeType = scopeType;
- values = new HashMap<ComponentInstance<?>,Object>();
+ values = new HashMap<Bean<?>,Object>();
}
@SuppressWarnings("unchecked")
- public <T> T get(Container container, ComponentInstance<T> component, boolean create)
+ public <T> T get(Manager container, Bean<T> component, boolean create)
{
T instance = (T) values.get(component);
if (instance != null)
@@ -53,7 +53,7 @@
}
@SuppressWarnings("unchecked")
- public <T> void remove(Container container, ComponentInstance<T> component)
+ public <T> void remove(Manager container, Bean<T> component)
{
T instance = (T) values.get(component);
@@ -71,11 +71,11 @@
}
@SuppressWarnings("unchecked")
- public void destroy(Container container)
+ public void destroy(Manager container)
{
// TODO this method isn't declared by the interface, but is implied by section 9.1.2 of the spec
- for (ComponentInstance c : values.keySet())
+ for (Bean c : values.keySet())
{
c.destroy(container, values.get(c));
}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/BeanImpl.java (from rev 99, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ComponentInstanceImpl.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/BeanImpl.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/BeanImpl.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,71 @@
+package org.jboss.webbeans;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+import java.util.logging.Logger;
+
+import javax.webbeans.manager.Bean;
+import javax.webbeans.manager.Manager;
+
+import org.jboss.webbeans.model.AbstractComponentModel;
+import org.jboss.webbeans.util.LoggerUtil;
+
+public class BeanImpl<T> extends Bean<T>
+{
+
+public static final String LOGGER_NAME = "componentMetaModel";
+
+ private static Logger log = LoggerUtil.getLogger(LOGGER_NAME);
+
+ private AbstractComponentModel<T, ?> componentMetaModel;
+
+ public BeanImpl(AbstractComponentModel<T, ?> componentMetaModel)
+ {
+ this.componentMetaModel = componentMetaModel;
+ }
+
+ @Override
+ public T create(Manager container)
+ {
+ return componentMetaModel.getConstructor().invoke(container);
+ }
+
+ @Override
+ public void destroy(Manager container, T instance)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public Set<Annotation> getBindingTypes()
+ {
+ return componentMetaModel.getBindingTypes();
+ }
+
+ @Override
+ public Annotation getDeploymentType()
+ {
+ return componentMetaModel.getDeploymentType();
+ }
+
+ @Override
+ public String getName()
+ {
+ return componentMetaModel.getName();
+ }
+
+ @Override
+ public Annotation getScopeType()
+ {
+ return componentMetaModel.getScopeType();
+ }
+
+ @Override
+ public Set<Class> getTypes()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ComponentInstanceImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ComponentInstanceImpl.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ComponentInstanceImpl.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,71 +0,0 @@
-package org.jboss.webbeans;
-
-import java.lang.annotation.Annotation;
-import java.util.Set;
-import java.util.logging.Logger;
-
-import javax.webbeans.ComponentInstance;
-import javax.webbeans.Container;
-
-import org.jboss.webbeans.model.AbstractComponentModel;
-import org.jboss.webbeans.util.LoggerUtil;
-
-public class ComponentInstanceImpl<T> extends ComponentInstance<T>
-{
-
-public static final String LOGGER_NAME = "componentMetaModel";
-
- private static Logger log = LoggerUtil.getLogger(LOGGER_NAME);
-
- private AbstractComponentModel<T, ?> componentMetaModel;
-
- public ComponentInstanceImpl(AbstractComponentModel<T, ?> componentMetaModel)
- {
- this.componentMetaModel = componentMetaModel;
- }
-
- @Override
- public T create(Container container)
- {
- return componentMetaModel.getConstructor().invoke(container);
- }
-
- @Override
- public void destroy(Container container, T instance)
- {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public Set<Annotation> getBindingTypes()
- {
- return componentMetaModel.getBindingTypes();
- }
-
- @Override
- public Annotation getDeploymentType()
- {
- return componentMetaModel.getDeploymentType();
- }
-
- @Override
- public String getName()
- {
- return componentMetaModel.getName();
- }
-
- @Override
- public Annotation getScopeType()
- {
- return componentMetaModel.getScopeType();
- }
-
- @Override
- public Set<Class> getTypes()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ContainerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ContainerImpl.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ContainerImpl.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,171 +0,0 @@
-package org.jboss.webbeans;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.webbeans.ComponentInstance;
-import javax.webbeans.Container;
-import javax.webbeans.Context;
-import javax.webbeans.ContextNotActive;
-import javax.webbeans.Observer;
-import javax.webbeans.Standard;
-import javax.webbeans.TypeLiteral;
-
-import org.jboss.webbeans.bindings.ProductionBinding;
-import org.jboss.webbeans.bindings.StandardBinding;
-import org.jboss.webbeans.ejb.EjbManager;
-import org.jboss.webbeans.event.EventBus;
-
-public class ContainerImpl implements Container
-{
-
- private List<Annotation> enabledDeploymentTypes;
- private ModelManager modelManager;
- private EjbManager ejbLookupManager;
- private EventBus eventBus;
-
-
- private ThreadLocal<Map<Class<Annotation>, Context>> contexts =
- new ThreadLocal<Map<Class<Annotation>, Context>>();
-
- private Set<ComponentInstance> components;
-
- public ContainerImpl(List<Annotation> enabledDeploymentTypes)
- {
- initEnabledDeploymentTypes(enabledDeploymentTypes);
- this.modelManager = new ModelManager();
- this.ejbLookupManager = new EjbManager();
- this.components = new HashSet<ComponentInstance>();
- this.eventBus = new EventBus();
- }
-
- private void initEnabledDeploymentTypes(List<Annotation> enabledDeploymentTypes)
- {
- this.enabledDeploymentTypes = new ArrayList<Annotation>();
- if (enabledDeploymentTypes == null)
- {
- this.enabledDeploymentTypes.add(0, new StandardBinding());
- this.enabledDeploymentTypes.add(1, new ProductionBinding());
- }
- else
- {
- this.enabledDeploymentTypes.addAll(enabledDeploymentTypes);
- if (!this.enabledDeploymentTypes.get(0).annotationType().equals(Standard.class))
- {
- throw new RuntimeException("@Standard must be the lowest precedence deployment type");
- }
- }
- }
-
- public Container addComponent(ComponentInstance component)
- {
- components.add(component);
- return this;
- }
-
- public void addContext(Context context)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void addObserver(Observer observer)
- {
- eventBus.addObserver(observer);
- }
-
- public void fireEvent(Object event, Annotation... bindings)
- {
- // TODO Auto-generated method stub
-
- }
-
- public Context getContext(Class<Annotation> scopeType)
- {
- Context context = contexts.get().get(scopeType);
-
- if (context == null)
- {
- // If context can't be found throw an exception (section 9.4 of spec)
- throw new ContextNotActive();
- }
- else
- {
- return context;
- }
- }
-
- public Object getInstanceByName(String name)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public <T> T getInstanceByType(Class<T> type, Annotation... bindingTypes)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public <T> T getInstanceByType(TypeLiteral<T> type,
- Annotation... bindingTypes)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void removeObserver(Observer observer)
- {
- eventBus.removeObserver(observer);
- }
-
- public Set<ComponentInstance> resolveByName(String name)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public <T> T resolveByType(Class<T> apiType, Annotation... bindingTypes)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public <T> T resolveByType(TypeLiteral<T> apiType,
- Annotation... bindingTypes)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public <T> Set<Method> resolveDisposalMethods(Class<T> apiType, Annotation... bindingTypes)
- {
- return new HashSet<Method>();
- }
-
- public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings)
- {
- return (Set<Observer<T>>) eventBus.getObservers(event, bindings);
- }
-
- public List<Annotation> getEnabledDeploymentTypes()
- {
- return enabledDeploymentTypes;
- }
-
- public ModelManager getModelManager()
- {
- return this.modelManager;
- }
-
- public EjbManager getEjbManager()
- {
- return ejbLookupManager;
- }
-
-}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java (from rev 104, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ContainerImpl.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,171 @@
+package org.jboss.webbeans;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.webbeans.ContextNotActiveException;
+import javax.webbeans.Standard;
+import javax.webbeans.TypeLiteral;
+import javax.webbeans.manager.Bean;
+import javax.webbeans.manager.Context;
+import javax.webbeans.manager.Manager;
+import javax.webbeans.manager.Observer;
+
+import org.jboss.webbeans.bindings.ProductionAnnotationLiteral;
+import org.jboss.webbeans.bindings.StandardAnnotationLiteral;
+import org.jboss.webbeans.ejb.EjbManager;
+import org.jboss.webbeans.event.EventBus;
+
+public class ManagerImpl implements Manager
+{
+
+ private List<Annotation> enabledDeploymentTypes;
+ private ModelManager modelManager;
+ private EjbManager ejbLookupManager;
+ private EventBus eventBus;
+
+
+ private ThreadLocal<Map<Class<Annotation>, Context>> contexts =
+ new ThreadLocal<Map<Class<Annotation>, Context>>();
+
+ private Set<Bean> components;
+
+ public ManagerImpl(List<Annotation> enabledDeploymentTypes)
+ {
+ initEnabledDeploymentTypes(enabledDeploymentTypes);
+ this.modelManager = new ModelManager();
+ this.ejbLookupManager = new EjbManager();
+ this.components = new HashSet<Bean>();
+ this.eventBus = new EventBus();
+ }
+
+ private void initEnabledDeploymentTypes(List<Annotation> enabledDeploymentTypes)
+ {
+ this.enabledDeploymentTypes = new ArrayList<Annotation>();
+ if (enabledDeploymentTypes == null)
+ {
+ this.enabledDeploymentTypes.add(0, new StandardAnnotationLiteral());
+ this.enabledDeploymentTypes.add(1, new ProductionAnnotationLiteral());
+ }
+ else
+ {
+ this.enabledDeploymentTypes.addAll(enabledDeploymentTypes);
+ if (!this.enabledDeploymentTypes.get(0).annotationType().equals(Standard.class))
+ {
+ throw new RuntimeException("@Standard must be the lowest precedence deployment type");
+ }
+ }
+ }
+
+ public Manager addComponent(Bean component)
+ {
+ components.add(component);
+ return this;
+ }
+
+ public void addContext(Context context)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addObserver(Observer observer)
+ {
+ eventBus.addObserver(observer);
+ }
+
+ public void fireEvent(Object event, Annotation... bindings)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Context getContext(Class<Annotation> scopeType)
+ {
+ Context context = contexts.get().get(scopeType);
+
+ if (context == null)
+ {
+ // If context can't be found throw an exception (section 9.4 of spec)
+ throw new ContextNotActiveException();
+ }
+ else
+ {
+ return context;
+ }
+ }
+
+ public Object getInstanceByName(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public <T> T getInstanceByType(Class<T> type, Annotation... bindingTypes)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public <T> T getInstanceByType(TypeLiteral<T> type,
+ Annotation... bindingTypes)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void removeObserver(Observer observer)
+ {
+ eventBus.removeObserver(observer);
+ }
+
+ public Set<Bean> resolveByName(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public <T> T resolveByType(Class<T> apiType, Annotation... bindingTypes)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public <T> T resolveByType(TypeLiteral<T> apiType,
+ Annotation... bindingTypes)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public <T> Set<Method> resolveDisposalMethods(Class<T> apiType, Annotation... bindingTypes)
+ {
+ return new HashSet<Method>();
+ }
+
+ public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings)
+ {
+ return (Set<Observer<T>>) eventBus.getObservers(event, bindings);
+ }
+
+ public List<Annotation> getEnabledDeploymentTypes()
+ {
+ return enabledDeploymentTypes;
+ }
+
+ public ModelManager getModelManager()
+ {
+ return this.modelManager;
+ }
+
+ public EjbManager getEjbManager()
+ {
+ return ejbLookupManager;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ApplicationScopedAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ApplicationScopedBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ApplicationScopedAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ApplicationScopedAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+import javax.webbeans.ApplicationScoped;
+
+public class ApplicationScopedAnnotationLiteral extends AnnotationLiteral<ApplicationScoped> implements ApplicationScoped
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ApplicationScopedAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ApplicationScopedBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ApplicationScopedBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ApplicationScopedBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.bindings;
-
-import javax.webbeans.ApplicationScoped;
-import javax.webbeans.DynamicBinding;
-
-public class ApplicationScopedBinding extends DynamicBinding<ApplicationScoped> implements ApplicationScoped
-{
-
-}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ConversationScopedAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ConversationScopedBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ConversationScopedAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ConversationScopedAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+import javax.webbeans.ConversationScoped;
+
+public class ConversationScopedAnnotationLiteral extends AnnotationLiteral<ConversationScoped> implements ConversationScoped
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ConversationScopedAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ConversationScopedBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ConversationScopedBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ConversationScopedBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.bindings;
-
-import javax.webbeans.ConversationScoped;
-import javax.webbeans.DynamicBinding;
-
-public class ConversationScopedBinding extends DynamicBinding<ConversationScoped> implements ConversationScoped
-{
-
-}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/CurrentAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/CurrentBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/CurrentAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/CurrentAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+import javax.webbeans.Current;
+
+public class CurrentAnnotationLiteral extends AnnotationLiteral<Current> implements Current {}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/CurrentAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/CurrentBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/CurrentBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/CurrentBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.bindings;
-
-import javax.webbeans.Current;
-import javax.webbeans.DynamicBinding;
-
-public class CurrentBinding extends DynamicBinding<Current> implements Current {}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/DependentAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/DependentBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/DependentAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/DependentAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+import javax.webbeans.Dependent;
+
+public class DependentAnnotationLiteral extends AnnotationLiteral<Dependent> implements Dependent
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/DependentAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/DependentBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/DependentBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/DependentBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.bindings;
-
-import javax.webbeans.Dependent;
-import javax.webbeans.DynamicBinding;
-
-public class DependentBinding extends DynamicBinding<Dependent> implements Dependent
-{
-
-}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/NamedAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/NamedBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/NamedAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/NamedAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+import javax.webbeans.Named;
+
+public abstract class NamedAnnotationLiteral extends AnnotationLiteral<Named> implements Named
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/NamedAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/NamedBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/NamedBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/NamedBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.bindings;
-
-import javax.webbeans.DynamicBinding;
-import javax.webbeans.Named;
-
-public abstract class NamedBinding extends DynamicBinding<Named> implements Named
-{
-
-}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ProductionAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ProductionBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ProductionAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ProductionAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+import javax.webbeans.Production;
+
+public class ProductionAnnotationLiteral extends AnnotationLiteral<Production> implements Production
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ProductionAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ProductionBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ProductionBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/ProductionBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.bindings;
-
-import javax.webbeans.DynamicBinding;
-import javax.webbeans.Production;
-
-public class ProductionBinding extends DynamicBinding<Production> implements Production
-{
-
-}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/RequestScopedAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/RequestScopedBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/RequestScopedAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/RequestScopedAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+import javax.webbeans.RequestScoped;
+
+public class RequestScopedAnnotationLiteral extends AnnotationLiteral<RequestScoped> implements RequestScoped
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/RequestScopedAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/RequestScopedBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/RequestScopedBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/RequestScopedBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.bindings;
-
-import javax.webbeans.DynamicBinding;
-import javax.webbeans.RequestScoped;
-
-public class RequestScopedBinding extends DynamicBinding<RequestScoped> implements RequestScoped
-{
-
-}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/StandardAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/StandardBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/StandardAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/StandardAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+import javax.webbeans.Standard;
+
+public class StandardAnnotationLiteral extends AnnotationLiteral<Standard> implements Standard
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/StandardAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/StandardBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/StandardBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bindings/StandardBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.bindings;
-
-import javax.webbeans.DynamicBinding;
-import javax.webbeans.Standard;
-
-public class StandardBinding extends DynamicBinding<Standard> implements Standard
-{
-
-}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/deployment/DeploymentStrategy.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/deployment/DeploymentStrategy.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/deployment/DeploymentStrategy.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -8,12 +8,12 @@
import javassist.bytecode.ClassFile;
-import javax.webbeans.Container;
import javax.webbeans.DeploymentType;
import javax.webbeans.Stereotype;
+import javax.webbeans.manager.Manager;
-import org.jboss.webbeans.ComponentInstanceImpl;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.BeanImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.model.SimpleComponentModel;
@@ -33,11 +33,11 @@
private static final Logger log = LoggerUtil.getLogger("deploymentStrategy");
private ClassLoader classLoader;
- private ContainerImpl container;
+ private ManagerImpl container;
public static String[] DEFAULT_IGNORED_PACKAGES = {"java", "com.sun", "sun", "javasssit"};
- public DeploymentStrategy(ClassLoader classLoader, ContainerImpl container)
+ public DeploymentStrategy(ClassLoader classLoader, ManagerImpl container)
{
this.classLoader = classLoader;
this.container = container;
@@ -141,7 +141,7 @@
SimpleComponentModel componentModel = new SimpleComponentModel(
new SimpleAnnotatedType(componentClass),
new SimpleAnnotatedType(null, new HashMap()), container);
- container.addComponent(new ComponentInstanceImpl(componentModel));
+ container.addComponent(new BeanImpl(componentModel));
log.info("Web Bean: " + componentModel);
}
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,8 +1,8 @@
package org.jboss.webbeans.event;
import javax.transaction.Synchronization;
-import javax.webbeans.Container;
-import javax.webbeans.Observer;
+import javax.webbeans.manager.Manager;
+import javax.webbeans.manager.Observer;
/**
* A synchronization object which will deliver the event to the observer
@@ -13,7 +13,7 @@
*/
public class DeferredEventNotification implements Synchronization
{
- private Container container;
+ private Manager container;
private Observer<Object> observer;
private Object event;
@@ -25,7 +25,7 @@
* @param event The event being fired
*/
@SuppressWarnings("unchecked")
- public DeferredEventNotification(Container container, Object event, Observer observer)
+ public DeferredEventNotification(Manager container, Object event, Observer observer)
{
this.container = container;
this.observer = observer;
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventBus.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventBus.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventBus.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -12,8 +12,8 @@
import javax.transaction.SystemException;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
-import javax.webbeans.Container;
-import javax.webbeans.Observer;
+import javax.webbeans.manager.Manager;
+import javax.webbeans.manager.Observer;
import org.jboss.webbeans.util.JNDI;
@@ -67,7 +67,7 @@
* @throws IllegalStateException
* @throws RollbackException
*/
- public void deferEvent(Container container, Object event, Observer o) throws SystemException, IllegalStateException, RollbackException
+ public void deferEvent(Manager container, Object event, Observer o) throws SystemException, IllegalStateException, RollbackException
{
if (tm != null) {
// Get the current transaction associated with the thread
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventImpl.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventImpl.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -7,7 +7,7 @@
import javax.webbeans.Event;
-import org.jboss.webbeans.ComponentInstanceImpl;
+import org.jboss.webbeans.BeanImpl;
import org.jboss.webbeans.model.EventComponentModel;
/**
@@ -16,7 +16,7 @@
* @author David Allen
*
*/
-public class EventImpl<T> extends ComponentInstanceImpl<T> implements Event<T>
+public class EventImpl<T> extends BeanImpl<T> implements Event<T>
{
private EventComponentModel<T> componentModel;
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -7,8 +7,8 @@
import java.util.List;
import java.util.Set;
-import javax.webbeans.Container;
-import javax.webbeans.Observer;
+import javax.webbeans.manager.Manager;
+import javax.webbeans.manager.Observer;
import org.jboss.webbeans.injectable.Parameter;
import org.jboss.webbeans.model.AbstractComponentModel;
@@ -97,7 +97,7 @@
* @see javax.webbeans.Observer#notify(javax.webbeans.Container,
* java.lang.Object)
*/
- public void notify(Container container, T event)
+ public void notify(Manager container, T event)
{
// Get the most specialized instance of the component
Object instance = container.getInstanceByType(compModel.getType(),
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverMethod.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverMethod.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverMethod.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -3,7 +3,7 @@
import java.lang.reflect.Method;
import java.util.List;
-import javax.webbeans.Container;
+import javax.webbeans.manager.Manager;
import org.jboss.webbeans.injectable.InjectableMethod;
import org.jboss.webbeans.injectable.Parameter;
@@ -31,7 +31,7 @@
* @param instance The component instance to invoke the observer method on
* @param event The event object being fired
*/
- public void invoke(Container container, Object instance, Object event)
+ public void invoke(Manager container, Object instance, Object event)
{
try
{
@@ -52,7 +52,7 @@
* @return an array of objects that serve as arguments for the invocation of the method
*/
@SuppressWarnings("unchecked")
- public Object[] getParameterValues(Container container, Object event)
+ public Object[] getParameterValues(Manager container, Object event)
{
// Let the super class get the parameter values, but substitute the event
// object so that we know for certain it is the correct one.
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/init/Initialization.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/init/Initialization.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/init/Initialization.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -2,7 +2,7 @@
import javax.servlet.ServletContext;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.deployment.DeploymentStrategy;
/**
@@ -26,7 +26,7 @@
public Initialization create()
{
- ContainerImpl container = new ContainerImpl(null);
+ ManagerImpl container = new ManagerImpl(null);
servletContext.setAttribute(WEBBEANS_CONTAINER_KEY, container);
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/ComponentConstructor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/ComponentConstructor.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/ComponentConstructor.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,10 +1,10 @@
package org.jboss.webbeans.injectable;
-import javax.webbeans.Container;
+import javax.webbeans.manager.Manager;
public interface ComponentConstructor<T>
{
- public T invoke(Container container);
+ public T invoke(Manager container);
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Element.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Element.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Element.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -2,7 +2,7 @@
import java.lang.annotation.Annotation;
-import javax.webbeans.Container;
+import javax.webbeans.manager.Manager;
public abstract class Element<T>
{
@@ -30,7 +30,7 @@
return getType() + " with binding types " + getBindingTypes();
}
- public T getValue(Container container)
+ public T getValue(Manager container)
{
return container.getInstanceByType(getType(), getBindingTypes());
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/EnterpriseConstructor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/EnterpriseConstructor.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/EnterpriseConstructor.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,8 +1,8 @@
package org.jboss.webbeans.injectable;
-import javax.webbeans.Container;
+import javax.webbeans.manager.Manager;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.ejb.EjbMetaData;
@@ -16,12 +16,12 @@
this.ejbMetaData = ejbMetaData;
}
- public T invoke(Container container)
+ public T invoke(Manager container)
{
// TODO Hmm, this isn't right
- if (container instanceof ContainerImpl)
+ if (container instanceof ManagerImpl)
{
- ContainerImpl containerImpl = (ContainerImpl) container;
+ ManagerImpl containerImpl = (ManagerImpl) container;
return containerImpl.getEjbManager().lookup(ejbMetaData);
}
else
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/InjectableMethod.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/InjectableMethod.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/InjectableMethod.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,6 +1,6 @@
package org.jboss.webbeans.injectable;
-import javax.webbeans.Container;
+import javax.webbeans.manager.Manager;
// TODO Name this class better
public class InjectableMethod<T> extends Unit<T>
@@ -15,7 +15,7 @@
}
@SuppressWarnings("unchecked")
- public T invoke(Container container, Object instance)
+ public T invoke(Manager container, Object instance)
{
try
{
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/JMSConstructor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/JMSConstructor.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/JMSConstructor.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,6 +1,6 @@
package org.jboss.webbeans.injectable;
-import javax.webbeans.Container;
+import javax.webbeans.manager.Manager;
import org.jboss.webbeans.util.JNDI;
@@ -16,7 +16,7 @@
this.jndiName = jndiName;
}
- public T invoke(Container container)
+ public T invoke(Manager container)
{
return JNDI.lookup(jndiName, type);
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/MethodConstructor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/MethodConstructor.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/MethodConstructor.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -2,7 +2,7 @@
import java.lang.reflect.Method;
-import javax.webbeans.Container;
+import javax.webbeans.manager.Manager;
public class MethodConstructor<T> extends InjectableMethod<T> implements
ComponentConstructor<T>
@@ -13,7 +13,7 @@
super(method);
}
- public T invoke(Container container)
+ public T invoke(Manager container)
{
// TODO Auto-generated method stub
return null;
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Parameter.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Parameter.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Parameter.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -2,12 +2,12 @@
import java.lang.annotation.Annotation;
-import org.jboss.webbeans.bindings.CurrentBinding;
+import org.jboss.webbeans.bindings.CurrentAnnotationLiteral;
public class Parameter<T> extends Element<T>
{
- private static Annotation[] currentBinding = {new CurrentBinding()};
+ private static Annotation[] currentBinding = {new CurrentAnnotationLiteral()};
private Class<? extends T> type;
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/SimpleConstructor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/SimpleConstructor.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/SimpleConstructor.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -3,7 +3,7 @@
import java.lang.reflect.Constructor;
import java.util.logging.Logger;
-import javax.webbeans.Container;
+import javax.webbeans.manager.Manager;
import org.jboss.webbeans.util.LoggerUtil;
@@ -29,7 +29,7 @@
return constructor;
}
- public T invoke(Container container)
+ public T invoke(Manager container)
{
try
{
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Unit.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Unit.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Unit.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -4,7 +4,7 @@
import java.util.ArrayList;
import java.util.List;
-import javax.webbeans.Container;
+import javax.webbeans.manager.Manager;
public abstract class Unit<T>
{
@@ -41,7 +41,7 @@
return injectedParameters;
}
- public Object[] getParameterValues(Container container)
+ public Object[] getParameterValues(Manager container)
{
Object[] parameterValues = new Object[parameters.size()];
for (int i = 0; i < parameterValues.length; i++)
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractClassComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractClassComponentModel.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractClassComponentModel.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -8,7 +8,7 @@
import javax.webbeans.Dependent;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.AnnotatedType;
import org.jboss.webbeans.util.LoggerUtil;
import org.jboss.webbeans.util.Reflections;
@@ -53,7 +53,7 @@
}
@Override
- protected void init(ContainerImpl container)
+ protected void init(ManagerImpl container)
{
super.init(container);
checkRequiredTypesImplemented();
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -13,10 +13,10 @@
import javax.webbeans.Named;
import javax.webbeans.ScopeType;
-import org.jboss.webbeans.ContainerImpl;
-import org.jboss.webbeans.bindings.CurrentBinding;
-import org.jboss.webbeans.bindings.DependentBinding;
-import org.jboss.webbeans.bindings.ProductionBinding;
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.bindings.CurrentAnnotationLiteral;
+import org.jboss.webbeans.bindings.DependentAnnotationLiteral;
+import org.jboss.webbeans.bindings.ProductionAnnotationLiteral;
import org.jboss.webbeans.injectable.ComponentConstructor;
import org.jboss.webbeans.injectable.InjectableMethod;
import org.jboss.webbeans.introspector.AnnotatedItem;
@@ -38,7 +38,7 @@
protected InjectableMethod<?> removeMethod;
private Set<Class> apiTypes;
- protected void init(ContainerImpl container)
+ protected void init(ManagerImpl container)
{
mergedStereotypes = new MergedStereotypesModel<T, E>(getAnnotatedItem(), getXmlAnnotatedItem(), container);
initType();
@@ -94,7 +94,7 @@
if (bindingTypes.size() == 0)
{
log.finest("Adding default @Current binding type");
- bindingTypes.add(new CurrentBinding());
+ bindingTypes.add(new CurrentAnnotationLiteral());
}
else
{
@@ -146,7 +146,7 @@
{
throw new RuntimeException("All stereotypes must specify the same scope OR a scope must be specified on the component");
}
- this.scopeType = new DependentBinding();
+ this.scopeType = new DependentAnnotationLiteral();
log.finest("Using default @Dependent scope");
}
@@ -190,7 +190,7 @@
}
}
- protected void initDeploymentType(ContainerImpl container)
+ protected void initDeploymentType(ManagerImpl container)
{
Set<Annotation> xmlDeploymentTypes = getXmlAnnotatedItem().getAnnotations(DeploymentType.class);
@@ -232,7 +232,7 @@
if (getXmlAnnotatedItem().getDelegate() != null)
{
- this.deploymentType = new ProductionBinding();
+ this.deploymentType = new ProductionAnnotationLiteral();
log.finest("Using default @Production deployment type");
return;
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractEnterpriseComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractEnterpriseComponentModel.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractEnterpriseComponentModel.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -3,7 +3,7 @@
import javax.webbeans.ApplicationScoped;
import javax.webbeans.Dependent;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.ejb.EjbMetaData;
import org.jboss.webbeans.introspector.AnnotatedType;
@@ -21,7 +21,7 @@
}
@Override
- protected void init(ContainerImpl container)
+ protected void init(ManagerImpl container)
{
super.init(container);
ejbMetaData = container.getEjbManager().getEjbMetaData(getType());
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EnterpriseComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EnterpriseComponentModel.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EnterpriseComponentModel.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -4,9 +4,9 @@
import java.util.ArrayList;
import java.util.List;
-import javax.webbeans.Destroys;
+import javax.webbeans.Destructor;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.injectable.ComponentConstructor;
import org.jboss.webbeans.injectable.EnterpriseConstructor;
import org.jboss.webbeans.injectable.InjectableMethod;
@@ -21,14 +21,14 @@
private String location;
public EnterpriseComponentModel(AnnotatedType<T> annotatedItem,
- AnnotatedType<T> xmlAnnotatedItem, ContainerImpl container)
+ AnnotatedType<T> xmlAnnotatedItem, ManagerImpl container)
{
super(annotatedItem, xmlAnnotatedItem);
init(container);
}
@Override
- protected void init(ContainerImpl container)
+ protected void init(ManagerImpl container)
{
super.init(container);
this.constructor = new EnterpriseConstructor<T>(getEjbMetaData());
@@ -57,7 +57,7 @@
}
// TODO loggigng
- protected void initRemoveMethod(ContainerImpl container)
+ protected void initRemoveMethod(ManagerImpl container)
{
if (getEjbMetaData().isStateful())
{
@@ -70,7 +70,7 @@
List<Method> possibleRemoveMethods = new ArrayList<Method>();
for (Method removeMethod : getEjbMetaData().getRemoveMethods())
{
- if (removeMethod.isAnnotationPresent(Destroys.class))
+ if (removeMethod.isAnnotationPresent(Destructor.class))
{
possibleRemoveMethods.add(removeMethod);
}
@@ -95,7 +95,7 @@
}
else
{
- List<Method> destroysMethods = Reflections.getMethods(getType(), Destroys.class);
+ List<Method> destroysMethods = Reflections.getMethods(getType(), Destructor.class);
if (destroysMethods.size() > 0)
{
throw new RuntimeException("Only stateful enterprise bean components can have methods annotated @Destroys; " + getType() + " is not a stateful enterprise bean component");
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EventComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EventComponentModel.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EventComponentModel.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -2,11 +2,11 @@
import java.lang.annotation.Annotation;
-import javax.webbeans.Container;
+import javax.webbeans.manager.Manager;
-import org.jboss.webbeans.ContainerImpl;
-import org.jboss.webbeans.bindings.DependentBinding;
-import org.jboss.webbeans.bindings.StandardBinding;
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.bindings.DependentAnnotationLiteral;
+import org.jboss.webbeans.bindings.StandardAnnotationLiteral;
import org.jboss.webbeans.introspector.AnnotatedType;
/**
@@ -19,9 +19,9 @@
public class EventComponentModel<T> extends SimpleComponentModel<T>
{
- private StandardBinding deploymentType = new StandardBinding();
- private DependentBinding scopeType = new DependentBinding();
- private ContainerImpl container;
+ private StandardAnnotationLiteral deploymentType = new StandardAnnotationLiteral();
+ private DependentAnnotationLiteral scopeType = new DependentAnnotationLiteral();
+ private ManagerImpl container;
/**
* Creates a new component model for an injectable, observable event object.
@@ -31,7 +31,7 @@
* @param xmlAnnotatedItem The injectable variable defined in XML
* @param container The Web Beans container
*/
- public EventComponentModel(AnnotatedType annotatedItem, AnnotatedType xmlAnnotatedItem, ContainerImpl container)
+ public EventComponentModel(AnnotatedType annotatedItem, AnnotatedType xmlAnnotatedItem, ManagerImpl container)
{
super(annotatedItem, xmlAnnotatedItem, container);
// This is needed later for the impl of Event to fire events with the container
@@ -42,7 +42,7 @@
* The implementation of the container used to create this model.
* @return the container
*/
- public Container getContainer()
+ public Manager getContainer()
{
return container;
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/MergedStereotypesModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/MergedStereotypesModel.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/MergedStereotypesModel.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -8,7 +8,7 @@
import javax.webbeans.Stereotype;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.AnnotatedItem;
/**
@@ -25,7 +25,7 @@
private Set<Class<?>> requiredTypes;
private Set<Class<? extends Annotation>> supportedScopes;
- public MergedStereotypesModel(AnnotatedItem<E> annotatedItem, AnnotatedItem<E> xmlAnnotatedItem, ContainerImpl container)
+ public MergedStereotypesModel(AnnotatedItem<E> annotatedItem, AnnotatedItem<E> xmlAnnotatedItem, ManagerImpl container)
{
possibleDeploymentTypes = new HashMap<Class<? extends Annotation>, Annotation>();
possibleScopeTypes = new HashSet<Annotation>();
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ProducerExpressionComponent.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ProducerExpressionComponent.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ProducerExpressionComponent.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -7,7 +7,7 @@
import javax.webbeans.Dependent;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.injectable.ComponentConstructor;
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.introspector.SimpleAnnotatedItem;
@@ -19,7 +19,7 @@
private AnnotatedItem<Method> annotatedItem = new SimpleAnnotatedItem<Method>(new HashMap<Class<? extends Annotation>, Annotation>());
private String location;
- public ProducerExpressionComponent(AnnotatedItem<Method> xmlAnnotatedMethod, ContainerImpl container)
+ public ProducerExpressionComponent(AnnotatedItem<Method> xmlAnnotatedMethod, ManagerImpl container)
{
this.xmlAnnotatedItem = xmlAnnotatedMethod;
init(container);
@@ -38,7 +38,7 @@
}
@Override
- protected void init(ContainerImpl container)
+ protected void init(ManagerImpl container)
{
super.init(container);
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ProducerMethodComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ProducerMethodComponentModel.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/ProducerMethodComponentModel.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -10,7 +10,7 @@
import javax.webbeans.Dependent;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.injectable.ComponentConstructor;
import org.jboss.webbeans.injectable.InjectableMethod;
import org.jboss.webbeans.injectable.MethodConstructor;
@@ -34,14 +34,14 @@
private Type declaredComponentType;
@SuppressWarnings("unchecked")
- public ProducerMethodComponentModel(AnnotatedMethod annotatedMethod, ContainerImpl container)
+ public ProducerMethodComponentModel(AnnotatedMethod annotatedMethod, ManagerImpl container)
{
this.annotatedMethod = annotatedMethod;
init(container);
}
@Override
- protected void init(ContainerImpl container)
+ protected void init(ManagerImpl container)
{
super.init(container);
checkProducerMethod();
@@ -50,7 +50,7 @@
}
@Override
- protected void initDeploymentType(ContainerImpl container)
+ protected void initDeploymentType(ManagerImpl container)
{
super.initDeploymentType(container);
if (getDeploymentType() == null)
@@ -63,7 +63,7 @@
}
}
- protected void initDeclaringComponent(ContainerImpl container)
+ protected void initDeclaringComponent(ManagerImpl container)
{
declaringComponent = (AbstractComponentModel<?, Class<?>>) container.getModelManager().getComponentModel(getAnnotatedItem().getDelegate().getDeclaringClass());
}
@@ -88,7 +88,7 @@
}
@SuppressWarnings("unchecked")
- protected void initRemoveMethod(ContainerImpl container)
+ protected void initRemoveMethod(ManagerImpl container)
{
Set<Method> disposalMethods = container.resolveDisposalMethods(getType(), getBindingTypes().toArray(new Annotation[0]));
if (disposalMethods.size() == 1)
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -4,10 +4,7 @@
import java.util.HashSet;
import java.util.Set;
-import javax.webbeans.BoundTo;
-import javax.webbeans.Destroys;
-
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.injectable.ComponentConstructor;
import org.jboss.webbeans.injectable.EnterpriseConstructor;
import org.jboss.webbeans.injectable.InjectableMethod;
@@ -15,20 +12,41 @@
public class RemoteComponentModel<T> extends AbstractEnterpriseComponentModel<T>
{
+
+ public RemoteComponentModel(AnnotatedType<T> annotatedItem,
+ AnnotatedType<T> xmlAnnotatedItem)
+ {
+ super(annotatedItem, xmlAnnotatedItem);
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public ComponentConstructor<T> getConstructor()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getLocation()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
- private EnterpriseConstructor<T> constructor;
+ /*private EnterpriseConstructor<T> constructor;
private String boundTo;
private String location;
public RemoteComponentModel(AnnotatedType annotatedItem,
- AnnotatedType xmlAnnotatedItem, ContainerImpl container)
+ AnnotatedType xmlAnnotatedItem, ManagerImpl container)
{
super(annotatedItem, xmlAnnotatedItem);
init(container);
}
@Override
- protected void init(ContainerImpl container)
+ protected void init(ManagerImpl container)
{
super.init(container);
// TODO initialize constructor
@@ -113,6 +131,6 @@
location = "type: Remote Enterprise Component; declaring class: " + getType() +";";
}
return location;
- }
+ }*/
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/SimpleComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/SimpleComponentModel.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/SimpleComponentModel.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -7,7 +7,7 @@
import javax.webbeans.BindingType;
import javax.webbeans.Initializer;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.injectable.SimpleConstructor;
import org.jboss.webbeans.introspector.AnnotatedType;
import org.jboss.webbeans.util.LoggerUtil;
@@ -29,14 +29,14 @@
* @param container
*/
@SuppressWarnings("unchecked")
- public SimpleComponentModel(AnnotatedType annotatedItem, AnnotatedType xmlAnnotatedItem, ContainerImpl container)
+ public SimpleComponentModel(AnnotatedType annotatedItem, AnnotatedType xmlAnnotatedItem, ManagerImpl container)
{
super(annotatedItem, xmlAnnotatedItem);
init(container);
}
@Override
- protected void init(ContainerImpl container)
+ protected void init(ManagerImpl container)
{
super.init(container);
initConstructor();
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/WebBeansFilter.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/WebBeansFilter.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/WebBeansFilter.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -8,8 +8,8 @@
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
-import javax.webbeans.Container;
import javax.webbeans.RequestScoped;
+import javax.webbeans.manager.Manager;
import org.jboss.webbeans.BasicContext;
import org.jboss.webbeans.init.Initialization;
@@ -21,11 +21,11 @@
*/
public class WebBeansFilter implements Filter
{
- private Container container;
+ private Manager container;
public void init(FilterConfig filterConfig) throws ServletException
{
- container = (Container) filterConfig.getServletContext().getAttribute(
+ container = (Manager) filterConfig.getServletContext().getAttribute(
Initialization.WEBBEANS_CONTAINER_KEY);
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractModelTest.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractModelTest.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -5,8 +5,8 @@
import java.util.HashMap;
import java.util.List;
-import org.jboss.webbeans.ContainerImpl;
-import org.jboss.webbeans.bindings.StandardBinding;
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.bindings.StandardAnnotationLiteral;
import org.jboss.webbeans.introspector.AnnotatedType;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.model.StereotypeModel;
@@ -16,15 +16,15 @@
import org.jboss.webbeans.test.annotations.MammalStereotype;
import org.jboss.webbeans.test.annotations.RequestScopedAnimalStereotype;
import org.jboss.webbeans.test.annotations.RiverFishStereotype;
-import org.jboss.webbeans.test.bindings.AnotherDeploymentTypeBinding;
-import org.jboss.webbeans.test.bindings.HornedAnimalDeploymentTypeBinding;
+import org.jboss.webbeans.test.bindings.AnotherDeploymentTypeAnnotationLiteral;
+import org.jboss.webbeans.test.bindings.HornedAnimalDeploymentTypeAnnotationLiteral;
import org.jboss.webbeans.test.mock.MockContainerImpl;
import org.testng.annotations.BeforeMethod;
public class AbstractModelTest
{
- protected ContainerImpl container;
+ protected ManagerImpl container;
protected AnnotatedType<?> emptyAnnotatedItem;
@@ -34,15 +34,15 @@
emptyAnnotatedItem = new SimpleAnnotatedType<Object>(null, new HashMap<Class<? extends Annotation>, Annotation>());
List<Annotation> enabledDeploymentTypes = new ArrayList<Annotation>();
- enabledDeploymentTypes.add(new StandardBinding());
- enabledDeploymentTypes.add(new AnotherDeploymentTypeBinding());
- enabledDeploymentTypes.add(new HornedAnimalDeploymentTypeBinding());
+ enabledDeploymentTypes.add(new StandardAnnotationLiteral());
+ enabledDeploymentTypes.add(new AnotherDeploymentTypeAnnotationLiteral());
+ enabledDeploymentTypes.add(new HornedAnimalDeploymentTypeAnnotationLiteral());
container = new MockContainerImpl(enabledDeploymentTypes);
initStereotypes(container);
}
- private void initStereotypes(ContainerImpl container)
+ private void initStereotypes(ManagerImpl container)
{
container.getModelManager().addStereotype(new StereotypeModel<AnimalStereotype>(new SimpleAnnotatedType<AnimalStereotype>(AnimalStereotype.class)));
container.getModelManager().addStereotype(new StereotypeModel<HornedMammalStereotype>(new SimpleAnnotatedType<HornedMammalStereotype>(HornedMammalStereotype.class)));
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BindingTypeTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BindingTypeTest.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BindingTypeTest.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -11,7 +11,7 @@
import org.jboss.webbeans.model.SimpleComponentModel;
import org.jboss.webbeans.test.annotations.Asynchronous;
import org.jboss.webbeans.test.annotations.Synchronous;
-import org.jboss.webbeans.test.bindings.AsynchronousBinding;
+import org.jboss.webbeans.test.bindings.AsynchronousAnnotationLiteral;
import org.jboss.webbeans.test.components.Antelope;
import org.jboss.webbeans.test.components.Cat;
import org.jboss.webbeans.test.components.Order;
@@ -74,7 +74,7 @@
public void testBindingTypesDeclaredInXml()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Asynchronous.class, new AsynchronousBinding());
+ annotations.put(Asynchronous.class, new AsynchronousAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(Antelope.class, annotations);
SimpleComponentModel<Antelope> antelope = new SimpleComponentModel<Antelope>(emptyAnnotatedItem, annotatedItem, container);
@@ -86,7 +86,7 @@
public void testXmlBindingTypeOverridesAndIgnoresJava()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Asynchronous.class, new AsynchronousBinding());
+ annotations.put(Asynchronous.class, new AsynchronousAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(Cat.class, annotations);
SimpleComponentModel<Cat> cat = new SimpleComponentModel<Cat>(new SimpleAnnotatedType(Cat.class), annotatedItem, container);
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -5,7 +5,7 @@
import javax.webbeans.Current;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.injectable.SimpleConstructor;
import org.jboss.webbeans.introspector.AnnotatedType;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
@@ -27,7 +27,7 @@
public class ConstructorModelTest
{
- private ContainerImpl container;
+ private ManagerImpl container;
private AnnotatedType emptyAnnotatedItem;
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ContainerTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ContainerTest.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ContainerTest.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -7,12 +7,12 @@
import javax.webbeans.Production;
import javax.webbeans.Standard;
-import org.jboss.webbeans.ContainerImpl;
-import org.jboss.webbeans.bindings.StandardBinding;
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.bindings.StandardAnnotationLiteral;
import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
import org.jboss.webbeans.test.annotations.HornedAnimalDeploymentType;
-import org.jboss.webbeans.test.bindings.AnotherDeploymentTypeBinding;
-import org.jboss.webbeans.test.bindings.HornedAnimalDeploymentTypeBinding;
+import org.jboss.webbeans.test.bindings.AnotherDeploymentTypeAnnotationLiteral;
+import org.jboss.webbeans.test.bindings.HornedAnimalDeploymentTypeAnnotationLiteral;
import org.jboss.webbeans.test.mock.MockContainerImpl;
import org.testng.annotations.Test;
@@ -22,7 +22,7 @@
@Test
public void testDefaultEnabledDeploymentTypes()
{
- ContainerImpl container = new MockContainerImpl(null);
+ ManagerImpl container = new MockContainerImpl(null);
assert container.getEnabledDeploymentTypes().size() == 2;
assert container.getEnabledDeploymentTypes().get(0).annotationType().equals(Standard.class);
assert container.getEnabledDeploymentTypes().get(1).annotationType().equals(Production.class);
@@ -32,10 +32,10 @@
public void testCustomDeploymentTypes()
{
List<Annotation> enabledDeploymentTypes = new ArrayList<Annotation>();
- enabledDeploymentTypes.add(new StandardBinding());
- enabledDeploymentTypes.add(new AnotherDeploymentTypeBinding());
- enabledDeploymentTypes.add(new HornedAnimalDeploymentTypeBinding());
- ContainerImpl container = new MockContainerImpl(enabledDeploymentTypes);
+ enabledDeploymentTypes.add(new StandardAnnotationLiteral());
+ enabledDeploymentTypes.add(new AnotherDeploymentTypeAnnotationLiteral());
+ enabledDeploymentTypes.add(new HornedAnimalDeploymentTypeAnnotationLiteral());
+ ManagerImpl container = new MockContainerImpl(enabledDeploymentTypes);
assert container.getEnabledDeploymentTypes().size() == 3;
assert container.getEnabledDeploymentTypes().get(0).annotationType().equals(Standard.class);
assert container.getEnabledDeploymentTypes().get(1).annotationType().equals(AnotherDeploymentType.class);
@@ -46,8 +46,8 @@
public void testStandardMustBeDeclared()
{
List<Annotation> enabledDeploymentTypes = new ArrayList<Annotation>();
- enabledDeploymentTypes.add(new AnotherDeploymentTypeBinding());
- enabledDeploymentTypes.add(new HornedAnimalDeploymentTypeBinding());
+ enabledDeploymentTypes.add(new AnotherDeploymentTypeAnnotationLiteral());
+ enabledDeploymentTypes.add(new HornedAnimalDeploymentTypeAnnotationLiteral());
boolean exception = false;
try
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -2,7 +2,7 @@
import java.net.URL;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.deployment.DeploymentStrategy;
import org.jboss.webbeans.scannotation.ClasspathUrlFinder;
import org.testng.annotations.Test;
@@ -14,7 +14,7 @@
public void testDeploymentStrategy()
{
URL[] urls = {ClasspathUrlFinder.findClassBase(DeploymentStrategyTest.class)};
- ContainerImpl container = new ContainerImpl(null);
+ ManagerImpl container = new ManagerImpl(null);
DeploymentStrategy deploymentStrategy = new DeploymentStrategy(Thread.currentThread().getContextClassLoader(), container);
deploymentStrategy.scan(urls, "org.jboss.webbeans.test.annotations.broken", "org.jboss.webbeans.test.bindings.broken", "org.jboss.webbeans.test.components.broken");
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -7,7 +7,7 @@
import javax.webbeans.Current;
import javax.webbeans.Dependent;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.AnnotatedType;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.model.AbstractEnterpriseComponentModel;
@@ -31,7 +31,7 @@
public class EnterpriseComponentModelTest
{
-private ContainerImpl container;
+private ManagerImpl container;
private AnnotatedType emptyAnnotatedItem;
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -9,12 +9,12 @@
import java.util.List;
import java.util.Map;
-import javax.webbeans.Observer;
import javax.webbeans.Observes;
import javax.webbeans.Production;
+import javax.webbeans.manager.Observer;
-import org.jboss.webbeans.ContainerImpl;
-import org.jboss.webbeans.bindings.StandardBinding;
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.bindings.StandardAnnotationLiteral;
import org.jboss.webbeans.event.ObserverImpl;
import org.jboss.webbeans.event.ObserverMethod;
import org.jboss.webbeans.introspector.AnnotatedType;
@@ -26,8 +26,8 @@
import org.jboss.webbeans.test.annotations.FishStereotype;
import org.jboss.webbeans.test.annotations.RequestScopedAnimalStereotype;
import org.jboss.webbeans.test.annotations.RiverFishStereotype;
-import org.jboss.webbeans.test.bindings.AnotherDeploymentTypeBinding;
-import org.jboss.webbeans.test.bindings.AsynchronousBinding;
+import org.jboss.webbeans.test.bindings.AnotherDeploymentTypeAnnotationLiteral;
+import org.jboss.webbeans.test.bindings.AsynchronousAnnotationLiteral;
import org.jboss.webbeans.test.components.Tuna;
import org.jboss.webbeans.test.mock.MockContainerImpl;
import org.jboss.webbeans.util.Reflections;
@@ -42,7 +42,7 @@
*/
public class ObserverTest
{
- private ContainerImpl container;
+ private ManagerImpl container;
public class Event
{
@@ -61,14 +61,14 @@
public void before()
{
List<Annotation> enabledDeploymentTypes = new ArrayList<Annotation>();
- enabledDeploymentTypes.add(new StandardBinding());
- enabledDeploymentTypes.add(new AnotherDeploymentTypeBinding());
+ enabledDeploymentTypes.add(new StandardAnnotationLiteral());
+ enabledDeploymentTypes.add(new AnotherDeploymentTypeAnnotationLiteral());
container = new MockContainerImpl(enabledDeploymentTypes);
initStereotypes(container);
}
- private void initStereotypes(ContainerImpl container)
+ private void initStereotypes(ManagerImpl container)
{
container.getModelManager().addStereotype(new StereotypeModel(new SimpleAnnotatedType(AnimalStereotype.class)));
container.getModelManager().addStereotype(new StereotypeModel(new SimpleAnnotatedType(FishStereotype.class)));
@@ -86,7 +86,7 @@
{
// Create an observer with known binding types
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Asynchronous.class, new AsynchronousBinding());
+ annotations.put(Asynchronous.class, new AsynchronousAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(Tuna.class, annotations);
SimpleComponentModel<Tuna> tuna = new SimpleComponentModel<Tuna>(new SimpleAnnotatedType(Tuna.class), annotatedItem, container);
assert tuna.getDeploymentType().annotationType().equals(Production.class);
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -3,7 +3,7 @@
import java.lang.annotation.Annotation;
import java.util.HashMap;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.AnnotatedType;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.test.mock.MockContainerImpl;
@@ -13,7 +13,7 @@
public class ProducerExpressionComponentModelTest
{
- private ContainerImpl container;
+ private ManagerImpl container;
private AnnotatedType<?> emptyAnnotatedItem;
@BeforeMethod
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -7,7 +7,7 @@
import javax.webbeans.Current;
import javax.webbeans.Dependent;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.AnnotatedType;
import org.jboss.webbeans.introspector.SimpleAnnotatedMethod;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
@@ -33,7 +33,7 @@
public class ProducerMethodComponentModelTest
{
- private ContainerImpl container;
+ private ManagerImpl container;
private AnnotatedType<?> emptyAnnotatedItem;
@BeforeMethod
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -5,7 +5,7 @@
import javax.webbeans.Current;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.introspector.AnnotatedType;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.model.RemoteComponentModel;
@@ -23,7 +23,7 @@
public class RemoteComponentModelTest
{
- private ContainerImpl container;
+ /*private ManagerImpl container;
private AnnotatedType<?> emptyAnnotatedItem;
@BeforeMethod
@@ -107,6 +107,6 @@
public void testStereotypeOnOtherInterface()
{
assert false;
- }
+ }*/
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -9,17 +9,17 @@
import javax.webbeans.Dependent;
import javax.webbeans.RequestScoped;
-import org.jboss.webbeans.bindings.ConversationScopedBinding;
-import org.jboss.webbeans.bindings.RequestScopedBinding;
+import org.jboss.webbeans.bindings.ConversationScopedAnnotationLiteral;
+import org.jboss.webbeans.bindings.RequestScopedAnnotationLiteral;
import org.jboss.webbeans.introspector.AnnotatedType;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.model.SimpleComponentModel;
import org.jboss.webbeans.test.annotations.AnimalStereotype;
import org.jboss.webbeans.test.annotations.FishStereotype;
import org.jboss.webbeans.test.annotations.RiverFishStereotype;
-import org.jboss.webbeans.test.bindings.AnimalStereotypeBinding;
-import org.jboss.webbeans.test.bindings.FishStereotypeBinding;
-import org.jboss.webbeans.test.bindings.RiverFishStereotypeBinding;
+import org.jboss.webbeans.test.bindings.AnimalStereotypeAnnotationLiteral;
+import org.jboss.webbeans.test.bindings.FishStereotypeAnnotationLiteral;
+import org.jboss.webbeans.test.bindings.RiverFishStereotypeAnnotationLiteral;
import org.jboss.webbeans.test.components.Antelope;
import org.jboss.webbeans.test.components.ComponentWithTooManyScopeTypes;
import org.jboss.webbeans.test.components.Haddock;
@@ -83,8 +83,8 @@
try
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(RequestScoped.class, new RequestScopedBinding());
- annotations.put(ConversationScoped.class, new ConversationScopedBinding());
+ annotations.put(RequestScoped.class, new RequestScopedAnnotationLiteral());
+ annotations.put(ConversationScoped.class, new ConversationScopedAnnotationLiteral());
AnnotatedType antelopeAnnotatedItem = new SimpleAnnotatedType(Antelope.class, annotations);
new SimpleComponentModel<Antelope>(emptyAnnotatedItem, antelopeAnnotatedItem, container);
}
@@ -99,7 +99,7 @@
public void testScopeDeclaredInXml()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(RequestScoped.class, new RequestScopedBinding());
+ annotations.put(RequestScoped.class, new RequestScopedAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(Order.class, annotations);
SimpleComponentModel<Order> order = new SimpleComponentModel<Order>(new SimpleAnnotatedType(Order.class), annotatedItem, container);
@@ -120,7 +120,7 @@
public void testScopeDeclaredInXmlOverridesJava()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(ConversationScoped.class, new ConversationScopedBinding());
+ annotations.put(ConversationScoped.class, new ConversationScopedAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
assert trout.getScopeType().annotationType().equals(ConversationScoped.class);
@@ -137,7 +137,7 @@
public void testScopeSpecifiedAndStereotyped()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(FishStereotype.class, new FishStereotypeBinding());
+ annotations.put(FishStereotype.class, new FishStereotypeAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
assert trout.getScopeType().annotationType().equals(RequestScoped.class);
@@ -147,8 +147,8 @@
public void testMutipleIncompatibleScopeStereotypes()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(FishStereotype.class, new FishStereotypeBinding());
- annotations.put(AnimalStereotype.class, new AnimalStereotypeBinding());
+ annotations.put(FishStereotype.class, new FishStereotypeAnnotationLiteral());
+ annotations.put(AnimalStereotype.class, new AnimalStereotypeAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(Haddock.class, annotations);
boolean exception = false;
@@ -167,8 +167,8 @@
public void testMutipleIncompatibleScopeStereotypesWithScopeSpecified()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(FishStereotype.class, new FishStereotypeBinding());
- annotations.put(AnimalStereotype.class, new AnimalStereotypeBinding());
+ annotations.put(FishStereotype.class, new FishStereotypeAnnotationLiteral());
+ annotations.put(AnimalStereotype.class, new AnimalStereotypeAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
@@ -179,8 +179,8 @@
public void testMutipleCompatibleScopeStereotypes()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(FishStereotype.class, new FishStereotypeBinding());
- annotations.put(RiverFishStereotype.class, new RiverFishStereotypeBinding());
+ annotations.put(FishStereotype.class, new FishStereotypeAnnotationLiteral());
+ annotations.put(RiverFishStereotype.class, new RiverFishStereotypeAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(Haddock.class, annotations);
SimpleComponentModel<Haddock> haddock = new SimpleComponentModel<Haddock>(new SimpleAnnotatedType(Haddock.class), annotatedItem, container);
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -15,13 +15,13 @@
import javax.webbeans.Production;
import javax.webbeans.RequestScoped;
-import org.jboss.webbeans.ContainerImpl;
-import org.jboss.webbeans.bindings.ConversationScopedBinding;
-import org.jboss.webbeans.bindings.CurrentBinding;
-import org.jboss.webbeans.bindings.DependentBinding;
-import org.jboss.webbeans.bindings.NamedBinding;
-import org.jboss.webbeans.bindings.RequestScopedBinding;
-import org.jboss.webbeans.bindings.StandardBinding;
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.bindings.ConversationScopedAnnotationLiteral;
+import org.jboss.webbeans.bindings.CurrentAnnotationLiteral;
+import org.jboss.webbeans.bindings.DependentAnnotationLiteral;
+import org.jboss.webbeans.bindings.NamedAnnotationLiteral;
+import org.jboss.webbeans.bindings.RequestScopedAnnotationLiteral;
+import org.jboss.webbeans.bindings.StandardAnnotationLiteral;
import org.jboss.webbeans.introspector.AnnotatedType;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.model.SimpleComponentModel;
@@ -36,14 +36,14 @@
import org.jboss.webbeans.test.annotations.RequestScopedAnimalStereotype;
import org.jboss.webbeans.test.annotations.RiverFishStereotype;
import org.jboss.webbeans.test.annotations.Synchronous;
-import org.jboss.webbeans.test.bindings.AnimalStereotypeBinding;
-import org.jboss.webbeans.test.bindings.AnotherDeploymentTypeBinding;
-import org.jboss.webbeans.test.bindings.AsynchronousBinding;
-import org.jboss.webbeans.test.bindings.FishStereotypeBinding;
-import org.jboss.webbeans.test.bindings.HornedAnimalDeploymentTypeBinding;
-import org.jboss.webbeans.test.bindings.HornedMamalStereotypeBinding;
-import org.jboss.webbeans.test.bindings.RiverFishStereotypeBinding;
-import org.jboss.webbeans.test.bindings.SynchronousBinding;
+import org.jboss.webbeans.test.bindings.AnimalStereotypeAnnotationLiteral;
+import org.jboss.webbeans.test.bindings.AnotherDeploymentTypeAnnotationLiteral;
+import org.jboss.webbeans.test.bindings.AsynchronousAnnotationLiteral;
+import org.jboss.webbeans.test.bindings.FishStereotypeAnnotationLiteral;
+import org.jboss.webbeans.test.bindings.HornedAnimalDeploymentTypeAnnotationLiteral;
+import org.jboss.webbeans.test.bindings.HornedMamalStereotypeAnnotationLiteral;
+import org.jboss.webbeans.test.bindings.RiverFishStereotypeAnnotationLiteral;
+import org.jboss.webbeans.test.bindings.SynchronousAnnotationLiteral;
import org.jboss.webbeans.test.components.Antelope;
import org.jboss.webbeans.test.components.Carp;
import org.jboss.webbeans.test.components.Cat;
@@ -70,7 +70,7 @@
public class SimpleComponentModelTest
{
- private ContainerImpl container;
+ private ManagerImpl container;
private AnnotatedType emptyAnnotatedItem;
@@ -80,15 +80,15 @@
emptyAnnotatedItem = new SimpleAnnotatedType(null, new HashMap<Class<? extends Annotation>, Annotation>());
List<Annotation> enabledDeploymentTypes = new ArrayList<Annotation>();
- enabledDeploymentTypes.add(new StandardBinding());
- enabledDeploymentTypes.add(new AnotherDeploymentTypeBinding());
- enabledDeploymentTypes.add(new HornedAnimalDeploymentTypeBinding());
+ enabledDeploymentTypes.add(new StandardAnnotationLiteral());
+ enabledDeploymentTypes.add(new AnotherDeploymentTypeAnnotationLiteral());
+ enabledDeploymentTypes.add(new HornedAnimalDeploymentTypeAnnotationLiteral());
container = new MockContainerImpl(enabledDeploymentTypes);
initStereotypes(container);
}
- private void initStereotypes(ContainerImpl container)
+ private void initStereotypes(ManagerImpl container)
{
container.getModelManager().addStereotype(new StereotypeModel(new SimpleAnnotatedType(AnimalStereotype.class)));
container.getModelManager().addStereotype(new StereotypeModel(new SimpleAnnotatedType(HornedMammalStereotype.class)));
@@ -121,7 +121,7 @@
public void testXmlDeploymentTypeOverridesJava()
{
Map<Class<? extends Annotation>, Annotation> xmlDefinedDeploymentTypeAnnotations = new HashMap<Class<? extends Annotation>, Annotation>();
- xmlDefinedDeploymentTypeAnnotations.put(AnotherDeploymentType.class, new AnotherDeploymentTypeBinding());
+ xmlDefinedDeploymentTypeAnnotations.put(AnotherDeploymentType.class, new AnotherDeploymentTypeAnnotationLiteral());
AnnotatedType xmlDefinedDeploymentTypeAnnotatedItem = new SimpleAnnotatedType(ComponentWithTooManyDeploymentTypes.class, xmlDefinedDeploymentTypeAnnotations);
SimpleComponentModel<ComponentWithTooManyDeploymentTypes> component = new SimpleComponentModel<ComponentWithTooManyDeploymentTypes>(new SimpleAnnotatedType(ComponentWithTooManyDeploymentTypes.class), xmlDefinedDeploymentTypeAnnotatedItem, container);
@@ -148,7 +148,7 @@
public void testDeploymentTypePrecedenceSelection()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(HornedMammalStereotype.class, new HornedMamalStereotypeBinding());
+ annotations.put(HornedMammalStereotype.class, new HornedMamalStereotypeAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(Moose.class, annotations);
SimpleComponentModel<Moose> moose = new SimpleComponentModel<Moose>(new SimpleAnnotatedType(Moose.class), annotatedItem, container);
@@ -160,7 +160,7 @@
public void testDeploymentTypeSpecifiedAndStereotyped()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(FishStereotype.class, new FishStereotypeBinding());
+ annotations.put(FishStereotype.class, new FishStereotypeAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
assert trout.getScopeType().annotationType().equals(RequestScoped.class);
@@ -184,7 +184,7 @@
public void testDefaultXmlNamed()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Named.class, new NamedBinding()
+ annotations.put(Named.class, new NamedAnnotationLiteral()
{
public String value()
@@ -203,7 +203,7 @@
public void testNonDefaultXmlNamed()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Named.class, new NamedBinding()
+ annotations.put(Named.class, new NamedAnnotationLiteral()
{
public String value()
@@ -239,9 +239,9 @@
public void testStereotypeDeclaredInXmlAndJava()
{
Map<Class<? extends Annotation>, Annotation> orderXmlAnnotations = new HashMap<Class<? extends Annotation>, Annotation>();
- orderXmlAnnotations.put(Current.class, new CurrentBinding());
- orderXmlAnnotations.put(Synchronous.class, new SynchronousBinding());
- orderXmlAnnotations.put(Named.class, new NamedBinding()
+ orderXmlAnnotations.put(Current.class, new CurrentAnnotationLiteral());
+ orderXmlAnnotations.put(Synchronous.class, new SynchronousAnnotationLiteral());
+ orderXmlAnnotations.put(Named.class, new NamedAnnotationLiteral()
{
public String value()
{
@@ -361,7 +361,7 @@
assert exception;
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Dependent.class, new DependentBinding());
+ annotations.put(Dependent.class, new DependentAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(Horse.class, annotations);
try
{
@@ -388,7 +388,7 @@
assert exception;
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Dependent.class, new DependentBinding());
+ annotations.put(Dependent.class, new DependentAnnotationLiteral());
AnnotatedType annotatedItem = new SimpleAnnotatedType(Pig.class, annotations);
try
{
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnimalStereotypeAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnimalStereotypeBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnimalStereotypeAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnimalStereotypeAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.test.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+
+import org.jboss.webbeans.test.annotations.AnimalStereotype;
+
+public class AnimalStereotypeAnnotationLiteral extends AnnotationLiteral<AnimalStereotype> implements AnimalStereotype
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnimalStereotypeAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnimalStereotypeBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnimalStereotypeBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnimalStereotypeBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,10 +0,0 @@
-package org.jboss.webbeans.test.bindings;
-
-import javax.webbeans.DynamicBinding;
-
-import org.jboss.webbeans.test.annotations.AnimalStereotype;
-
-public class AnimalStereotypeBinding extends DynamicBinding<AnimalStereotype> implements AnimalStereotype
-{
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnotherDeploymentTypeAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnotherDeploymentTypeBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnotherDeploymentTypeAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnotherDeploymentTypeAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,10 @@
+/**
+ *
+ */
+package org.jboss.webbeans.test.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+
+import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
+
+public class AnotherDeploymentTypeAnnotationLiteral extends AnnotationLiteral<AnotherDeploymentType> implements AnotherDeploymentType {}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnotherDeploymentTypeAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnotherDeploymentTypeBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnotherDeploymentTypeBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AnotherDeploymentTypeBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,10 +0,0 @@
-/**
- *
- */
-package org.jboss.webbeans.test.bindings;
-
-import javax.webbeans.DynamicBinding;
-
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-
-public class AnotherDeploymentTypeBinding extends DynamicBinding<AnotherDeploymentType> implements AnotherDeploymentType {}
\ No newline at end of file
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AsynchronousAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AsynchronousBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AsynchronousAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AsynchronousAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,11 @@
+/**
+ *
+ */
+package org.jboss.webbeans.test.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+
+import org.jboss.webbeans.test.annotations.Asynchronous;
+
+
+public class AsynchronousAnnotationLiteral extends AnnotationLiteral<Asynchronous> implements Asynchronous {}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AsynchronousAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AsynchronousBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AsynchronousBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/AsynchronousBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,11 +0,0 @@
-/**
- *
- */
-package org.jboss.webbeans.test.bindings;
-
-import javax.webbeans.DynamicBinding;
-
-import org.jboss.webbeans.test.annotations.Asynchronous;
-
-
-public class AsynchronousBinding extends DynamicBinding<Asynchronous> implements Asynchronous {}
\ No newline at end of file
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/FishStereotypeAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/FishStereotypeBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/FishStereotypeAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/FishStereotypeAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.test.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+
+import org.jboss.webbeans.test.annotations.RiverFishStereotype;
+
+public class FishStereotypeAnnotationLiteral extends AnnotationLiteral<RiverFishStereotype> implements RiverFishStereotype
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/FishStereotypeAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/FishStereotypeBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/FishStereotypeBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/FishStereotypeBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,10 +0,0 @@
-package org.jboss.webbeans.test.bindings;
-
-import javax.webbeans.DynamicBinding;
-
-import org.jboss.webbeans.test.annotations.RiverFishStereotype;
-
-public class FishStereotypeBinding extends DynamicBinding<RiverFishStereotype> implements RiverFishStereotype
-{
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedAnimalDeploymentTypeAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedAnimalDeploymentTypeBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedAnimalDeploymentTypeAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedAnimalDeploymentTypeAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,10 @@
+/**
+ *
+ */
+package org.jboss.webbeans.test.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+
+import org.jboss.webbeans.test.annotations.HornedAnimalDeploymentType;
+
+public class HornedAnimalDeploymentTypeAnnotationLiteral extends AnnotationLiteral<HornedAnimalDeploymentType> implements HornedAnimalDeploymentType {}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedAnimalDeploymentTypeAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedAnimalDeploymentTypeBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedAnimalDeploymentTypeBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedAnimalDeploymentTypeBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,10 +0,0 @@
-/**
- *
- */
-package org.jboss.webbeans.test.bindings;
-
-import javax.webbeans.DynamicBinding;
-
-import org.jboss.webbeans.test.annotations.HornedAnimalDeploymentType;
-
-public class HornedAnimalDeploymentTypeBinding extends DynamicBinding<HornedAnimalDeploymentType> implements HornedAnimalDeploymentType {}
\ No newline at end of file
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedMamalStereotypeAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedMamalStereotypeBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedMamalStereotypeAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedMamalStereotypeAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,10 @@
+/**
+ *
+ */
+package org.jboss.webbeans.test.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+
+import org.jboss.webbeans.test.annotations.HornedMammalStereotype;
+
+public class HornedMamalStereotypeAnnotationLiteral extends AnnotationLiteral<HornedMammalStereotype> implements HornedMammalStereotype {}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedMamalStereotypeAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedMamalStereotypeBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedMamalStereotypeBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/HornedMamalStereotypeBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,10 +0,0 @@
-/**
- *
- */
-package org.jboss.webbeans.test.bindings;
-
-import javax.webbeans.DynamicBinding;
-
-import org.jboss.webbeans.test.annotations.HornedMammalStereotype;
-
-public class HornedMamalStereotypeBinding extends DynamicBinding<HornedMammalStereotype> implements HornedMammalStereotype {}
\ No newline at end of file
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/RiverFishStereotypeAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/RiverFishStereotypeBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/RiverFishStereotypeAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/RiverFishStereotypeAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.test.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+
+import org.jboss.webbeans.test.annotations.FishStereotype;
+
+public class RiverFishStereotypeAnnotationLiteral extends AnnotationLiteral<FishStereotype> implements FishStereotype
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/RiverFishStereotypeAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/RiverFishStereotypeBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/RiverFishStereotypeBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/RiverFishStereotypeBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,10 +0,0 @@
-package org.jboss.webbeans.test.bindings;
-
-import javax.webbeans.DynamicBinding;
-
-import org.jboss.webbeans.test.annotations.FishStereotype;
-
-public class RiverFishStereotypeBinding extends DynamicBinding<FishStereotype> implements FishStereotype
-{
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/SynchronousAnnotationLiteral.java (from rev 78, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/SynchronousBinding.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/SynchronousAnnotationLiteral.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/SynchronousAnnotationLiteral.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.test.bindings;
+
+import javax.webbeans.AnnotationLiteral;
+
+import org.jboss.webbeans.test.annotations.Synchronous;
+
+public class SynchronousAnnotationLiteral extends AnnotationLiteral<Synchronous> implements Synchronous
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/SynchronousAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/SynchronousBinding.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/SynchronousBinding.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/SynchronousBinding.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,10 +0,0 @@
-package org.jboss.webbeans.test.bindings;
-
-import javax.webbeans.DynamicBinding;
-
-import org.jboss.webbeans.test.annotations.Synchronous;
-
-public class SynchronousBinding extends DynamicBinding<Synchronous> implements Synchronous
-{
-
-}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Baboon.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Baboon.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Baboon.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,12 +1,11 @@
package org.jboss.webbeans.test.components;
import javax.ejb.Remote;
-import javax.webbeans.BoundTo;
import javax.webbeans.Production;
@Remote
@Production
-@BoundTo("/beans/baboon")
+// TODO @BoundTo("/beans/baboon")
public interface Baboon extends Animal
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Cheetah.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Cheetah.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Cheetah.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,14 +1,14 @@
package org.jboss.webbeans.test.components;
import javax.ejb.Remove;
-import javax.webbeans.Destroys;
+import javax.webbeans.Destructor;
import javax.webbeans.Production;
@Production
public class Cheetah
{
- @Remove @Destroys
+ @Remove @Destructor
public void remove()
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Cougar.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Cougar.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Cougar.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -2,7 +2,7 @@
import javax.ejb.Remove;
import javax.ejb.Stateful;
-import javax.webbeans.Destroys;
+import javax.webbeans.Destructor;
import javax.webbeans.Production;
@Production
@@ -16,13 +16,13 @@
}
- @Remove @Destroys
+ @Remove @Destructor
public void remove1()
{
}
- @Remove @Destroys
+ @Remove @Destructor
public void remove2()
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Elephant.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Elephant.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Elephant.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -2,7 +2,7 @@
import javax.ejb.Remove;
import javax.ejb.Stateful;
-import javax.webbeans.Destroys;
+import javax.webbeans.Destructor;
import javax.webbeans.Production;
@Production
@@ -16,7 +16,7 @@
}
- @Remove @Destroys
+ @Remove @Destructor
public void remove2()
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Orangutan.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Orangutan.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Orangutan.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,19 +1,18 @@
package org.jboss.webbeans.test.components;
import javax.ejb.Remote;
-import javax.webbeans.BoundTo;
-import javax.webbeans.Destroys;
+import javax.webbeans.Destructor;
import javax.webbeans.Named;
import javax.webbeans.Production;
@Remote
@Production
-@BoundTo("/beans/orangutan")
+//TODO @BoundTo("/beans/orangutan")
@Named
public interface Orangutan extends Animal
{
- @Destroys
+ @Destructor
public void removeOrangutan();
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameOrangutan.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameOrangutan.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameOrangutan.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,7 +1,6 @@
package org.jboss.webbeans.test.components;
import javax.ejb.Remote;
-import javax.webbeans.BoundTo;
import javax.webbeans.Named;
import javax.webbeans.Production;
@@ -9,7 +8,7 @@
@Remote
@Production
-@BoundTo("/beans/tame/orangutan")
+// TODO @BoundTo("/beans/tame/orangutan")
@Tame
@Named
public interface TameOrangutan extends Orangutan
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Chimpanzee.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Chimpanzee.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Chimpanzee.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,17 +1,16 @@
package org.jboss.webbeans.test.components.broken;
import javax.ejb.Remote;
-import javax.webbeans.BoundTo;
-import javax.webbeans.Destroys;
+import javax.webbeans.Destructor;
import javax.webbeans.Production;
@Remote
-@BoundTo("/beans/Chimpanzee")
+// TODO @BoundTo("/beans/Chimpanzee")
@Production
public interface Chimpanzee
{
- @Destroys
+ @Destructor
public void remove(String foo);
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Gibbon.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Gibbon.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Gibbon.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -1,20 +1,19 @@
package org.jboss.webbeans.test.components.broken;
import javax.ejb.Remote;
-import javax.webbeans.BoundTo;
-import javax.webbeans.Destroys;
+import javax.webbeans.Destructor;
import javax.webbeans.Production;
@Remote
-@BoundTo("/beans/Chimpanzee")
+// TODO @BoundTo("/beans/Chimpanzee")
@Production
public interface Gibbon
{
- @Destroys
+ @Destructor
public void remove();
- @Destroys
+ @Destructor
public void removeAgain();
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockContainerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockContainerImpl.java 2008-09-26 12:44:21 UTC (rev 110)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockContainerImpl.java 2008-09-28 11:39:24 UTC (rev 111)
@@ -3,9 +3,9 @@
import java.lang.annotation.Annotation;
import java.util.List;
-import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ManagerImpl;
-public class MockContainerImpl extends ContainerImpl
+public class MockContainerImpl extends ManagerImpl
{
public MockContainerImpl(List<Annotation> enabledDeploymentTypes)
16 years, 1 month
[webbeans-commits] Webbeans SVN: r110 - in ri/trunk/webbeans-ri: src/test/java/org/jboss/webbeans/test and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-26 08:44:21 -0400 (Fri, 26 Sep 2008)
New Revision: 110
Added:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/APITypeTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BindingTypeTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java
ri/trunk/webbeans-ri/testng.xml
Log:
Restructure tests and add in placeholders
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/APITypeTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/APITypeTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/APITypeTest.java 2008-09-26 12:44:21 UTC (rev 110)
@@ -0,0 +1,13 @@
+package org.jboss.webbeans.test;
+
+import org.testng.annotations.Test;
+
+public class APITypeTest {
+
+ @Test @SpecAssertion(section="2.2")
+ public void testParameterizedApiType()
+ {
+ assert false;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/APITypeTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractModelTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractModelTest.java 2008-09-26 12:44:21 UTC (rev 110)
@@ -0,0 +1,55 @@
+package org.jboss.webbeans.test;
+
+import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.bindings.StandardBinding;
+import org.jboss.webbeans.introspector.AnnotatedType;
+import org.jboss.webbeans.introspector.SimpleAnnotatedType;
+import org.jboss.webbeans.model.StereotypeModel;
+import org.jboss.webbeans.test.annotations.AnimalStereotype;
+import org.jboss.webbeans.test.annotations.FishStereotype;
+import org.jboss.webbeans.test.annotations.HornedMammalStereotype;
+import org.jboss.webbeans.test.annotations.MammalStereotype;
+import org.jboss.webbeans.test.annotations.RequestScopedAnimalStereotype;
+import org.jboss.webbeans.test.annotations.RiverFishStereotype;
+import org.jboss.webbeans.test.bindings.AnotherDeploymentTypeBinding;
+import org.jboss.webbeans.test.bindings.HornedAnimalDeploymentTypeBinding;
+import org.jboss.webbeans.test.mock.MockContainerImpl;
+import org.testng.annotations.BeforeMethod;
+
+public class AbstractModelTest
+{
+
+ protected ContainerImpl container;
+
+ protected AnnotatedType<?> emptyAnnotatedItem;
+
+ @BeforeMethod
+ public void before()
+ {
+ emptyAnnotatedItem = new SimpleAnnotatedType<Object>(null, new HashMap<Class<? extends Annotation>, Annotation>());
+
+ List<Annotation> enabledDeploymentTypes = new ArrayList<Annotation>();
+ enabledDeploymentTypes.add(new StandardBinding());
+ enabledDeploymentTypes.add(new AnotherDeploymentTypeBinding());
+ enabledDeploymentTypes.add(new HornedAnimalDeploymentTypeBinding());
+ container = new MockContainerImpl(enabledDeploymentTypes);
+
+ initStereotypes(container);
+ }
+
+ private void initStereotypes(ContainerImpl container)
+ {
+ container.getModelManager().addStereotype(new StereotypeModel<AnimalStereotype>(new SimpleAnnotatedType<AnimalStereotype>(AnimalStereotype.class)));
+ container.getModelManager().addStereotype(new StereotypeModel<HornedMammalStereotype>(new SimpleAnnotatedType<HornedMammalStereotype>(HornedMammalStereotype.class)));
+ container.getModelManager().addStereotype(new StereotypeModel<MammalStereotype>(new SimpleAnnotatedType<MammalStereotype>(MammalStereotype.class)));
+ container.getModelManager().addStereotype(new StereotypeModel<FishStereotype>(new SimpleAnnotatedType<FishStereotype>(FishStereotype.class)));
+ container.getModelManager().addStereotype(new StereotypeModel<RiverFishStereotype>(new SimpleAnnotatedType<RiverFishStereotype>(RiverFishStereotype.class)));
+ container.getModelManager().addStereotype(new StereotypeModel<RequestScopedAnimalStereotype>(new SimpleAnnotatedType<RequestScopedAnimalStereotype>(RequestScopedAnimalStereotype.class)));
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractModelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BindingTypeTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BindingTypeTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BindingTypeTest.java 2008-09-26 12:44:21 UTC (rev 110)
@@ -0,0 +1,157 @@
+package org.jboss.webbeans.test;
+
+import java.lang.annotation.Annotation;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.webbeans.Current;
+
+import org.jboss.webbeans.introspector.AnnotatedType;
+import org.jboss.webbeans.introspector.SimpleAnnotatedType;
+import org.jboss.webbeans.model.SimpleComponentModel;
+import org.jboss.webbeans.test.annotations.Asynchronous;
+import org.jboss.webbeans.test.annotations.Synchronous;
+import org.jboss.webbeans.test.bindings.AsynchronousBinding;
+import org.jboss.webbeans.test.components.Antelope;
+import org.jboss.webbeans.test.components.Cat;
+import org.jboss.webbeans.test.components.Order;
+import org.jboss.webbeans.util.Reflections;
+import org.testng.annotations.Test;
+
+public class BindingTypeTest extends AbstractModelTest
+{
+
+ @SuppressWarnings("unchecked")
+ @Test @SpecAssertion(section={"2.3.3", "2.3.1"})
+ public void testDefaultBindingTypeDeclaredInJava()
+ {
+ SimpleComponentModel<Order> order = new SimpleComponentModel<Order>(new SimpleAnnotatedType(Order.class), emptyAnnotatedItem, container);
+ assert order.getBindingTypes().size() == 1;
+ order.getBindingTypes().iterator().next().annotationType().equals(Current.class);
+ }
+
+ @Test(groups="injection") @SpecAssertion(section="2.3.1")
+ public void testDefaultBindingTypeAssumedAtInjectionPoint()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.3.2")
+ public void testBindingTypeHasCorrectTarget()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.3.2")
+ public void testBindingTypeHasCorrectRetention()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.3.2")
+ public void testBindingTypeDeclaresBindingTypeAnnotation()
+ {
+ assert false;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test @SpecAssertion(section="2.3.3")
+ public void testBindingTypesDeclaredInJava()
+ {
+ SimpleComponentModel<Cat> cat = new SimpleComponentModel<Cat>(new SimpleAnnotatedType(Cat.class), emptyAnnotatedItem, container);
+ assert cat.getBindingTypes().size() == 1;
+ assert Reflections.annotationSetMatches(cat.getBindingTypes(), Synchronous.class);
+ }
+
+ @Test @SpecAssertion(section="2.3.3")
+ public void testMultipleBindingTypes()
+ {
+ assert false;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test @SpecAssertion(section="2.3.4")
+ public void testBindingTypesDeclaredInXml()
+ {
+ Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(Asynchronous.class, new AsynchronousBinding());
+ AnnotatedType annotatedItem = new SimpleAnnotatedType(Antelope.class, annotations);
+
+ SimpleComponentModel<Antelope> antelope = new SimpleComponentModel<Antelope>(emptyAnnotatedItem, annotatedItem, container);
+ assert Reflections.annotationSetMatches(antelope.getBindingTypes(), Asynchronous.class);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test @SpecAssertion(section="2.3.4")
+ public void testXmlBindingTypeOverridesAndIgnoresJava()
+ {
+ Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(Asynchronous.class, new AsynchronousBinding());
+ AnnotatedType annotatedItem = new SimpleAnnotatedType(Cat.class, annotations);
+
+ SimpleComponentModel<Cat> cat = new SimpleComponentModel<Cat>(new SimpleAnnotatedType(Cat.class), annotatedItem, container);
+ assert cat.getBindingTypes().size() == 1;
+ assert Reflections.annotationSetMatches(cat.getBindingTypes(), Asynchronous.class);
+ }
+
+ @Test @SpecAssertion(section="2.3.4")
+ public void testNoBindingTypesDeclaredInXml()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section={"2.3.4", "2.3.1"})
+ public void testDefaultBindingTypeDeclaredInXml()
+ {
+ assert false;
+ }
+
+ @Test(groups="injection") @SpecAssertion(section="2.3.5")
+ public void testFieldsWithBindingAnnotationsAreInjected()
+ {
+ assert false;
+ }
+
+ @Test(groups="injection") @SpecAssertion(section="2.3.5")
+ public void testFieldMissingBindingTypeIsNotInjected()
+ {
+ assert false;
+ }
+
+ @Test(groups="injection") @SpecAssertion(section="2.3.5")
+ public void testFieldInjectedFromProducerMethod()
+ {
+ assert false;
+ }
+
+ @Test(groups="injection") @SpecAssertion(section="2.3.5")
+ public void testFieldWithBindingTypeInXml()
+ {
+ assert false;
+ }
+
+ @Test(groups="injection") @SpecAssertion(section="2.3.5")
+ public void testFieldWithBindingTypeInXmlIgnoresAnnotations()
+ {
+ assert false;
+ }
+
+ @Test(groups="injection") @SpecAssertion(section="2.3.6")
+ public void testMethodWithBindingAnnotationsOnParametersAreInjected()
+ {
+ assert false;
+ }
+
+ @Test(groups="injection") @SpecAssertion(section="2.3.6")
+ public void testMethodWithBindingAnnotationsOnParametersDeclaredInXml()
+ {
+ assert false;
+ }
+
+ @Test(groups="injection") @SpecAssertion(section="2.3.6")
+ public void testMethodWithBindingAnnotationsOnParametersDeclaredInXmlIgnoresAnnotations()
+ {
+ assert false;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BindingTypeTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java 2008-09-26 12:44:21 UTC (rev 110)
@@ -0,0 +1,37 @@
+package org.jboss.webbeans.test;
+
+import org.testng.annotations.Test;
+
+/**
+ * This test class should be used for common assertions about Web Beans
+ *
+ * @author Pete Muir
+ *
+ */
+public class CommonWebBeanTest {
+
+ @Test @SpecAssertion(section="2")
+ public void testApiTypesNonEmpty()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2")
+ public void testBindingTypesNonEmpty()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2")
+ public void testHasScopeType()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2")
+ public void testHasDeploymentType()
+ {
+ assert false;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java 2008-09-26 12:44:21 UTC (rev 110)
@@ -0,0 +1,190 @@
+package org.jboss.webbeans.test;
+
+import java.lang.annotation.Annotation;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.webbeans.ApplicationScoped;
+import javax.webbeans.ConversationScoped;
+import javax.webbeans.Dependent;
+import javax.webbeans.RequestScoped;
+
+import org.jboss.webbeans.bindings.ConversationScopedBinding;
+import org.jboss.webbeans.bindings.RequestScopedBinding;
+import org.jboss.webbeans.introspector.AnnotatedType;
+import org.jboss.webbeans.introspector.SimpleAnnotatedType;
+import org.jboss.webbeans.model.SimpleComponentModel;
+import org.jboss.webbeans.test.annotations.AnimalStereotype;
+import org.jboss.webbeans.test.annotations.FishStereotype;
+import org.jboss.webbeans.test.annotations.RiverFishStereotype;
+import org.jboss.webbeans.test.bindings.AnimalStereotypeBinding;
+import org.jboss.webbeans.test.bindings.FishStereotypeBinding;
+import org.jboss.webbeans.test.bindings.RiverFishStereotypeBinding;
+import org.jboss.webbeans.test.components.Antelope;
+import org.jboss.webbeans.test.components.ComponentWithTooManyScopeTypes;
+import org.jboss.webbeans.test.components.Haddock;
+import org.jboss.webbeans.test.components.Order;
+import org.jboss.webbeans.test.components.SeaBass;
+import org.testng.annotations.Test;
+
+public class ScopeTypeTest extends AbstractModelTest
+{
+
+ @Test @SpecAssertion(section="2.4")
+ public void testScopeTypesAreExtensible()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.4.2")
+ public void testScopeTypeHasCorrectTarget()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.4.2")
+ public void testScopeTypeHasCorrectRetention()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.4.2")
+ public void testScopeTypeDeclaresBindingTypeAnnotation()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.4.3")
+ public void testScopeDeclaredInJava()
+ {
+ SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), emptyAnnotatedItem, container);
+ assert trout.getScopeType().annotationType().equals(RequestScoped.class);
+ }
+
+ @Test @SpecAssertion(section="2.4.3")
+ public void testTooManyScopesSpecifiedInJava()
+ {
+ boolean exception = false;
+ try
+ {
+ new SimpleComponentModel<ComponentWithTooManyScopeTypes>(new SimpleAnnotatedType(ComponentWithTooManyScopeTypes.class), emptyAnnotatedItem, container);
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+ }
+
+ @Test @SpecAssertion(section="2.4.3")
+ public void testTooManyScopesSpecifiedInXml()
+ {
+ boolean exception = false;
+ try
+ {
+ Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(RequestScoped.class, new RequestScopedBinding());
+ annotations.put(ConversationScoped.class, new ConversationScopedBinding());
+ AnnotatedType antelopeAnnotatedItem = new SimpleAnnotatedType(Antelope.class, annotations);
+ new SimpleComponentModel<Antelope>(emptyAnnotatedItem, antelopeAnnotatedItem, container);
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+ }
+
+ @Test @SpecAssertion(section="2.4.4")
+ public void testScopeDeclaredInXml()
+ {
+ Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(RequestScoped.class, new RequestScopedBinding());
+ AnnotatedType annotatedItem = new SimpleAnnotatedType(Order.class, annotations);
+
+ SimpleComponentModel<Order> order = new SimpleComponentModel<Order>(new SimpleAnnotatedType(Order.class), annotatedItem, container);
+ assert order.getScopeType().annotationType().equals(RequestScoped.class);
+ }
+
+ @Test @SpecAssertion(section="2.4.4")
+ public void testScopeMissingInXml()
+ {
+ Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
+
+ SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
+ assert trout.getScopeType().annotationType().equals(RequestScoped.class);
+ }
+
+ @Test @SpecAssertion(section="2.4.4")
+ public void testScopeDeclaredInXmlOverridesJava()
+ {
+ Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(ConversationScoped.class, new ConversationScopedBinding());
+ AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
+ SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
+ assert trout.getScopeType().annotationType().equals(ConversationScoped.class);
+ }
+
+ @Test @SpecAssertion(section="2.4.5")
+ public void testDefaultScope()
+ {
+ SimpleComponentModel<Order> order = new SimpleComponentModel<Order>(new SimpleAnnotatedType(Order.class), emptyAnnotatedItem, container);
+ assert order.getScopeType().annotationType().equals(Dependent.class);
+ }
+
+ @Test @SpecAssertion(section={"2.4.5", "2.7.2"})
+ public void testScopeSpecifiedAndStereotyped()
+ {
+ Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(FishStereotype.class, new FishStereotypeBinding());
+ AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
+ SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
+ assert trout.getScopeType().annotationType().equals(RequestScoped.class);
+ }
+
+ @Test @SpecAssertion(section="2.4.5")
+ public void testMutipleIncompatibleScopeStereotypes()
+ {
+ Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(FishStereotype.class, new FishStereotypeBinding());
+ annotations.put(AnimalStereotype.class, new AnimalStereotypeBinding());
+ AnnotatedType annotatedItem = new SimpleAnnotatedType(Haddock.class, annotations);
+
+ boolean exception = false;
+ try
+ {
+ new SimpleComponentModel<Haddock>(new SimpleAnnotatedType(Haddock.class), annotatedItem, container);
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+ }
+
+ @Test @SpecAssertion(section="2.4.5")
+ public void testMutipleIncompatibleScopeStereotypesWithScopeSpecified()
+ {
+ Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(FishStereotype.class, new FishStereotypeBinding());
+ annotations.put(AnimalStereotype.class, new AnimalStereotypeBinding());
+ AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
+
+ SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
+ assert trout.getScopeType().annotationType().equals(RequestScoped.class);
+ }
+
+ @Test @SpecAssertion(section="2.4.5")
+ public void testMutipleCompatibleScopeStereotypes()
+ {
+ Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(FishStereotype.class, new FishStereotypeBinding());
+ annotations.put(RiverFishStereotype.class, new RiverFishStereotypeBinding());
+ AnnotatedType annotatedItem = new SimpleAnnotatedType(Haddock.class, annotations);
+
+ SimpleComponentModel<Haddock> haddock = new SimpleComponentModel<Haddock>(new SimpleAnnotatedType(Haddock.class), annotatedItem, container);
+ assert haddock.getScopeType().annotationType().equals(ApplicationScoped.class);
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java 2008-09-25 21:01:07 UTC (rev 109)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java 2008-09-26 12:44:21 UTC (rev 110)
@@ -98,6 +98,8 @@
container.getModelManager().addStereotype(new StereotypeModel(new SimpleAnnotatedType(RequestScopedAnimalStereotype.class)));
}
+
+
// **** TESTS FOR DEPLOYMENT TYPE **** //
@Test @SpecAssertion(section="2.5.3")
@@ -162,188 +164,12 @@
AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
assert trout.getScopeType().annotationType().equals(RequestScoped.class);
- }
+ }
- // **** TESTS FOR BINDING TYPE **** //
-
- @SuppressWarnings("unchecked")
- @Test @SpecAssertion(section="2.3.5")
- public void testXmlBindingTypeOverridesAndIgnoresJava()
- {
- Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Asynchronous.class, new AsynchronousBinding());
- AnnotatedType annotatedItem = new SimpleAnnotatedType(Cat.class, annotations);
-
- SimpleComponentModel<Cat> cat = new SimpleComponentModel<Cat>(new SimpleAnnotatedType(Cat.class), annotatedItem, container);
- assert cat.getBindingTypes().size() == 1;
- assert Reflections.annotationSetMatches(cat.getBindingTypes(), Asynchronous.class);
- }
-
- @SuppressWarnings("unchecked")
- @Test @SpecAssertion(section="2.3.3")
- public void testBindingTypesDeclaredInJava()
- {
- SimpleComponentModel<Cat> cat = new SimpleComponentModel<Cat>(new SimpleAnnotatedType(Cat.class), emptyAnnotatedItem, container);
- assert cat.getBindingTypes().size() == 1;
- assert Reflections.annotationSetMatches(cat.getBindingTypes(), Synchronous.class);
- }
-
- @SuppressWarnings("unchecked")
- @Test @SpecAssertion(section="2.3.3")
- public void testBindingTypesDeclaredInXml()
- {
- Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Asynchronous.class, new AsynchronousBinding());
- AnnotatedType annotatedItem = new SimpleAnnotatedType(Antelope.class, annotations);
-
- SimpleComponentModel<Antelope> antelope = new SimpleComponentModel<Antelope>(emptyAnnotatedItem, annotatedItem, container);
- assert Reflections.annotationSetMatches(antelope.getBindingTypes(), Asynchronous.class);
- }
-
- @SuppressWarnings("unchecked")
- @Test @SpecAssertion(section={"2.3.3", "2.3.1"})
- public void testDefaultBindingTypeDeclaredInJava()
- {
- SimpleComponentModel<Order> order = new SimpleComponentModel<Order>(new SimpleAnnotatedType(Order.class), emptyAnnotatedItem, container);
- assert order.getBindingTypes().size() == 1;
- order.getBindingTypes().iterator().next().annotationType().equals(Current.class);
- }
-
// **** TESTS FOR SCOPES **** //
- @Test
- public void testScopeDeclaredInJava()
- {
- SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), emptyAnnotatedItem, container);
- assert trout.getScopeType().annotationType().equals(RequestScoped.class);
- }
+
- @Test
- public void testScopeDeclaredInXml()
- {
- Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(RequestScoped.class, new RequestScopedBinding());
- AnnotatedType annotatedItem = new SimpleAnnotatedType(Order.class, annotations);
-
- SimpleComponentModel<Order> order = new SimpleComponentModel<Order>(new SimpleAnnotatedType(Order.class), annotatedItem, container);
- assert order.getScopeType().annotationType().equals(RequestScoped.class);
- }
-
- @Test @SpecAssertion(section="2.4.4")
- public void testScopeDeclaredInXmlOverridesJava()
- {
- Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(ConversationScoped.class, new ConversationScopedBinding());
- AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
- SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
- assert trout.getScopeType().annotationType().equals(ConversationScoped.class);
- }
-
- @Test @SpecAssertion(section="2.4.4")
- public void testScopeMissingInXml()
- {
- Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
-
- SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
- assert trout.getScopeType().annotationType().equals(RequestScoped.class);
- }
-
- @Test @SpecAssertion(section="2.4.5")
- public void testDefaultScope()
- {
- SimpleComponentModel<Order> order = new SimpleComponentModel<Order>(new SimpleAnnotatedType(Order.class), emptyAnnotatedItem, container);
- assert order.getScopeType().annotationType().equals(Dependent.class);
- }
-
- @Test @SpecAssertion(section="2.4.3")
- public void testTooManyScopesSpecifiedInJava()
- {
- boolean exception = false;
- try
- {
- new SimpleComponentModel<ComponentWithTooManyScopeTypes>(new SimpleAnnotatedType(ComponentWithTooManyScopeTypes.class), emptyAnnotatedItem, container);
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
- }
-
- @Test @SpecAssertion(section={"2.4.4", "2.4.3"})
- public void testTooManyScopesSpecifiedInXml()
- {
- boolean exception = false;
- try
- {
- Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(RequestScoped.class, new RequestScopedBinding());
- annotations.put(ConversationScoped.class, new ConversationScopedBinding());
- AnnotatedType antelopeAnnotatedItem = new SimpleAnnotatedType(Antelope.class, annotations);
- new SimpleComponentModel<Antelope>(emptyAnnotatedItem, antelopeAnnotatedItem, container);
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
- }
-
- @Test @SpecAssertion(section={"2.4.5", "2.7.2"})
- public void testScopeSpecifiedAndStereotyped()
- {
- Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(FishStereotype.class, new FishStereotypeBinding());
- AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
- SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
- assert trout.getScopeType().annotationType().equals(RequestScoped.class);
- }
-
- @Test @SpecAssertion(section="2.4.5")
- public void testMutipleIncompatibleScopeStereotypes()
- {
- Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(FishStereotype.class, new FishStereotypeBinding());
- annotations.put(AnimalStereotype.class, new AnimalStereotypeBinding());
- AnnotatedType annotatedItem = new SimpleAnnotatedType(Haddock.class, annotations);
-
- boolean exception = false;
- try
- {
- new SimpleComponentModel<Haddock>(new SimpleAnnotatedType(Haddock.class), annotatedItem, container);
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
- }
-
- @Test @SpecAssertion(section="2.4.5")
- public void testMutipleIncompatibleScopeStereotypesWithScopeSpecified()
- {
- Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(FishStereotype.class, new FishStereotypeBinding());
- annotations.put(AnimalStereotype.class, new AnimalStereotypeBinding());
- AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
-
- SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
- assert trout.getScopeType().annotationType().equals(RequestScoped.class);
- }
-
- @Test @SpecAssertion(section="2.4.5")
- public void testMutipleCompatibleScopeStereotypes()
- {
- Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(FishStereotype.class, new FishStereotypeBinding());
- annotations.put(RiverFishStereotype.class, new RiverFishStereotypeBinding());
- AnnotatedType annotatedItem = new SimpleAnnotatedType(Haddock.class, annotations);
-
- SimpleComponentModel<Haddock> haddock = new SimpleComponentModel<Haddock>(new SimpleAnnotatedType(Haddock.class), annotatedItem, container);
- assert haddock.getScopeType().annotationType().equals(ApplicationScoped.class);
- }
-
// **** TESTS FOR COMPONENT NAME **** /
@Test @SpecAssertion(section="2.6.1")
Modified: ri/trunk/webbeans-ri/testng.xml
===================================================================
--- ri/trunk/webbeans-ri/testng.xml 2008-09-25 21:01:07 UTC (rev 109)
+++ ri/trunk/webbeans-ri/testng.xml 2008-09-26 12:44:21 UTC (rev 110)
@@ -2,84 +2,22 @@
<suite name="WebBeans RI" verbose="1">
- <test name="Reflection Support">
- <classes>
- <class name="org.jboss.webbeans.test.ClassAnnotatedItemTest" />
- <class name="org.jboss.webbeans.test.ConstructorModelTest" />
- </classes>
- </test>
-
- <test name="Deployment">
+ <test name="Web Beans RI">
<groups>
<run>
<exclude name="specialization" />
<exclude name="componentLifecycle" />
<exclude name="deployment" />
- </run>
- </groups>
- <classes>
- <class name="org.jboss.webbeans.test.ComponentDeploymentTest" />
- <class name="org.jboss.webbeans.test.DeploymentStrategyTest" />
- </classes>
- </test>
-
- <test name="Component Model">
- <groups>
- <run>
<exclude name="disposalMethod" />
<exclude name="producerExpression" />
<exclude name="remoteComponentInXml" />
- </run>
- </groups>
- <classes>
- <class name="org.jboss.webbeans.test.SimpleComponentModelTest" />
- <class name="org.jboss.webbeans.test.EnterpriseComponentModelTest" />
- <class name="org.jboss.webbeans.test.ProducerExpressionComponentModelTest" />
- <class name="org.jboss.webbeans.test.ProducerMethodComponentModelTest" />
- <class name="org.jboss.webbeans.test.RemoteComponentModelTest" />
- <class name="org.jboss.webbeans.test.StereotypeModelTest" />
- </classes>
- </test>
-
- <test name="Component Lifecycle">
- <groups>
- <run>
- <exclude name="componentLifecycle" />
- <exclude name="specialization" />
- <exclude name="disposalMethod" />
- </run>
- </groups>
- <classes>
- <class name="org.jboss.webbeans.test.SimpleComponentLifecycleTest" />
- <class name="org.jboss.webbeans.test.EnterpriseComponentLifecycleTest" />
- <class name="org.jboss.webbeans.test.ProducerMethodComponentLifecycleTest" />
- <class name="org.jboss.webbeans.test.ProducerExpressionComponentLifecycleTest" />
- <class name="org.jboss.webbeans.test.RemoteComponentLifecycleTest" />
- </classes>
- </test>
-
- <test name="Container">
- <classes>
- <class name="org.jboss.webbeans.test.ContainerTest" />
- </classes>
- </test>
-
- <test name="EJB">
- <classes>
- <class name="org.jboss.webbeans.test.EjbMetaDataTest" />
- </classes>
- </test>
-
- <test name="Event Bus">
- <groups>
- <run>
<exclude name="eventbus" />
+ <exclude name="injection" />
</run>
</groups>
- <classes>
- <class name="org.jboss.webbeans.test.DeferredEventNotificationTest" />
- <class name="org.jboss.webbeans.test.ObserverTest" />
- </classes>
+ <packages>
+ <package name="org.jboss.webbeans.test"></package>
+ </packages>
</test>
</suite>
\ No newline at end of file
16 years, 2 months
[webbeans-commits] Webbeans SVN: r109 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-25 17:01:07 -0400 (Thu, 25 Sep 2008)
New Revision: 109
Added:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecVersion.java
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecAssertion.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeModelTest.java
Log:
Start to update to newer spec
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java 2008-09-18 17:18:31 UTC (rev 108)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java 2008-09-25 21:01:07 UTC (rev 109)
@@ -2,6 +2,7 @@
import org.testng.annotations.Test;
+@SpecVersion("20080605")
public class ComponentDeploymentTest
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java 2008-09-18 17:18:31 UTC (rev 108)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java 2008-09-25 21:01:07 UTC (rev 109)
@@ -23,6 +23,7 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+@SpecVersion("20080925")
public class ConstructorModelTest
{
@@ -158,4 +159,10 @@
}
+ @Test @SpecAssertion(section="2.7.2")
+ public void testStereotypeOnConstructor()
+ {
+ assert false;
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java 2008-09-18 17:18:31 UTC (rev 108)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java 2008-09-25 21:01:07 UTC (rev 109)
@@ -42,6 +42,12 @@
container = new MockContainerImpl(null);
}
+ @Test @SpecAssertion(section="2.7.2")
+ public void testSingleStereotype()
+ {
+ assert false;
+ }
+
@SuppressWarnings("unchecked")
@Test
public void testStateless()
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java 2008-09-18 17:18:31 UTC (rev 108)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java 2008-09-25 21:01:07 UTC (rev 109)
@@ -216,4 +216,15 @@
assert false;
}
+ @Test @SpecAssertion(section="2.7.2")
+ public void testSingleStereotype()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.7.2")
+ public void testStereotypeOnNonProducerMethod()
+ {
+ assert false;
+ }
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java 2008-09-18 17:18:31 UTC (rev 108)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java 2008-09-25 21:01:07 UTC (rev 109)
@@ -33,6 +33,12 @@
container = new MockContainerImpl(null);
}
+ @Test @SpecAssertion(section="2.7.2")
+ public void testSingleStereotype()
+ {
+ assert false;
+ }
+
@Test @SpecAssertion(section="3.5")
public void testApiTypes() throws SecurityException, NoSuchMethodException
{
@@ -97,4 +103,10 @@
assert orangutanModel.getRemoveMethod().getMethod().getName().equals("removeOrangutan");
}
+ @Test @SpecAssertion(section="2.7.2")
+ public void testStereotypeOnOtherInterface()
+ {
+ assert false;
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java 2008-09-18 17:18:31 UTC (rev 108)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java 2008-09-25 21:01:07 UTC (rev 109)
@@ -66,6 +66,7 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+@SpecVersion("20080925")
public class SimpleComponentModelTest
{
@@ -99,7 +100,7 @@
// **** TESTS FOR DEPLOYMENT TYPE **** //
- @Test
+ @Test @SpecAssertion(section="2.5.3")
public void testTooManyDeploymentTypes()
{
boolean exception = false;
@@ -114,7 +115,7 @@
assert exception;
}
- @Test
+ @Test @SpecAssertion(section="2.5.4")
public void testXmlDeploymentTypeOverridesJava()
{
Map<Class<? extends Annotation>, Annotation> xmlDefinedDeploymentTypeAnnotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -125,7 +126,7 @@
assert component.getDeploymentType().annotationType().equals(AnotherDeploymentType.class);
}
- @Test
+ @Test @SpecAssertion(section="2.5.5")
public void testXmlDefaultDeploymentType()
{
AnnotatedType antelopeAnnotatedItem = new SimpleAnnotatedType(Antelope.class, new HashMap<Class<? extends Annotation>, Annotation>());
@@ -133,15 +134,15 @@
assert antelope.getDeploymentType().annotationType().equals(Production.class);
}
- @Test
- public void testXmlIgnoresJavaDeploymentType()
+ @Test @SpecAssertion(section="2.5.4")
+ public void testXmlRespectsJavaDeploymentType()
{
AnnotatedType annotatedItem = new SimpleAnnotatedType(Tuna.class, new HashMap<Class<? extends Annotation>, Annotation>());
SimpleComponentModel<Tuna> tuna = new SimpleComponentModel<Tuna>(new SimpleAnnotatedType(Tuna.class), annotatedItem, container);
- assert tuna.getDeploymentType().annotationType().equals(Production.class);
+ assert tuna.getDeploymentType().annotationType().equals(AnotherDeploymentType.class);
}
- @Test
+ @Test @SpecAssertion(section="2.5.7")
public void testDeploymentTypePrecedenceSelection()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -153,11 +154,21 @@
}
+ @Test @SpecAssertion(section="2.7.2")
+ public void testDeploymentTypeSpecifiedAndStereotyped()
+ {
+ Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(FishStereotype.class, new FishStereotypeBinding());
+ AnnotatedType annotatedItem = new SimpleAnnotatedType(SeaBass.class, annotations);
+ SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), annotatedItem, container);
+ assert trout.getScopeType().annotationType().equals(RequestScoped.class);
+ }
+
// **** TESTS FOR BINDING TYPE **** //
@SuppressWarnings("unchecked")
- @Test
- public void testXmlBindingTypeOverridesJava()
+ @Test @SpecAssertion(section="2.3.5")
+ public void testXmlBindingTypeOverridesAndIgnoresJava()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
annotations.put(Asynchronous.class, new AsynchronousBinding());
@@ -169,7 +180,7 @@
}
@SuppressWarnings("unchecked")
- @Test
+ @Test @SpecAssertion(section="2.3.3")
public void testBindingTypesDeclaredInJava()
{
SimpleComponentModel<Cat> cat = new SimpleComponentModel<Cat>(new SimpleAnnotatedType(Cat.class), emptyAnnotatedItem, container);
@@ -178,7 +189,7 @@
}
@SuppressWarnings("unchecked")
- @Test
+ @Test @SpecAssertion(section="2.3.3")
public void testBindingTypesDeclaredInXml()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -190,8 +201,8 @@
}
@SuppressWarnings("unchecked")
- @Test
- public void testDefaultBindingType()
+ @Test @SpecAssertion(section={"2.3.3", "2.3.1"})
+ public void testDefaultBindingTypeDeclaredInJava()
{
SimpleComponentModel<Order> order = new SimpleComponentModel<Order>(new SimpleAnnotatedType(Order.class), emptyAnnotatedItem, container);
assert order.getBindingTypes().size() == 1;
@@ -218,7 +229,7 @@
assert order.getScopeType().annotationType().equals(RequestScoped.class);
}
- @Test
+ @Test @SpecAssertion(section="2.4.4")
public void testScopeDeclaredInXmlOverridesJava()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -228,7 +239,7 @@
assert trout.getScopeType().annotationType().equals(ConversationScoped.class);
}
- @Test
+ @Test @SpecAssertion(section="2.4.4")
public void testScopeMissingInXml()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -238,15 +249,15 @@
assert trout.getScopeType().annotationType().equals(RequestScoped.class);
}
- @Test
- public void testNoScopeSpecified()
+ @Test @SpecAssertion(section="2.4.5")
+ public void testDefaultScope()
{
SimpleComponentModel<Order> order = new SimpleComponentModel<Order>(new SimpleAnnotatedType(Order.class), emptyAnnotatedItem, container);
assert order.getScopeType().annotationType().equals(Dependent.class);
}
- @Test
- public void testTooManyScopesSpecified()
+ @Test @SpecAssertion(section="2.4.3")
+ public void testTooManyScopesSpecifiedInJava()
{
boolean exception = false;
try
@@ -260,7 +271,7 @@
assert exception;
}
- @Test
+ @Test @SpecAssertion(section={"2.4.4", "2.4.3"})
public void testTooManyScopesSpecifiedInXml()
{
boolean exception = false;
@@ -279,7 +290,7 @@
assert exception;
}
- @Test
+ @Test @SpecAssertion(section={"2.4.5", "2.7.2"})
public void testScopeSpecifiedAndStereotyped()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -289,7 +300,7 @@
assert trout.getScopeType().annotationType().equals(RequestScoped.class);
}
- @Test
+ @Test @SpecAssertion(section="2.4.5")
public void testMutipleIncompatibleScopeStereotypes()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -309,7 +320,7 @@
assert exception;
}
- @Test
+ @Test @SpecAssertion(section="2.4.5")
public void testMutipleIncompatibleScopeStereotypesWithScopeSpecified()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -321,7 +332,7 @@
assert trout.getScopeType().annotationType().equals(RequestScoped.class);
}
- @Test
+ @Test @SpecAssertion(section="2.4.5")
public void testMutipleCompatibleScopeStereotypes()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -335,16 +346,16 @@
// **** TESTS FOR COMPONENT NAME **** /
- @Test
- public void testNamed()
+ @Test @SpecAssertion(section="2.6.1")
+ public void testDefaultNamed()
{
SimpleComponentModel<Haddock> haddock = new SimpleComponentModel<Haddock>(new SimpleAnnotatedType(Haddock.class), emptyAnnotatedItem, container);
assert haddock.getName() != null;
assert haddock.getName().equals("haddock");
}
- @Test
- public void testXmlNamed()
+ @Test @SpecAssertion(section="2.6.2")
+ public void testDefaultXmlNamed()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
annotations.put(Named.class, new NamedBinding()
@@ -362,7 +373,7 @@
assert trout.getName().equals("seaBass");
}
- @Test
+ @Test @SpecAssertion(section="2.6.2")
public void testNonDefaultXmlNamed()
{
Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -380,14 +391,14 @@
assert trout.getName().equals("aTrout");
}
- @Test
+ @Test @SpecAssertion(section="2.6.4")
public void testNotNamed()
{
SimpleComponentModel<SeaBass> trout = new SimpleComponentModel<SeaBass>(new SimpleAnnotatedType(SeaBass.class), emptyAnnotatedItem, container);
assert trout.getName() == null;
}
- @Test
+ @Test @SpecAssertion(section="2.6.1")
public void testNonDefaultNamed()
{
SimpleComponentModel<Moose> moose = new SimpleComponentModel<Moose>(new SimpleAnnotatedType(Moose.class), emptyAnnotatedItem, container);
@@ -398,7 +409,7 @@
// **** TESTS FOR STEREOTYPES **** //
@SuppressWarnings("unchecked")
- @Test
+ @Test @SpecAssertion(section="2.7.3")
public void testStereotypeDeclaredInXmlAndJava()
{
Map<Class<? extends Annotation>, Annotation> orderXmlAnnotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -421,7 +432,7 @@
assert order.getScopeType().annotationType().equals(Dependent.class);
}
- @Test
+ @Test @SpecAssertion(section="2.7.2")
public void testSingleStereotype()
{
SimpleComponentModel<Gorilla> gorilla = new SimpleComponentModel<Gorilla>(new SimpleAnnotatedType(Gorilla.class), emptyAnnotatedItem, container);
@@ -431,7 +442,7 @@
assert gorilla.getScopeType().annotationType().equals(RequestScoped.class);
}
- @Test
+ @Test @SpecAssertion(section="2.7.4")
public void testRequiredTypeIsImplemented()
{
try
@@ -445,23 +456,13 @@
}
- @Test
+ @Test(expectedExceptions=Exception.class) @SpecAssertion(section="2.7.4")
public void testRequiredTypeIsNotImplemented()
{
- boolean exception = false;
- try
- {
- new SimpleComponentModel<Chair>(new SimpleAnnotatedType(Chair.class), emptyAnnotatedItem, container);
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
-
+ new SimpleComponentModel<Chair>(new SimpleAnnotatedType(Chair.class), emptyAnnotatedItem, container);
}
- @Test
+ @Test @SpecAssertion(section="2.7.4")
public void testScopeIsSupported()
{
try
@@ -470,28 +471,23 @@
}
catch (Exception e)
{
- e.printStackTrace();
assert false;
}
}
- @Test
+ @Test(expectedExceptions=Exception.class) @SpecAssertion(section="2.7.4")
public void testScopeIsNotSupported()
{
- boolean exception = false;
- try
- {
- new SimpleComponentModel<Carp>(new SimpleAnnotatedType(Carp.class), emptyAnnotatedItem, container);
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
-
+ new SimpleComponentModel<Carp>(new SimpleAnnotatedType(Carp.class), emptyAnnotatedItem, container);
}
+ @Test @SpecAssertion(section="2.7.2")
+ public void testMultipleStereotypes()
+ {
+ assert false;
+ }
+
//*** COMPONENT CLASS CHECKS ****//
@Test
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecAssertion.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecAssertion.java 2008-09-18 17:18:31 UTC (rev 108)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecAssertion.java 2008-09-25 21:01:07 UTC (rev 109)
@@ -1,13 +1,15 @@
package org.jboss.webbeans.test;
+import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
+@Documented
public @interface SpecAssertion
{
- public String section();
+ public String[] section();
public String note() default "";
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecVersion.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecVersion.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecVersion.java 2008-09-25 21:01:07 UTC (rev 109)
@@ -0,0 +1,13 @@
+package org.jboss.webbeans.test;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+@Documented
+(a)Target(ElementType.TYPE)
+public @interface SpecVersion {
+
+ String value();
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecVersion.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeModelTest.java 2008-09-18 17:18:31 UTC (rev 108)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeModelTest.java 2008-09-25 21:01:07 UTC (rev 109)
@@ -2,7 +2,6 @@
import java.util.Arrays;
-import javax.webbeans.Component;
import javax.webbeans.Model;
import javax.webbeans.Production;
import javax.webbeans.RequestScoped;
@@ -11,6 +10,7 @@
import org.jboss.webbeans.model.StereotypeModel;
import org.jboss.webbeans.test.annotations.AnimalOrderStereotype;
import org.jboss.webbeans.test.annotations.AnimalStereotype;
+import org.jboss.webbeans.test.annotations.HornedMammalStereotype;
import org.jboss.webbeans.test.annotations.RequestScopedAnimalStereotype;
import org.jboss.webbeans.test.annotations.broken.StereotypeWithBindingTypes;
import org.jboss.webbeans.test.annotations.broken.StereotypeWithNonEmptyNamed;
@@ -20,26 +20,32 @@
import org.jboss.webbeans.test.components.Order;
import org.testng.annotations.Test;
+@SpecVersion("20080925")
public class StereotypeModelTest
{
+
+ @Test @SpecAssertion(section="2.7.1")
+ public void testHasCorrectTarget()
+ {
+ assert false;
+ }
- @Test
- public void testComponentStereotype()
+ @Test @SpecAssertion(section="2.7.1")
+ public void testHasCorrectRetention()
{
- StereotypeModel componentStereotype = new StereotypeModel(new SimpleAnnotatedType(Component.class));
-
- assert Production.class.equals(componentStereotype.getDefaultDeploymentType().annotationType());
- assert componentStereotype.getDefaultScopeType() == null;
- assert componentStereotype.getInterceptorBindings().size() == 0;
- assert componentStereotype.getRequiredTypes().size() == 0;
- assert componentStereotype.getSupportedScopes().size() == 0;
- assert !componentStereotype.isComponentNameDefaulted();
+ assert false;
}
- @Test
+ @Test @SpecAssertion(section="2.7.1")
+ public void testHasStereotypeAnnotation()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.7.5")
public void testModelStereotype()
{
- StereotypeModel modelStereotype = new StereotypeModel(new SimpleAnnotatedType(Model.class));
+ StereotypeModel<Model> modelStereotype = new StereotypeModel<Model>(new SimpleAnnotatedType<Model>(Model.class));
assert Production.class.equals(modelStereotype.getDefaultDeploymentType().annotationType());
assert RequestScoped.class.equals(modelStereotype.getDefaultScopeType().annotationType());
assert modelStereotype.isComponentNameDefaulted();
@@ -51,7 +57,7 @@
@Test
public void testAnimalStereotype()
{
- StereotypeModel animalStereotype = new StereotypeModel(new SimpleAnnotatedType(AnimalStereotype.class));
+ StereotypeModel<AnimalStereotype> animalStereotype = new StereotypeModel<AnimalStereotype>(new SimpleAnnotatedType<AnimalStereotype>(AnimalStereotype.class));
assert animalStereotype.getDefaultScopeType().annotationType().equals(RequestScoped.class);
assert animalStereotype.getInterceptorBindings().size() == 0;
assert animalStereotype.getRequiredTypes().size() == 1;
@@ -64,7 +70,7 @@
@Test
public void testAnimalOrderStereotype()
{
- StereotypeModel animalStereotype = new StereotypeModel(new SimpleAnnotatedType(AnimalOrderStereotype.class));
+ StereotypeModel<AnimalOrderStereotype> animalStereotype = new StereotypeModel<AnimalOrderStereotype>(new SimpleAnnotatedType<AnimalOrderStereotype>(AnimalOrderStereotype.class));
assert animalStereotype.getDefaultScopeType() == null;
assert animalStereotype.getInterceptorBindings().size() == 0;
assert animalStereotype.getRequiredTypes().size() == 2;
@@ -78,7 +84,7 @@
@Test
public void testRequestScopedAnimalStereotype()
{
- StereotypeModel animalStereotype = new StereotypeModel(new SimpleAnnotatedType(RequestScopedAnimalStereotype.class));
+ StereotypeModel<RequestScopedAnimalStereotype> animalStereotype = new StereotypeModel<RequestScopedAnimalStereotype>(new SimpleAnnotatedType<RequestScopedAnimalStereotype>(RequestScopedAnimalStereotype.class));
assert animalStereotype.getDefaultScopeType() == null;
assert animalStereotype.getInterceptorBindings().size() == 0;
assert animalStereotype.getRequiredTypes().size() == 1;
@@ -89,64 +95,55 @@
assert animalStereotype.getDefaultDeploymentType() == null;
}
- @Test
+ @Test @SpecAssertion(section="2.7.1")
+ public void testStereotypeWithScopeType()
+ {
+ StereotypeModel<AnimalStereotype> animalStereotype = new StereotypeModel<AnimalStereotype>(new SimpleAnnotatedType<AnimalStereotype>(AnimalStereotype.class));
+ assert animalStereotype.getDefaultScopeType().annotationType().equals(RequestScoped.class);
+ }
+
+ @Test @SpecAssertion(section="2.7.1")
+ public void testStereotypeWithoutScopeType()
+ {
+ StereotypeModel<HornedMammalStereotype> animalStereotype = new StereotypeModel<HornedMammalStereotype>(new SimpleAnnotatedType<HornedMammalStereotype>(HornedMammalStereotype.class));
+ assert animalStereotype.getDefaultScopeType().annotationType() == null;
+ }
+
+ @Test @SpecAssertion(section="2.7.1")
+ public void testStereotypeWithoutInterceptors()
+ {
+ StereotypeModel<AnimalStereotype> animalStereotype = new StereotypeModel<AnimalStereotype>(new SimpleAnnotatedType<AnimalStereotype>(AnimalStereotype.class));
+ assert animalStereotype.getInterceptorBindings().size() == 0;
+ }
+
+ @Test @SpecAssertion(section="2.7.1")
+ public void testStereotypeWithInterceptors()
+ {
+ assert false;
+ }
+
+ @Test(expectedExceptions=RuntimeException.class) @SpecAssertion(section="2.7.1")
public void testStereotypeWithTooManyScopeTypes()
{
- boolean exception = false;
- try
- {
- new StereotypeModel(new SimpleAnnotatedType(StereotypeWithTooManyScopeTypes.class));
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
+ new StereotypeModel<StereotypeWithTooManyScopeTypes>(new SimpleAnnotatedType<StereotypeWithTooManyScopeTypes>(StereotypeWithTooManyScopeTypes.class));
}
- @Test
+ @Test(expectedExceptions=RuntimeException.class) @SpecAssertion(section="2.7.1")
public void testStereotypeWithTooManyDeploymentTypes()
{
- boolean exception = false;
- try
- {
- new StereotypeModel(new SimpleAnnotatedType(StereotypeWithTooManyDeploymentTypes.class));
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
+ new StereotypeModel<StereotypeWithTooManyDeploymentTypes>(new SimpleAnnotatedType<StereotypeWithTooManyDeploymentTypes>(StereotypeWithTooManyDeploymentTypes.class));
}
- @Test
+ @Test(expectedExceptions=RuntimeException.class) @SpecAssertion(section="2.7.1")
public void testStereotypeWithNonEmptyNamed()
{
- boolean exception = false;
- try
- {
- new StereotypeModel(new SimpleAnnotatedType(StereotypeWithNonEmptyNamed.class));
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
+ new StereotypeModel<StereotypeWithNonEmptyNamed>(new SimpleAnnotatedType<StereotypeWithNonEmptyNamed>(StereotypeWithNonEmptyNamed.class));
}
- @Test
+ @Test(expectedExceptions=RuntimeException.class) @SpecAssertion(section="2.7.1")
public void testStereotypeWithBindingTypes()
{
- boolean exception = false;
- try
- {
- new StereotypeModel(new SimpleAnnotatedType(StereotypeWithBindingTypes.class));
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
+ new StereotypeModel<StereotypeWithBindingTypes>(new SimpleAnnotatedType<StereotypeWithBindingTypes>(StereotypeWithBindingTypes.class));
}
}
16 years, 2 months
[webbeans-commits] Webbeans SVN: r106 - in ri/trunk/webbeans-ri: src/main/java/org/jboss/webbeans/model and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-11 10:38:32 -0400 (Thu, 11 Sep 2008)
New Revision: 106
Added:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Orangutan.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameOrangutan.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Chimpanzee.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Gibbon.java
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameApe.java
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractEnterpriseComponentModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EnterpriseComponentModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentLifecycleTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java
ri/trunk/webbeans-ri/testng.xml
Log:
More tests for remote components
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractEnterpriseComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractEnterpriseComponentModel.java 2008-09-11 12:46:52 UTC (rev 105)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractEnterpriseComponentModel.java 2008-09-11 14:38:32 UTC (rev 106)
@@ -1,18 +1,11 @@
package org.jboss.webbeans.model;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
import javax.webbeans.ApplicationScoped;
import javax.webbeans.Dependent;
-import javax.webbeans.Destroys;
import org.jboss.webbeans.ContainerImpl;
import org.jboss.webbeans.ejb.EjbMetaData;
-import org.jboss.webbeans.injectable.InjectableMethod;
import org.jboss.webbeans.introspector.AnnotatedType;
-import org.jboss.webbeans.util.Reflections;
public abstract class AbstractEnterpriseComponentModel<T> extends
AbstractClassComponentModel<T>
@@ -32,7 +25,6 @@
{
super.init(container);
ejbMetaData = container.getEjbManager().getEjbMetaData(getType());
- initRemoveMethod(container);
checkEnterpriseScopeAllowed();
}
@@ -56,52 +48,5 @@
throw new RuntimeException("Scope " + getScopeType() + " is not allowed on singleton enterpise bean components for " + getType() + ". Only @Dependent or @ApplicationScoped is allowed on singleton enterprise bean components");
}
}
-
- // TODO loggigng
- protected void initRemoveMethod(ContainerImpl container)
- {
- if (getEjbMetaData().isStateful())
- {
- if (getEjbMetaData().getRemoveMethods().size() == 1)
- {
- super.removeMethod = new InjectableMethod<Object>(getEjbMetaData().getRemoveMethods().get(0));
- }
- else if (getEjbMetaData().getRemoveMethods().size() > 1)
- {
- List<Method> possibleRemoveMethods = new ArrayList<Method>();
- for (Method removeMethod : getEjbMetaData().getRemoveMethods())
- {
- if (removeMethod.isAnnotationPresent(Destroys.class))
- {
- possibleRemoveMethods.add(removeMethod);
- }
- }
- if (possibleRemoveMethods.size() == 1)
- {
- super.removeMethod = new InjectableMethod<Object>(possibleRemoveMethods.get(0));
- }
- else if (possibleRemoveMethods.size() > 1)
- {
- throw new RuntimeException("Multiple remove methods are annotated @Destroys for " + getType());
- }
- else if (possibleRemoveMethods.size() == 0)
- {
- throw new RuntimeException("Multiple remove methods are declared, and none are annotated @Destroys for " + getType());
- }
- }
- else if (getEjbMetaData().getRemoveMethods().size() == 0)
- {
- throw new RuntimeException("Stateful enterprise bean component has no remove methods declared for " + getType());
- }
- }
- else
- {
- List<Method> destroysMethods = Reflections.getMethods(getType(), Destroys.class);
- if (destroysMethods.size() > 0)
- {
- throw new RuntimeException("Only stateful enterprise bean components can have methods annotated @Destroys; " + getType() + " is not a stateful enterprise bean component");
- }
- }
- }
}
\ No newline at end of file
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EnterpriseComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EnterpriseComponentModel.java 2008-09-11 12:46:52 UTC (rev 105)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EnterpriseComponentModel.java 2008-09-11 14:38:32 UTC (rev 106)
@@ -1,9 +1,17 @@
package org.jboss.webbeans.model;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.webbeans.Destroys;
+
import org.jboss.webbeans.ContainerImpl;
import org.jboss.webbeans.injectable.ComponentConstructor;
import org.jboss.webbeans.injectable.EnterpriseConstructor;
+import org.jboss.webbeans.injectable.InjectableMethod;
import org.jboss.webbeans.introspector.AnnotatedType;
+import org.jboss.webbeans.util.Reflections;
public class EnterpriseComponentModel<T> extends AbstractEnterpriseComponentModel<T>
{
@@ -24,6 +32,7 @@
{
super.init(container);
this.constructor = new EnterpriseConstructor<T>(getEjbMetaData());
+ initRemoveMethod(container);
}
public ComponentConstructor<T> getConstructor()
@@ -46,5 +55,52 @@
}
return location;
}
+
+// TODO loggigng
+ protected void initRemoveMethod(ContainerImpl container)
+ {
+ if (getEjbMetaData().isStateful())
+ {
+ if (getEjbMetaData().getRemoveMethods().size() == 1)
+ {
+ super.removeMethod = new InjectableMethod<Object>(getEjbMetaData().getRemoveMethods().get(0));
+ }
+ else if (getEjbMetaData().getRemoveMethods().size() > 1)
+ {
+ List<Method> possibleRemoveMethods = new ArrayList<Method>();
+ for (Method removeMethod : getEjbMetaData().getRemoveMethods())
+ {
+ if (removeMethod.isAnnotationPresent(Destroys.class))
+ {
+ possibleRemoveMethods.add(removeMethod);
+ }
+ }
+ if (possibleRemoveMethods.size() == 1)
+ {
+ super.removeMethod = new InjectableMethod<Object>(possibleRemoveMethods.get(0));
+ }
+ else if (possibleRemoveMethods.size() > 1)
+ {
+ throw new RuntimeException("Multiple remove methods are annotated @Destroys for " + getType());
+ }
+ else if (possibleRemoveMethods.size() == 0)
+ {
+ throw new RuntimeException("Multiple remove methods are declared, and none are annotated @Destroys for " + getType());
+ }
+ }
+ else if (getEjbMetaData().getRemoveMethods().size() == 0)
+ {
+ throw new RuntimeException("Stateful enterprise bean component has no remove methods declared for " + getType());
+ }
+ }
+ else
+ {
+ List<Method> destroysMethods = Reflections.getMethods(getType(), Destroys.class);
+ if (destroysMethods.size() > 0)
+ {
+ throw new RuntimeException("Only stateful enterprise bean components can have methods annotated @Destroys; " + getType() + " is not a stateful enterprise bean component");
+ }
+ }
+ }
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java 2008-09-11 12:46:52 UTC (rev 105)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java 2008-09-11 14:38:32 UTC (rev 106)
@@ -1,10 +1,16 @@
package org.jboss.webbeans.model;
+import java.lang.reflect.Method;
+import java.util.HashSet;
+import java.util.Set;
+
import javax.webbeans.BoundTo;
+import javax.webbeans.Destroys;
import org.jboss.webbeans.ContainerImpl;
import org.jboss.webbeans.injectable.ComponentConstructor;
import org.jboss.webbeans.injectable.EnterpriseConstructor;
+import org.jboss.webbeans.injectable.InjectableMethod;
import org.jboss.webbeans.introspector.AnnotatedType;
public class RemoteComponentModel<T> extends AbstractEnterpriseComponentModel<T>
@@ -27,8 +33,39 @@
super.init(container);
// TODO initialize constructor
initBoundTo();
+ initRemoveMethod();
}
+ protected void initRemoveMethod()
+ {
+ Set<Method> destroyMethods = new HashSet<Method>();
+ for (Method method : getAnnotatedItem().getDelegate().getMethods())
+ {
+ if (method.isAnnotationPresent(Destroys.class))
+ {
+ destroyMethods.add(method);
+ }
+ }
+ if (destroyMethods.size() == 1)
+ {
+ Method destroyMethod = destroyMethods.iterator().next();
+ if (destroyMethod.getParameterTypes().length > 0)
+ {
+ throw new RuntimeException(getLocation() + " The method annotated @Destroys cannot take any parameters");
+ }
+ else
+ {
+ removeMethod = new InjectableMethod(destroyMethod);
+ }
+ }
+ else if (destroyMethods.size() > 1)
+ {
+ // TODO Enumerate the destroy methods
+ throw new RuntimeException(getLocation() + " There can only be a maximum of one method declared @Destorys");
+ }
+
+ }
+
@Override
protected void checkComponentImplementation()
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentLifecycleTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentLifecycleTest.java 2008-09-11 12:46:52 UTC (rev 105)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentLifecycleTest.java 2008-09-11 14:38:32 UTC (rev 106)
@@ -5,18 +5,11 @@
public class RemoteComponentLifecycleTest
{
- @Test(groups="componentLifecycle") @SpecAssertion(section="3.2.3")
- public void testInjectonOfParametersIntoRemoveMethod()
+ @Test(groups="componentLifecycle") @SpecAssertion(section="3.5.3")
+ public void testRemoveMethodCalledCausesContainerToRemoveInstance()
{
- // TODO Placeholder
assert false;
}
- @Test(groups="specialization") @SpecAssertion(section="3.2.3")
- public void testSpecializedComponentAlwaysUsed()
- {
- // TODO Placeholder
- assert false;
- }
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java 2008-09-11 12:46:52 UTC (rev 105)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java 2008-09-11 14:38:32 UTC (rev 106)
@@ -12,7 +12,10 @@
import org.jboss.webbeans.test.annotations.Tame;
import org.jboss.webbeans.test.components.Animal;
import org.jboss.webbeans.test.components.Baboon;
-import org.jboss.webbeans.test.components.TameApe;
+import org.jboss.webbeans.test.components.Orangutan;
+import org.jboss.webbeans.test.components.TameOrangutan;
+import org.jboss.webbeans.test.components.broken.Chimpanzee;
+import org.jboss.webbeans.test.components.broken.Gibbon;
import org.jboss.webbeans.test.mock.MockContainerImpl;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -41,8 +44,8 @@
@Test @SpecAssertion(section="3.5.4")
public void testDefaultName() throws SecurityException, NoSuchMethodException
{
- RemoteComponentModel<TameApe> tameApeModel = new RemoteComponentModel<TameApe>(new SimpleAnnotatedType<TameApe>(TameApe.class), emptyAnnotatedItem, container);
- assert tameApeModel.getName().equals("tameApe");
+ RemoteComponentModel<TameOrangutan> tameApeModel = new RemoteComponentModel<TameOrangutan>(new SimpleAnnotatedType<TameOrangutan>(TameOrangutan.class), emptyAnnotatedItem, container);
+ assert tameApeModel.getName().equals("tameOrangutan");
}
@Test @SpecAssertion(section="3.5.1")
@@ -56,9 +59,9 @@
@Test
public void testBindingType() throws SecurityException, NoSuchMethodException
{
- RemoteComponentModel<TameApe> tameApeModel = new RemoteComponentModel<TameApe>(new SimpleAnnotatedType<TameApe>(TameApe.class), emptyAnnotatedItem, container);
- assert tameApeModel.getBindingTypes().size() == 1;
- assert tameApeModel.getBindingTypes().iterator().next().annotationType().equals(Tame.class);
+ RemoteComponentModel<TameOrangutan> tameOrangutanModel = new RemoteComponentModel<TameOrangutan>(new SimpleAnnotatedType<TameOrangutan>(TameOrangutan.class), emptyAnnotatedItem, container);
+ assert tameOrangutanModel.getBindingTypes().size() == 1;
+ assert tameOrangutanModel.getBindingTypes().iterator().next().annotationType().equals(Tame.class);
}
@Test(groups="remoteComponentInXml") @SpecAssertion(section="3.5.2")
@@ -67,4 +70,31 @@
assert false;
}
+ @Test @SpecAssertion(section="3.5.3")
+ public void testSFSBMustHaveRemoveMethod()
+ {
+ // TODO How do we check this?
+ }
+
+ @Test(expectedExceptions=RuntimeException.class) @SpecAssertion(section="3.5.3")
+ public void testRemoveMethodCannotHaveParameters()
+ {
+ RemoteComponentModel<Chimpanzee> chimpanzeeModel = new RemoteComponentModel<Chimpanzee>(new SimpleAnnotatedType<Chimpanzee>(Chimpanzee.class), emptyAnnotatedItem, container);
+ }
+
+ @Test(expectedExceptions=RuntimeException.class) @SpecAssertion(section="3.5.3")
+ public void testCannotHaveMultipleRemoveMethods()
+ {
+ RemoteComponentModel<Gibbon> gibbonModel = new RemoteComponentModel<Gibbon>(new SimpleAnnotatedType<Gibbon>(Gibbon.class), emptyAnnotatedItem, container);
+ }
+
+ @Test @SpecAssertion(section="3.5.3")
+ public void testRemoveMethod()
+ {
+ RemoteComponentModel<TameOrangutan> tameOrangutanModel = new RemoteComponentModel<TameOrangutan>(new SimpleAnnotatedType<TameOrangutan>(TameOrangutan.class), emptyAnnotatedItem, container);
+ assert tameOrangutanModel.getRemoveMethod().getMethod().getName().equals("removeOrangutan");
+ RemoteComponentModel<Orangutan> orangutanModel = new RemoteComponentModel<Orangutan>(new SimpleAnnotatedType<Orangutan>(Orangutan.class), emptyAnnotatedItem, container);
+ assert orangutanModel.getRemoveMethod().getMethod().getName().equals("removeOrangutan");
+ }
+
}
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Orangutan.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Orangutan.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Orangutan.java 2008-09-11 14:38:32 UTC (rev 106)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.test.components;
+
+import javax.ejb.Remote;
+import javax.webbeans.BoundTo;
+import javax.webbeans.Destroys;
+import javax.webbeans.Named;
+import javax.webbeans.Production;
+
+@Remote
+@Production
+@BoundTo("/beans/orangutan")
+@Named
+public interface Orangutan extends Animal
+{
+
+ @Destroys
+ public void removeOrangutan();
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/Orangutan.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameApe.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameApe.java 2008-09-11 12:46:52 UTC (rev 105)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameApe.java 2008-09-11 14:38:32 UTC (rev 106)
@@ -1,18 +0,0 @@
-package org.jboss.webbeans.test.components;
-
-import javax.ejb.Remote;
-import javax.webbeans.BoundTo;
-import javax.webbeans.Named;
-import javax.webbeans.Production;
-
-import org.jboss.webbeans.test.annotations.Tame;
-
-@Remote
-@Production
-@BoundTo("/beans/ape")
-@Tame
-@Named
-public interface TameApe extends Animal
-{
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameOrangutan.java (from rev 99, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameApe.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameOrangutan.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameOrangutan.java 2008-09-11 14:38:32 UTC (rev 106)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.test.components;
+
+import javax.ejb.Remote;
+import javax.webbeans.BoundTo;
+import javax.webbeans.Named;
+import javax.webbeans.Production;
+
+import org.jboss.webbeans.test.annotations.Tame;
+
+@Remote
+@Production
+@BoundTo("/beans/tame/orangutan")
+@Tame
+@Named
+public interface TameOrangutan extends Orangutan
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/TameOrangutan.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Chimpanzee.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Chimpanzee.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Chimpanzee.java 2008-09-11 14:38:32 UTC (rev 106)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.test.components.broken;
+
+import javax.ejb.Remote;
+import javax.webbeans.BoundTo;
+import javax.webbeans.Destroys;
+import javax.webbeans.Production;
+
+@Remote
+@BoundTo("/beans/Chimpanzee")
+@Production
+public interface Chimpanzee
+{
+
+ @Destroys
+ public void remove(String foo);
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Chimpanzee.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Gibbon.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Gibbon.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Gibbon.java 2008-09-11 14:38:32 UTC (rev 106)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.test.components.broken;
+
+import javax.ejb.Remote;
+import javax.webbeans.BoundTo;
+import javax.webbeans.Destroys;
+import javax.webbeans.Production;
+
+@Remote
+@BoundTo("/beans/Chimpanzee")
+@Production
+public interface Gibbon
+{
+
+ @Destroys
+ public void remove();
+
+ @Destroys
+ public void removeAgain();
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/components/broken/Gibbon.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/testng.xml
===================================================================
--- ri/trunk/webbeans-ri/testng.xml 2008-09-11 12:46:52 UTC (rev 105)
+++ ri/trunk/webbeans-ri/testng.xml 2008-09-11 14:38:32 UTC (rev 106)
@@ -54,6 +54,7 @@
<class name="org.jboss.webbeans.test.EnterpriseComponentLifecycleTest" />
<class name="org.jboss.webbeans.test.ProducerMethodComponentLifecycleTest" />
<class name="org.jboss.webbeans.test.ProducerExpressionComponentLifecycleTest" />
+ <class name="org.jboss.webbeans.test.RemoteComponentLifecycleTest" />
</classes>
</test>
16 years, 2 months
[webbeans-commits] Webbeans SVN: r105 - in ri/trunk/webbeans-ri: src/test/java/org/jboss/webbeans/test and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-11 08:46:52 -0400 (Thu, 11 Sep 2008)
New Revision: 105
Added:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentLifecycleTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentLifecycleTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentLifecycleTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentLifecycleTest.java
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentLifecycleTest.java
ri/trunk/webbeans-ri/testng.xml
Log:
Add placeholders for Chapter 3 (section 1 - section 4)
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java 2008-09-11 11:24:52 UTC (rev 104)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java 2008-09-11 12:46:52 UTC (rev 105)
@@ -34,6 +34,74 @@
assert false;
}
+ @Test(groups="specialization") @SpecAssertion(section="3.2.4")
+ public void testOnlySpecializedEnterpriseComponentDeployed()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+ @Test(groups="specialization") @SpecAssertion(section="3.2.4")
+ public void testSpecializedEnterpriseComponentExtends()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+ @Test(groups="specialization") @SpecAssertion(section="3.2.4")
+ public void testSpecializedEnterpriseComponentHasSameBindingAnnotations()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.2.4")
+ public void testSpecializedEnterpriseComponentHasSameName()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.2.4")
+ public void testSpecializedEnterpriseComponentAllLocalInterfaces()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.2.4")
+ public void testSpecializedEnterpriseComponentSupportsBeanClassLocalView()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.3.3")
+ public void testOnlySpecializedProducerMethodComponentDeployed()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.3.3")
+ public void testSpecializedProducerMethodComponentDirectlyOverrides()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.3.3")
+ public void testSpecializedProducerMethodComponentHasSameBindingAnnotations()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.3.3")
+ public void testSpecializedProducerMethodComponentHasSameName()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java 2008-09-11 11:24:52 UTC (rev 104)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java 2008-09-11 12:46:52 UTC (rev 105)
@@ -10,7 +10,7 @@
public class DeploymentStrategyTest
{
- @Test
+ @Test(groups="deployment")
public void testDeploymentStrategy()
{
URL[] urls = {ClasspathUrlFinder.findClassBase(DeploymentStrategyTest.class)};
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentLifecycleTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentLifecycleTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentLifecycleTest.java 2008-09-11 12:46:52 UTC (rev 105)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test;
+
+import org.testng.annotations.Test;
+
+public class EnterpriseComponentLifecycleTest
+{
+
+ @Test(groups="componentLifecycle") @SpecAssertion(section="3.2.3")
+ public void testInjectonOfParametersIntoRemoveMethod()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.2.4")
+ public void testSpecializedComponentAlwaysUsed()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentLifecycleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentLifecycleTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentLifecycleTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentLifecycleTest.java 2008-09-11 12:46:52 UTC (rev 105)
@@ -0,0 +1,29 @@
+package org.jboss.webbeans.test;
+
+import org.testng.annotations.Test;
+
+public class ProducerExpressionComponentLifecycleTest
+{
+
+ @Test(groups={"componentLifecycle", "producerExpression"}) @SpecAssertion(section="3.4")
+ public void testNonDependentProducerExpressionThatReturnsNull()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups={"componentLifecycle", "producerExpression"}) @SpecAssertion(section="3.4")
+ public void testDependentProducerExpressionThatReturnsNull()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups={"componentLifecycle", "producerExpression"}) @SpecAssertion(section="3.4")
+ public void testProducerExpressionHasValidRuntimeApiType()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentLifecycleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java 2008-09-11 11:24:52 UTC (rev 104)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java 2008-09-11 12:46:52 UTC (rev 105)
@@ -23,10 +23,29 @@
container = new MockContainerImpl(null);
}
- @Test
+ @Test(groups="producerExpression") @SpecAssertion(section="3.4")
public void testApiTypes()
{
-
+ assert false;
}
+ @Test(groups="producerExpression") @SpecAssertion(section="3.4")
+ public void testFinalProducerExpression()
+ {
+ assert false;
+ }
+
+ @Test(groups="producerExpression") @SpecAssertion(section="3.4")
+ public void testFinalDependentProducerExpression()
+ {
+ assert false;
+ }
+
+ @Test(groups="producerExpression") @SpecAssertion(section="3.4.2")
+ public void testProducerExpressionCannotHaveDefaultName()
+ {
+ assert false;
+ }
+
+
}
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentLifecycleTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentLifecycleTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentLifecycleTest.java 2008-09-11 12:46:52 UTC (rev 105)
@@ -0,0 +1,43 @@
+package org.jboss.webbeans.test;
+
+import org.testng.annotations.Test;
+
+public class ProducerMethodComponentLifecycleTest
+{
+
+ @Test(groups="componentLifecycle") @SpecAssertion(section="3.3")
+ public void testNonDependentProducerMethodThatReturnsNull()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="componentLifecycle") @SpecAssertion(section="3.3")
+ public void testDependentProducerMethodThatReturnsNull()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.3.3")
+ public void testSpecializedComponentAlwaysUsed()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups={"disposalMethod", "componentLifecycle"}) @SpecAssertion(section="3.3.4")
+ public void testDisposalMethodCalled()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups={"disposalMethod", "componentLifecycle"}) @SpecAssertion(section="3.3.4")
+ public void testDisposalMethodHasParametersInjected()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentLifecycleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java 2008-09-11 11:24:52 UTC (rev 104)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java 2008-09-11 12:46:52 UTC (rev 105)
@@ -156,4 +156,64 @@
assert ladybirdSpiderModel.getName().equals("ladybirdSpider");
}
+ @Test(groups="disposalMethod") @SpecAssertion(section="3.3.4")
+ public void testDisposalMethodNonStatic()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="disposalMethod") @SpecAssertion(section="3.3.4")
+ public void testDisposalMethodMethodDeclaredOnWebBeanImplementationClass()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="disposalMethod") @SpecAssertion(section="3.3.4")
+ public void testDisposalMethodBindingAnnotations()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="disposalMethod") @SpecAssertion(section="3.3.4")
+ public void testDisposalMethodDefaultBindingAnnotations()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="disposalMethod") @SpecAssertion(section="3.3.4")
+ public void testDisposalMethodDoesNotResolveToProducerMethod()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="disposalMethod") @SpecAssertion(section="3.3.5")
+ public void testDisposalMethodDeclaredOnEnabledComponent()
+ {
+ // TODO Placeholder
+ // TODO Move this
+
+ assert false;
+ }
+
+ @Test(groups="disposalMethod") @SpecAssertion(section="3.3.4")
+ public void testComponentCanDeclareMultipleDisposalMethods()
+ {
+ // TODO move this
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="disposalMethod") @SpecAssertion(section="3.3.5")
+ public void testProducerMethodHasNoMoreThanOneDisposalMethod()
+ {
+ // TODO move this
+ // TODO Placeholder
+ assert false;
+ }
+
}
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentLifecycleTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentLifecycleTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentLifecycleTest.java 2008-09-11 12:46:52 UTC (rev 105)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test;
+
+import org.testng.annotations.Test;
+
+public class RemoteComponentLifecycleTest
+{
+
+ @Test(groups="componentLifecycle") @SpecAssertion(section="3.2.3")
+ public void testInjectonOfParametersIntoRemoveMethod()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.2.3")
+ public void testSpecializedComponentAlwaysUsed()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentLifecycleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java 2008-09-11 11:24:52 UTC (rev 104)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java 2008-09-11 12:46:52 UTC (rev 105)
@@ -61,4 +61,10 @@
assert tameApeModel.getBindingTypes().iterator().next().annotationType().equals(Tame.class);
}
+ @Test(groups="remoteComponentInXml") @SpecAssertion(section="3.5.2")
+ public void testRemoteComponentDeclaredInXml()
+ {
+ assert false;
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentLifecycleTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentLifecycleTest.java 2008-09-11 11:24:52 UTC (rev 104)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentLifecycleTest.java 2008-09-11 12:46:52 UTC (rev 105)
@@ -11,5 +11,12 @@
// TODO Placeholder
assert false;
}
-
+
+ @Test(groups="specialization") @SpecAssertion(section="3.1.4")
+ public void testSpecializedComponentAlwaysUsed()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
}
Modified: ri/trunk/webbeans-ri/testng.xml
===================================================================
--- ri/trunk/webbeans-ri/testng.xml 2008-09-11 11:24:52 UTC (rev 104)
+++ ri/trunk/webbeans-ri/testng.xml 2008-09-11 12:46:52 UTC (rev 105)
@@ -14,6 +14,7 @@
<run>
<exclude name="specialization" />
<exclude name="componentLifecycle" />
+ <exclude name="deployment" />
</run>
</groups>
<classes>
@@ -23,6 +24,13 @@
</test>
<test name="Component Model">
+ <groups>
+ <run>
+ <exclude name="disposalMethod" />
+ <exclude name="producerExpression" />
+ <exclude name="remoteComponentInXml" />
+ </run>
+ </groups>
<classes>
<class name="org.jboss.webbeans.test.SimpleComponentModelTest" />
<class name="org.jboss.webbeans.test.EnterpriseComponentModelTest" />
@@ -37,10 +45,15 @@
<groups>
<run>
<exclude name="componentLifecycle" />
+ <exclude name="specialization" />
+ <exclude name="disposalMethod" />
</run>
</groups>
<classes>
<class name="org.jboss.webbeans.test.SimpleComponentLifecycleTest" />
+ <class name="org.jboss.webbeans.test.EnterpriseComponentLifecycleTest" />
+ <class name="org.jboss.webbeans.test.ProducerMethodComponentLifecycleTest" />
+ <class name="org.jboss.webbeans.test.ProducerExpressionComponentLifecycleTest" />
</classes>
</test>
16 years, 2 months
[webbeans-commits] Webbeans SVN: r104 - in ri/trunk: webbeans-ri and 5 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-11 07:24:52 -0400 (Thu, 11 Sep 2008)
New Revision: 104
Added:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventBus.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverMethod.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EventComponentModel.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeferredEventNotificationTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentLifecycleTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeModelTest.java
ri/trunk/webbeans-ri/testng.xml
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorMetaModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeMetaModelTest.java
Modified:
ri/trunk/examples/webbeans-pizzashack/pom.xml
ri/trunk/webbeans-ri/.settings/org.eclipse.jdt.core.prefs
ri/trunk/webbeans-ri/pom.xml
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ContainerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractClassComponentModel.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ClassAnnotatedItemTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ContainerTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EjbMetaDataTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InitializationTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java
Log:
switch to testng, add David's event bus stuff
Modified: ri/trunk/examples/webbeans-pizzashack/pom.xml
===================================================================
--- ri/trunk/examples/webbeans-pizzashack/pom.xml 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/examples/webbeans-pizzashack/pom.xml 2008-09-11 11:24:52 UTC (rev 104)
@@ -17,10 +17,11 @@
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ </dependency>
</dependencies>
</project>
Modified: ri/trunk/webbeans-ri/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- ri/trunk/webbeans-ri/.settings/org.eclipse.jdt.core.prefs 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/.settings/org.eclipse.jdt.core.prefs 2008-09-11 11:24:52 UTC (rev 104)
@@ -1,266 +1,5 @@
-#Tue Jun 24 10:21:10 BST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+#Thu Sep 11 11:33:04 BST 2008
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=3
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=80
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=3
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.compiler.compliance=1.5
Modified: ri/trunk/webbeans-ri/pom.xml
===================================================================
--- ri/trunk/webbeans-ri/pom.xml 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/pom.xml 2008-09-11 11:24:52 UTC (rev 104)
@@ -19,10 +19,11 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
<scope>test</scope>
- </dependency>
+ <classifier>jdk15</classifier>
+ </dependency>
<dependency>
<groupId>javax.servlet</groupId>
@@ -46,5 +47,20 @@
</dependency>
</dependencies>
-
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.2</version>
+ <configuration>
+ <suiteXmlFiles>
+ <suiteXmlFile>testng.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
\ No newline at end of file
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ContainerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ContainerImpl.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ContainerImpl.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -19,6 +19,7 @@
import org.jboss.webbeans.bindings.ProductionBinding;
import org.jboss.webbeans.bindings.StandardBinding;
import org.jboss.webbeans.ejb.EjbManager;
+import org.jboss.webbeans.event.EventBus;
public class ContainerImpl implements Container
{
@@ -26,6 +27,8 @@
private List<Annotation> enabledDeploymentTypes;
private ModelManager modelManager;
private EjbManager ejbLookupManager;
+ private EventBus eventBus;
+
private ThreadLocal<Map<Class<Annotation>, Context>> contexts =
new ThreadLocal<Map<Class<Annotation>, Context>>();
@@ -38,6 +41,7 @@
this.modelManager = new ModelManager();
this.ejbLookupManager = new EjbManager();
this.components = new HashSet<ComponentInstance>();
+ this.eventBus = new EventBus();
}
private void initEnabledDeploymentTypes(List<Annotation> enabledDeploymentTypes)
@@ -72,8 +76,7 @@
public void addObserver(Observer observer)
{
- // TODO Auto-generated method stub
-
+ eventBus.addObserver(observer);
}
public void fireEvent(Object event, Annotation... bindings)
@@ -118,8 +121,7 @@
public void removeObserver(Observer observer)
{
- // TODO Auto-generated method stub
-
+ eventBus.removeObserver(observer);
}
public Set<ComponentInstance> resolveByName(String name)
@@ -148,8 +150,7 @@
public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings)
{
- // TODO Auto-generated method stub
- return null;
+ return (Set<Observer<T>>) eventBus.getObservers(event, bindings);
}
public List<Annotation> getEnabledDeploymentTypes()
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,46 @@
+package org.jboss.webbeans.event;
+
+import javax.transaction.Synchronization;
+import javax.webbeans.Container;
+import javax.webbeans.Observer;
+
+/**
+ * A synchronization object which will deliver the event to the observer
+ * after the JTA transaction currently in effect is committed.
+ *
+ * @author David Allen
+ *
+ */
+public class DeferredEventNotification implements Synchronization
+{
+ private Container container;
+ private Observer<Object> observer;
+ private Object event;
+
+ /**
+ * Creates a new deferred event notifier.
+ *
+ * @param container The Web Beans container
+ * @param observer The observer to be notified
+ * @param event The event being fired
+ */
+ @SuppressWarnings("unchecked")
+ public DeferredEventNotification(Container container, Object event, Observer observer)
+ {
+ this.container = container;
+ this.observer = observer;
+ this.event = event;
+ }
+
+ public void afterCompletion(int arg0)
+ {
+ // The event is already delivered before completion
+ }
+
+ public void beforeCompletion()
+ {
+ // Execute the observer method on the event
+ observer.notify(container, event);
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/DeferredEventNotification.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventBus.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventBus.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventBus.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,120 @@
+package org.jboss.webbeans.event;
+
+import java.lang.annotation.Annotation;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.transaction.RollbackException;
+import javax.transaction.SystemException;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import javax.webbeans.Container;
+import javax.webbeans.Observer;
+
+import org.jboss.webbeans.util.JNDI;
+
+/**
+ * The event bus is where observers are registered and events are fired.
+ *
+ * @author David Allen
+ *
+ */
+public class EventBus
+{
+ private final Map<Integer, Set<Observer>> registeredObservers;
+ private final TransactionManager tm;
+ private String tmName = "java:/TransactionManager";
+
+ /**
+ * Initializes a new instance of the EventBus. This includes looking up the
+ * transaction manager which is needed to defer events till the end of a
+ * transaction.
+ * TODO Should be able to configure JNDI name of transaction manager
+ *
+ */
+ public EventBus()
+ {
+ registeredObservers = new HashMap<Integer, Set<Observer>>();
+ tm = JNDI.lookup(tmName, TransactionManager.class);
+ }
+
+ /**
+ * Adds an observer to the event bus so that it receives event notifications. The
+ * event information is already encapsulated as part of the observer.
+ * @param o The observer that should receive events
+ */
+ public void addObserver(Observer o)
+ {
+ int key = generateKey(o.getEventType(), o.getEventBindingTypes());
+ Set<Observer> l = registeredObservers.get(key);
+ if (l == null)
+ l = new HashSet<Observer>();
+ l.add(o);
+ registeredObservers.put(key, l);
+ }
+
+ /**
+ * Defers delivery of an event till the end of the currently active transaction.
+ *
+ * @param container The WebBeans container
+ * @param event The event object to deliver
+ * @param o The observer to receive the event
+ * @throws SystemException
+ * @throws IllegalStateException
+ * @throws RollbackException
+ */
+ public void deferEvent(Container container, Object event, Observer o) throws SystemException, IllegalStateException, RollbackException
+ {
+ if (tm != null) {
+ // Get the current transaction associated with the thread
+ Transaction t = tm.getTransaction();
+ if (t != null)
+ t.registerSynchronization(new DeferredEventNotification(container, event, o));
+ }
+ }
+
+ /**
+ * Resolves the list of observers to be notified for a given event and
+ * optional event bindings.
+ * @param event The event object
+ * @param bindings Optional event bindings
+ * @return A set of Observers
+ */
+ public Set getObservers(Object event, Annotation... bindings)
+ {
+ return registeredObservers.get(generateKey(event.getClass(), Arrays.asList(bindings)));
+ }
+
+ /**
+ * Removes an observer from the event bus.
+ * @param o The observer to remove
+ */
+ public void removeObserver(Observer o)
+ {
+ Set<Observer> l = registeredObservers.get(generateKey(o.getEventType(), o.getEventBindingTypes()));
+ if (l != null) {
+ l.remove(o);
+ }
+ }
+
+ /**
+ * Creates a key that can be used in a map for an observer that is notified of
+ * events of a specific type with optional event bindings.
+ * @param eventType The class of the event being observed
+ * @param eventBindings An optional set of event bindings
+ * @return
+ */
+ public int generateKey(Class<?> eventType, Collection eventBindings)
+ {
+ // Produce the sum of the hash codes for the event type and the set of
+ // event bindings.
+ int key = eventType.hashCode();
+ if (eventBindings != null)
+ key += eventBindings.hashCode();
+ return key;
+ }
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventBus.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventImpl.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventImpl.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,47 @@
+package org.jboss.webbeans.event;
+
+import java.lang.annotation.Annotation;
+import java.util.Arrays;
+import java.util.Set;
+import java.util.HashSet;
+
+import javax.webbeans.Event;
+
+import org.jboss.webbeans.ComponentInstanceImpl;
+import org.jboss.webbeans.model.EventComponentModel;
+
+/**
+ * Implementation of an event as a simple component.
+ *
+ * @author David Allen
+ *
+ */
+public class EventImpl<T> extends ComponentInstanceImpl<T> implements Event<T>
+{
+ private EventComponentModel<T> componentModel;
+
+ /**
+ * Creates a simple implementation of {@link Event} with no default
+ * event bindings.
+ */
+ public EventImpl(EventComponentModel<T> componentMetaModel) {
+ super(componentMetaModel);
+ this.componentModel = componentMetaModel;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.webbeans.Event#fire(java.lang.Object, java.lang.annotation.Annotation[])
+ */
+ public void fire(T event, Annotation... bindings)
+ {
+ // Combine the annotations passed here with the annotations (event bindings)
+ // specified on the @Observable object.
+ Set<Annotation> eventBindings = new HashSet<Annotation>();
+ eventBindings.addAll(this.getBindingTypes());
+ eventBindings.addAll(Arrays.asList(bindings));
+
+ // Invoke the container method to fire the event per 7.2
+ componentModel.getContainer().fireEvent(event, eventBindings.toArray(new Annotation[0]));
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/EventImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,108 @@
+package org.jboss.webbeans.event;
+
+import java.lang.annotation.Annotation;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.webbeans.Container;
+import javax.webbeans.Observer;
+
+import org.jboss.webbeans.injectable.Parameter;
+import org.jboss.webbeans.model.AbstractComponentModel;
+
+/**
+ * <p>
+ * Reference implementation for the Observer interface, which represents an
+ * observer method. Each observer method has an event type, the class of the
+ * event object being observed, and event binding types, annotations applied to
+ * the event parameter to narrow the event notifications delivered.
+ * </p>
+ *
+ * <p>
+ * The hash code for each observer method includes all the information
+ * contained. The data structure used to lookup observers must account for an
+ * arbitrary number of observers of the same event.
+ * </p>
+ *
+ * @author David Allen
+ *
+ */
+public class ObserverImpl<T> implements Observer<T>
+{
+
+ private final AbstractComponentModel<?, ?> compModel;
+ private final ObserverMethod observerMethod;
+ private final Set<Annotation> eventBindings;
+ private final Class<T> eventType;
+
+ /**
+ * Creates an Observer which describes an observer method (7.3).
+ *
+ * @param componentModel
+ * The model for the component which defines the observer method
+ * @param observer
+ * The observer method to notify
+ * @param eventType
+ * The type of event being observed
+ */
+ @SuppressWarnings("unchecked")
+ public ObserverImpl(AbstractComponentModel<?, ?> componentModel,
+ ObserverMethod observer, Class<T> eventType)
+ {
+ this.compModel = componentModel;
+ this.observerMethod = observer;
+ this.eventType = eventType;
+ List<Parameter> parms = observer.getParameters();
+ eventBindings = new HashSet<Annotation>();
+ for (Parameter p : parms)
+ {
+ if (p.getType().equals(eventType))
+ {
+ if ((p.getBindingTypes() != null)
+ && (p.getBindingTypes().length > 0))
+ {
+ eventBindings.addAll(Arrays.asList(p.getBindingTypes()));
+ break;
+ }
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.webbeans.Observer#getEventBindingTypes()
+ */
+ public Set<Annotation> getEventBindingTypes()
+ {
+ return Collections.unmodifiableSet(this.eventBindings);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.webbeans.Observer#getEventType()
+ */
+ public Class<T> getEventType()
+ {
+ return eventType;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.webbeans.Observer#notify(javax.webbeans.Container,
+ * java.lang.Object)
+ */
+ public void notify(Container container, T event)
+ {
+ // Get the most specialized instance of the component
+ Object instance = container.getInstanceByType(compModel.getType(),
+ compModel.getBindingTypes().toArray(new Annotation[0]));
+ if (instance != null)
+ this.observerMethod.invoke(container, instance, event);
+ }
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverMethod.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverMethod.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverMethod.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,74 @@
+package org.jboss.webbeans.event;
+
+import java.lang.reflect.Method;
+import java.util.List;
+
+import javax.webbeans.Container;
+
+import org.jboss.webbeans.injectable.InjectableMethod;
+import org.jboss.webbeans.injectable.Parameter;
+
+/**
+ * A specialized injectable method where one of the injected parameters is an
+ * event object.
+ *
+ * @author David Allen
+ *
+ */
+public class ObserverMethod extends InjectableMethod
+{
+
+ public ObserverMethod(Method method)
+ {
+ super(method);
+ }
+
+ /**
+ * Invokes the method on the given component instance and uses the specified
+ * event object for parameter injection.
+ *
+ * @param container The WebBeans container
+ * @param instance The component instance to invoke the observer method on
+ * @param event The event object being fired
+ */
+ public void invoke(Container container, Object instance, Object event)
+ {
+ try
+ {
+ getMethod().invoke(instance, getParameterValues(container, event));
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Unable to invoke " + getMethod() + " on " + instance, e);
+ }
+ }
+
+ /**
+ * Creates a list of parameter values to inject and uses the specified event object
+ * to inject the observed event.
+ *
+ * @param container The WebBeans container
+ * @param event The event being fired
+ * @return an array of objects that serve as arguments for the invocation of the method
+ */
+ @SuppressWarnings("unchecked")
+ public Object[] getParameterValues(Container container, Object event)
+ {
+ // Let the super class get the parameter values, but substitute the event
+ // object so that we know for certain it is the correct one.
+ Object[] parameterValues = super.getParameterValues(container);
+ List<Parameter> parms = this.getParameters();
+ int i = 0;
+ for (Parameter p : parms)
+ {
+ if (p.getType().isAssignableFrom(event.getClass()))
+ {
+ parameterValues[i] = event;
+ break;
+ }
+ i++;
+ }
+ return parameterValues;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverMethod.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractClassComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractClassComponentModel.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/AbstractClassComponentModel.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -59,7 +59,7 @@
checkRequiredTypesImplemented();
checkScopeAllowed();
// TODO This is too high
- checkComponentImplementation(getType());
+ checkComponentImplementation();
// TODO Interceptors
}
@@ -161,9 +161,9 @@
- protected static void checkComponentImplementation(Class<?> type)
+ protected void checkComponentImplementation()
{
- if (Reflections.isAbstract(type))
+ if (Reflections.isAbstract(getType()))
{
throw new RuntimeException("Web Bean implementation class " + type + " cannot be declared abstract");
}
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EventComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EventComponentModel.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EventComponentModel.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,71 @@
+package org.jboss.webbeans.model;
+
+import java.lang.annotation.Annotation;
+
+import javax.webbeans.Container;
+
+import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.bindings.DependentBinding;
+import org.jboss.webbeans.bindings.StandardBinding;
+import org.jboss.webbeans.introspector.AnnotatedType;
+
+/**
+ * Web Beans component meta model for the container instantiated, injectable,
+ * observable events (Section 7.2).
+ *
+ * @author David Allen
+ *
+ */
+public class EventComponentModel<T> extends SimpleComponentModel<T>
+{
+
+ private StandardBinding deploymentType = new StandardBinding();
+ private DependentBinding scopeType = new DependentBinding();
+ private ContainerImpl container;
+
+ /**
+ * Creates a new component model for an injectable, observable event object.
+ * @see org.jboss.webbeans.event.EventImpl
+ *
+ * @param annotatedItem The injectable variable declared in Java
+ * @param xmlAnnotatedItem The injectable variable defined in XML
+ * @param container The Web Beans container
+ */
+ public EventComponentModel(AnnotatedType annotatedItem, AnnotatedType xmlAnnotatedItem, ContainerImpl container)
+ {
+ super(annotatedItem, xmlAnnotatedItem, container);
+ // This is needed later for the impl of Event to fire events with the container
+ this.container = container;
+ }
+
+ /**
+ * The implementation of the container used to create this model.
+ * @return the container
+ */
+ public Container getContainer()
+ {
+ return container;
+ }
+
+ @Override
+ public Annotation getDeploymentType()
+ {
+ // This is always @Standard per 7.2
+ return deploymentType;
+ }
+
+ @Override
+ public String getName()
+ {
+ // No name per 7.2
+ return "";
+ }
+
+ @Override
+ public Annotation getScopeType()
+ {
+ // This is always @Dependent per 7.2
+ return scopeType;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/EventComponentModel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -29,6 +29,13 @@
initBoundTo();
}
+ @Override
+ protected void checkComponentImplementation()
+ {
+ // No - op for remote components
+ // TODO THis is wrong probably
+ }
+
protected void initBoundTo()
{
if (getXmlAnnotatedItem().isAnnotationPresent(BoundTo.class))
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ClassAnnotatedItemTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ClassAnnotatedItemTest.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ClassAnnotatedItemTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -13,7 +13,7 @@
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.test.components.Antelope;
import org.jboss.webbeans.test.components.Order;
-import org.junit.Test;
+import org.testng.annotations.Test;
public class ClassAnnotatedItemTest
{
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,39 @@
+package org.jboss.webbeans.test;
+
+import org.testng.annotations.Test;
+
+public class ComponentDeploymentTest
+{
+
+
+ @Test(groups="specialization") @SpecAssertion(section="3.1.4")
+ public void testOnlySpecializedSimpleComponentDeployed()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.1.4")
+ public void testSpecializedSimpleComponentExtends()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.1.4")
+ public void testSpecializedSimpleComponentHasSameBindingAnnotations()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+ @Test(groups="specialization") @SpecAssertion(section="3.1.4")
+ public void testSpecializedSimpleComponentHasSameName()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ComponentDeploymentTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorMetaModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorMetaModelTest.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorMetaModelTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -1,161 +0,0 @@
-package org.jboss.webbeans.test;
-
-import java.lang.annotation.Annotation;
-import java.util.HashMap;
-
-import javax.webbeans.Current;
-
-import org.jboss.webbeans.ContainerImpl;
-import org.jboss.webbeans.injectable.SimpleConstructor;
-import org.jboss.webbeans.introspector.AnnotatedType;
-import org.jboss.webbeans.introspector.SimpleAnnotatedType;
-import org.jboss.webbeans.model.SimpleComponentModel;
-import org.jboss.webbeans.test.annotations.Synchronous;
-import org.jboss.webbeans.test.components.Chicken;
-import org.jboss.webbeans.test.components.Donkey;
-import org.jboss.webbeans.test.components.Duck;
-import org.jboss.webbeans.test.components.Goat;
-import org.jboss.webbeans.test.components.Goose;
-import org.jboss.webbeans.test.components.Order;
-import org.jboss.webbeans.test.components.Sheep;
-import org.jboss.webbeans.test.components.Turkey;
-import org.jboss.webbeans.test.mock.MockContainerImpl;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ConstructorMetaModelTest
-{
-
- private ContainerImpl container;
-
- private AnnotatedType emptyAnnotatedItem;
-
- @Before
- public void before()
- {
- emptyAnnotatedItem = new SimpleAnnotatedType(null, new HashMap<Class<? extends Annotation>, Annotation>());
- container = new MockContainerImpl(null);
-
- }
-
- @Test
- public void testImplicitConstructor()
- {
- SimpleConstructor<Order> constructor = new SimpleComponentModel<Order>(new SimpleAnnotatedType<Order>(Order.class), emptyAnnotatedItem, container).getConstructor();
- assert constructor.getConstructor().getDeclaringClass().equals(Order.class);
- assert constructor.getConstructor().getParameterTypes().length == 0;
- assert constructor.getParameters().size() == 0;
- }
-
- @Test
- public void testSingleConstructor()
- {
- SimpleConstructor<Donkey> constructor = new SimpleComponentModel<Donkey>(new SimpleAnnotatedType(Donkey.class), emptyAnnotatedItem, container).getConstructor();
- assert constructor.getConstructor().getDeclaringClass().equals(Donkey.class);
- assert constructor.getConstructor().getParameterTypes().length == 1;
- assert constructor.getConstructor().getParameterTypes()[0].equals(String.class);
- assert constructor.getParameters().size() == 1;
- assert constructor.getParameters().get(0).getType().equals(String.class);
- assert constructor.getParameters().get(0).getBindingTypes().length == 1;
- assert constructor.getParameters().get(0).getBindingTypes()[0].annotationType().equals(Current.class);
- }
-
- @Test
- public void testInitializerAnnotatedConstructor()
- {
- SimpleConstructor<Sheep> constructor = new SimpleComponentModel<Sheep>(new SimpleAnnotatedType(Sheep.class), emptyAnnotatedItem, container).getConstructor();
- assert constructor.getConstructor().getDeclaringClass().equals(Sheep.class);
- assert constructor.getConstructor().getParameterTypes().length == 2;
- assert constructor.getConstructor().getParameterTypes()[0].equals(String.class);
- assert constructor.getConstructor().getParameterTypes()[1].equals(Double.class);
- assert constructor.getParameters().size() == 2;
- assert constructor.getParameters().get(0).getType().equals(String.class);
- assert constructor.getParameters().get(1).getType().equals(Double.class);
- assert constructor.getParameters().get(0).getBindingTypes().length == 1;
- assert constructor.getParameters().get(0).getBindingTypes()[0].annotationType().equals(Current.class);
- assert constructor.getParameters().get(1).getBindingTypes().length == 1;
- assert constructor.getParameters().get(1).getBindingTypes()[0].annotationType().equals(Current.class);
- }
-
- @Test
- public void testBindingTypeAnnotatedConstructor()
- {
- SimpleConstructor<Duck> constructor = new SimpleComponentModel<Duck>(new SimpleAnnotatedType(Duck.class), emptyAnnotatedItem, container).getConstructor();
- assert constructor.getConstructor().getDeclaringClass().equals(Duck.class);
- assert constructor.getConstructor().getParameterTypes().length == 2;
- assert constructor.getConstructor().getParameterTypes()[0].equals(String.class);
- assert constructor.getConstructor().getParameterTypes()[1].equals(Integer.class);
- assert constructor.getParameters().size() == 2;
- assert constructor.getParameters().get(0).getType().equals(String.class);
- assert constructor.getParameters().get(1).getType().equals(Integer.class);
- assert constructor.getParameters().get(0).getBindingTypes().length == 1;
- assert constructor.getParameters().get(0).getBindingTypes()[0].annotationType().equals(Current.class);
- assert constructor.getParameters().get(1).getBindingTypes().length == 1;
- assert constructor.getParameters().get(1).getBindingTypes()[0].annotationType().equals(Synchronous.class);
- }
-
- @Test
- public void testTooManyInitializerAnnotatedConstructor()
- {
- boolean exception = false;
- try
- {
- new SimpleComponentModel<Chicken>(new SimpleAnnotatedType(Chicken.class), emptyAnnotatedItem, container);
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
-
- }
-
- @Test
- public void testTooManyConstructors()
- {
- boolean exception = false;
- try
- {
- new SimpleComponentModel<Turkey>(new SimpleAnnotatedType(Turkey.class), emptyAnnotatedItem, container);
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
-
- }
-
- @Test
- public void testTooManyBindingTypeAnnotatedConstructor()
- {
- boolean exception = false;
- try
- {
- new SimpleComponentModel<Goat>(new SimpleAnnotatedType(Goat.class), emptyAnnotatedItem, container);
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
-
- }
-
- @Test
- public void testBindingTypeAndInitializerAnnotatedConstructor()
- {
- boolean exception = false;
- try
- {
- new SimpleComponentModel<Goose>(new SimpleAnnotatedType(Goose.class), emptyAnnotatedItem, container);
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
-
- }
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java (from rev 98, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorMetaModelTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,161 @@
+package org.jboss.webbeans.test;
+
+import java.lang.annotation.Annotation;
+import java.util.HashMap;
+
+import javax.webbeans.Current;
+
+import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.injectable.SimpleConstructor;
+import org.jboss.webbeans.introspector.AnnotatedType;
+import org.jboss.webbeans.introspector.SimpleAnnotatedType;
+import org.jboss.webbeans.model.SimpleComponentModel;
+import org.jboss.webbeans.test.annotations.Synchronous;
+import org.jboss.webbeans.test.components.Chicken;
+import org.jboss.webbeans.test.components.Donkey;
+import org.jboss.webbeans.test.components.Duck;
+import org.jboss.webbeans.test.components.Goat;
+import org.jboss.webbeans.test.components.Goose;
+import org.jboss.webbeans.test.components.Order;
+import org.jboss.webbeans.test.components.Sheep;
+import org.jboss.webbeans.test.components.Turkey;
+import org.jboss.webbeans.test.mock.MockContainerImpl;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class ConstructorModelTest
+{
+
+ private ContainerImpl container;
+
+ private AnnotatedType emptyAnnotatedItem;
+
+ @BeforeMethod
+ public void before()
+ {
+ emptyAnnotatedItem = new SimpleAnnotatedType(null, new HashMap<Class<? extends Annotation>, Annotation>());
+ container = new MockContainerImpl(null);
+
+ }
+
+ @Test
+ public void testImplicitConstructor()
+ {
+ SimpleConstructor<Order> constructor = new SimpleComponentModel<Order>(new SimpleAnnotatedType<Order>(Order.class), emptyAnnotatedItem, container).getConstructor();
+ assert constructor.getConstructor().getDeclaringClass().equals(Order.class);
+ assert constructor.getConstructor().getParameterTypes().length == 0;
+ assert constructor.getParameters().size() == 0;
+ }
+
+ @Test
+ public void testSingleConstructor()
+ {
+ SimpleConstructor<Donkey> constructor = new SimpleComponentModel<Donkey>(new SimpleAnnotatedType(Donkey.class), emptyAnnotatedItem, container).getConstructor();
+ assert constructor.getConstructor().getDeclaringClass().equals(Donkey.class);
+ assert constructor.getConstructor().getParameterTypes().length == 1;
+ assert constructor.getConstructor().getParameterTypes()[0].equals(String.class);
+ assert constructor.getParameters().size() == 1;
+ assert constructor.getParameters().get(0).getType().equals(String.class);
+ assert constructor.getParameters().get(0).getBindingTypes().length == 1;
+ assert constructor.getParameters().get(0).getBindingTypes()[0].annotationType().equals(Current.class);
+ }
+
+ @Test
+ public void testInitializerAnnotatedConstructor()
+ {
+ SimpleConstructor<Sheep> constructor = new SimpleComponentModel<Sheep>(new SimpleAnnotatedType(Sheep.class), emptyAnnotatedItem, container).getConstructor();
+ assert constructor.getConstructor().getDeclaringClass().equals(Sheep.class);
+ assert constructor.getConstructor().getParameterTypes().length == 2;
+ assert constructor.getConstructor().getParameterTypes()[0].equals(String.class);
+ assert constructor.getConstructor().getParameterTypes()[1].equals(Double.class);
+ assert constructor.getParameters().size() == 2;
+ assert constructor.getParameters().get(0).getType().equals(String.class);
+ assert constructor.getParameters().get(1).getType().equals(Double.class);
+ assert constructor.getParameters().get(0).getBindingTypes().length == 1;
+ assert constructor.getParameters().get(0).getBindingTypes()[0].annotationType().equals(Current.class);
+ assert constructor.getParameters().get(1).getBindingTypes().length == 1;
+ assert constructor.getParameters().get(1).getBindingTypes()[0].annotationType().equals(Current.class);
+ }
+
+ @Test
+ public void testBindingTypeAnnotatedConstructor()
+ {
+ SimpleConstructor<Duck> constructor = new SimpleComponentModel<Duck>(new SimpleAnnotatedType(Duck.class), emptyAnnotatedItem, container).getConstructor();
+ assert constructor.getConstructor().getDeclaringClass().equals(Duck.class);
+ assert constructor.getConstructor().getParameterTypes().length == 2;
+ assert constructor.getConstructor().getParameterTypes()[0].equals(String.class);
+ assert constructor.getConstructor().getParameterTypes()[1].equals(Integer.class);
+ assert constructor.getParameters().size() == 2;
+ assert constructor.getParameters().get(0).getType().equals(String.class);
+ assert constructor.getParameters().get(1).getType().equals(Integer.class);
+ assert constructor.getParameters().get(0).getBindingTypes().length == 1;
+ assert constructor.getParameters().get(0).getBindingTypes()[0].annotationType().equals(Current.class);
+ assert constructor.getParameters().get(1).getBindingTypes().length == 1;
+ assert constructor.getParameters().get(1).getBindingTypes()[0].annotationType().equals(Synchronous.class);
+ }
+
+ @Test
+ public void testTooManyInitializerAnnotatedConstructor()
+ {
+ boolean exception = false;
+ try
+ {
+ new SimpleComponentModel<Chicken>(new SimpleAnnotatedType(Chicken.class), emptyAnnotatedItem, container);
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+
+ }
+
+ @Test
+ public void testTooManyConstructors()
+ {
+ boolean exception = false;
+ try
+ {
+ new SimpleComponentModel<Turkey>(new SimpleAnnotatedType(Turkey.class), emptyAnnotatedItem, container);
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+
+ }
+
+ @Test
+ public void testTooManyBindingTypeAnnotatedConstructor()
+ {
+ boolean exception = false;
+ try
+ {
+ new SimpleComponentModel<Goat>(new SimpleAnnotatedType(Goat.class), emptyAnnotatedItem, container);
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+
+ }
+
+ @Test
+ public void testBindingTypeAndInitializerAnnotatedConstructor()
+ {
+ boolean exception = false;
+ try
+ {
+ new SimpleComponentModel<Goose>(new SimpleAnnotatedType(Goose.class), emptyAnnotatedItem, container);
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ConstructorModelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ContainerTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ContainerTest.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ContainerTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -14,7 +14,7 @@
import org.jboss.webbeans.test.bindings.AnotherDeploymentTypeBinding;
import org.jboss.webbeans.test.bindings.HornedAnimalDeploymentTypeBinding;
import org.jboss.webbeans.test.mock.MockContainerImpl;
-import org.junit.Test;
+import org.testng.annotations.Test;
public class ContainerTest
{
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeferredEventNotificationTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeferredEventNotificationTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeferredEventNotificationTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,29 @@
+/**
+ *
+ */
+package org.jboss.webbeans.test;
+
+import org.testng.annotations.Test;
+
+/**
+ * Unit tests for the deferred event notification object used to delay
+ * notification till the end of a transaction.
+ *
+ * @author David Allen
+ *
+ */
+public class DeferredEventNotificationTest
+{
+
+ /**
+ * Test method for {@link org.jboss.webbeans.event.DeferredEventNotification#beforeCompletion()}.
+ */
+ @Test
+ public final void testBeforeCompletion()
+ {
+ // When the transaction is committed, the beforeCompletion() method is
+ // invoked which in turn invokes the observer. Here the mock observer
+ // is used to keep track of the event being fired.
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeferredEventNotificationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentStrategyTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -5,7 +5,7 @@
import org.jboss.webbeans.ContainerImpl;
import org.jboss.webbeans.deployment.DeploymentStrategy;
import org.jboss.webbeans.scannotation.ClasspathUrlFinder;
-import org.junit.Test;
+import org.testng.annotations.Test;
public class DeploymentStrategyTest
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EjbMetaDataTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EjbMetaDataTest.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EjbMetaDataTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -4,7 +4,7 @@
import org.jboss.webbeans.test.components.Leopard;
import org.jboss.webbeans.test.components.Lion;
import org.jboss.webbeans.test.components.Tiger;
-import org.junit.Test;
+import org.testng.annotations.Test;
public class EjbMetaDataTest
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -25,8 +25,8 @@
import org.jboss.webbeans.test.components.Tiger;
import org.jboss.webbeans.test.mock.MockContainerImpl;
import org.jboss.webbeans.util.Reflections;
-import org.junit.Before;
-import org.junit.Test;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
public class EnterpriseComponentModelTest
{
@@ -35,7 +35,7 @@
private AnnotatedType emptyAnnotatedItem;
- @Before
+ @BeforeMethod
public void before()
{
emptyAnnotatedItem = new SimpleAnnotatedType(null, new HashMap<Class<? extends Annotation>, Annotation>());
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InitializationTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InitializationTest.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InitializationTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -1,6 +1,6 @@
package org.jboss.webbeans.test;
-import org.junit.Test;
+import org.testng.annotations.Test;
public class InitializationTest
{
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,119 @@
+/**
+ *
+ */
+package org.jboss.webbeans.test;
+
+import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.webbeans.Observer;
+import javax.webbeans.Observes;
+import javax.webbeans.Production;
+
+import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.bindings.StandardBinding;
+import org.jboss.webbeans.event.ObserverImpl;
+import org.jboss.webbeans.event.ObserverMethod;
+import org.jboss.webbeans.introspector.AnnotatedType;
+import org.jboss.webbeans.introspector.SimpleAnnotatedType;
+import org.jboss.webbeans.model.SimpleComponentModel;
+import org.jboss.webbeans.model.StereotypeModel;
+import org.jboss.webbeans.test.annotations.AnimalStereotype;
+import org.jboss.webbeans.test.annotations.Asynchronous;
+import org.jboss.webbeans.test.annotations.FishStereotype;
+import org.jboss.webbeans.test.annotations.RequestScopedAnimalStereotype;
+import org.jboss.webbeans.test.annotations.RiverFishStereotype;
+import org.jboss.webbeans.test.bindings.AnotherDeploymentTypeBinding;
+import org.jboss.webbeans.test.bindings.AsynchronousBinding;
+import org.jboss.webbeans.test.components.Tuna;
+import org.jboss.webbeans.test.mock.MockContainerImpl;
+import org.jboss.webbeans.util.Reflections;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * Unit tests for the implementation of Observer.
+ *
+ * @author David Allen
+ *
+ */
+public class ObserverTest
+{
+ private ContainerImpl container;
+
+ public class Event
+ {
+ // Simple class used for testing
+ }
+
+ public class AnObserver
+ {
+ public void observe(@Observes Event e)
+ {
+ // An observer method
+ }
+ }
+
+ @BeforeMethod
+ public void before()
+ {
+ List<Annotation> enabledDeploymentTypes = new ArrayList<Annotation>();
+ enabledDeploymentTypes.add(new StandardBinding());
+ enabledDeploymentTypes.add(new AnotherDeploymentTypeBinding());
+ container = new MockContainerImpl(enabledDeploymentTypes);
+
+ initStereotypes(container);
+ }
+
+ private void initStereotypes(ContainerImpl container)
+ {
+ container.getModelManager().addStereotype(new StereotypeModel(new SimpleAnnotatedType(AnimalStereotype.class)));
+ container.getModelManager().addStereotype(new StereotypeModel(new SimpleAnnotatedType(FishStereotype.class)));
+ container.getModelManager().addStereotype(new StereotypeModel(new SimpleAnnotatedType(RiverFishStereotype.class)));
+ container.getModelManager().addStereotype(new StereotypeModel(new SimpleAnnotatedType(RequestScopedAnimalStereotype.class)));
+ }
+
+
+ /**
+ * Test method for {@link org.jboss.webbeans.event.ObserverImpl#getEventBindingTypes()}.
+ */
+ @SuppressWarnings("unchecked")
+ @Test(groups="eventbus")
+ public final void testGetEventBindingTypes() throws Exception
+ {
+ // Create an observer with known binding types
+ Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(Asynchronous.class, new AsynchronousBinding());
+ AnnotatedType annotatedItem = new SimpleAnnotatedType(Tuna.class, annotations);
+ SimpleComponentModel<Tuna> tuna = new SimpleComponentModel<Tuna>(new SimpleAnnotatedType(Tuna.class), annotatedItem, container);
+ assert tuna.getDeploymentType().annotationType().equals(Production.class);
+ ObserverMethod om = new ObserverMethod(AnObserver.class.getMethod("observe", new Class[]{Event.class}));
+
+ Observer<Event> o = new ObserverImpl<Event>(tuna, om, Event.class);
+ assert o.getEventBindingTypes().size() == 1;
+ assert Reflections.annotationSetMatches(o.getEventBindingTypes(), Asynchronous.class);
+ assert o.getEventType().equals(Event.class);
+ }
+
+ /**
+ * Test method for {@link org.jboss.webbeans.event.ObserverImpl#getEventType()}.
+ */
+ @Test(groups="eventbus")
+ public final void testGetEventType()
+ {
+ //TODO Implement
+ }
+
+ /**
+ * Test method for {@link org.jboss.webbeans.event.ObserverImpl#notify(javax.webbeans.Container, java.lang.Object)}.
+ */
+ @Test(groups="eventbus")
+ public final void testNotify()
+ {
+ //TODO Implement
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java (from rev 99, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,32 @@
+package org.jboss.webbeans.test;
+
+import java.lang.annotation.Annotation;
+import java.util.HashMap;
+
+import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.introspector.AnnotatedType;
+import org.jboss.webbeans.introspector.SimpleAnnotatedType;
+import org.jboss.webbeans.test.mock.MockContainerImpl;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class ProducerExpressionComponentModelTest
+{
+
+ private ContainerImpl container;
+ private AnnotatedType<?> emptyAnnotatedItem;
+
+ @BeforeMethod
+ public void before()
+ {
+ emptyAnnotatedItem = new SimpleAnnotatedType(null, new HashMap<Class<? extends Annotation>, Annotation>());
+ container = new MockContainerImpl(null);
+ }
+
+ @Test
+ public void testApiTypes()
+ {
+
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentModelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentTest.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerExpressionComponentTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -1,32 +0,0 @@
-package org.jboss.webbeans.test;
-
-import java.lang.annotation.Annotation;
-import java.util.HashMap;
-
-import org.jboss.webbeans.ContainerImpl;
-import org.jboss.webbeans.introspector.AnnotatedType;
-import org.jboss.webbeans.introspector.SimpleAnnotatedType;
-import org.jboss.webbeans.test.mock.MockContainerImpl;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ProducerExpressionComponentTest
-{
-
- private ContainerImpl container;
- private AnnotatedType<?> emptyAnnotatedItem;
-
- @Before
- public void before()
- {
- emptyAnnotatedItem = new SimpleAnnotatedType(null, new HashMap<Class<? extends Annotation>, Annotation>());
- container = new MockContainerImpl(null);
- }
-
- @Test
- public void testApiTypes()
- {
-
- }
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java (from rev 99, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,159 @@
+package org.jboss.webbeans.test;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+
+import javax.webbeans.Current;
+import javax.webbeans.Dependent;
+
+import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.introspector.AnnotatedType;
+import org.jboss.webbeans.introspector.SimpleAnnotatedMethod;
+import org.jboss.webbeans.introspector.SimpleAnnotatedType;
+import org.jboss.webbeans.model.ProducerMethodComponentModel;
+import org.jboss.webbeans.model.SimpleComponentModel;
+import org.jboss.webbeans.test.annotations.Tame;
+import org.jboss.webbeans.test.components.Animal;
+import org.jboss.webbeans.test.components.BlackWidow;
+import org.jboss.webbeans.test.components.DaddyLongLegs;
+import org.jboss.webbeans.test.components.DeadlyAnimal;
+import org.jboss.webbeans.test.components.DeadlySpider;
+import org.jboss.webbeans.test.components.LadybirdSpider;
+import org.jboss.webbeans.test.components.Spider;
+import org.jboss.webbeans.test.components.SpiderProducer;
+import org.jboss.webbeans.test.components.Tarantula;
+import org.jboss.webbeans.test.components.TrapdoorSpider;
+import org.jboss.webbeans.test.components.broken.ComponentWithFinalProducerMethod;
+import org.jboss.webbeans.test.components.broken.ComponentWithStaticProducerMethod;
+import org.jboss.webbeans.test.mock.MockContainerImpl;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class ProducerMethodComponentModelTest
+{
+
+ private ContainerImpl container;
+ private AnnotatedType<?> emptyAnnotatedItem;
+
+ @BeforeMethod
+ public void before()
+ {
+ emptyAnnotatedItem = new SimpleAnnotatedType(null, new HashMap<Class<? extends Annotation>, Annotation>());
+ container = new MockContainerImpl(null);
+ }
+
+ @Test @SpecAssertion(section="3.3")
+ public void testStaticMethod() throws SecurityException, NoSuchMethodException
+ {
+ SimpleComponentModel<ComponentWithStaticProducerMethod> componentModel = new SimpleComponentModel<ComponentWithStaticProducerMethod>(new SimpleAnnotatedType<ComponentWithStaticProducerMethod>(ComponentWithStaticProducerMethod.class), emptyAnnotatedItem, container);
+ container.getModelManager().addComponentModel(componentModel);
+ Method method = ComponentWithStaticProducerMethod.class.getMethod("getString");
+ boolean exception = false;
+ try
+ {
+ new ProducerMethodComponentModel<String>(new SimpleAnnotatedMethod(method), container);
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+ }
+
+ @Test @SpecAssertion(section="3.3")
+ public void testApiTypes() throws SecurityException, NoSuchMethodException
+ {
+ SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
+ container.getModelManager().addComponentModel(componentModel);
+ Method method = SpiderProducer.class.getMethod("produceTarantula");
+ ProducerMethodComponentModel<Tarantula> tarantulaModel = new ProducerMethodComponentModel<Tarantula>(new SimpleAnnotatedMethod(method), container);
+ assert tarantulaModel.getApiTypes().contains(Tarantula.class);
+ assert tarantulaModel.getApiTypes().contains(DeadlySpider.class);
+ assert tarantulaModel.getApiTypes().contains(Spider.class);
+ assert tarantulaModel.getApiTypes().contains(Animal.class);
+ assert tarantulaModel.getApiTypes().contains(DeadlyAnimal.class);
+ assert !tarantulaModel.getApiTypes().contains(Object.class);
+ }
+
+ @Test @SpecAssertion(section="3.3.1")
+ public void testDefaultBindingType() throws SecurityException, NoSuchMethodException
+ {
+ SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
+ container.getModelManager().addComponentModel(componentModel);
+ Method method = SpiderProducer.class.getMethod("produceTarantula");
+ ProducerMethodComponentModel<Tarantula> tarantulaModel = new ProducerMethodComponentModel<Tarantula>(new SimpleAnnotatedMethod(method), container);
+ assert tarantulaModel.getBindingTypes().size() == 1;
+ assert tarantulaModel.getBindingTypes().iterator().next().annotationType().equals(Current.class);
+ }
+
+ @Test
+ public void testBindingType() throws SecurityException, NoSuchMethodException
+ {
+ SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
+ container.getModelManager().addComponentModel(componentModel);
+ Method method = SpiderProducer.class.getMethod("produceTameTarantula");
+ ProducerMethodComponentModel<Tarantula> tarantulaModel = new ProducerMethodComponentModel<Tarantula>(new SimpleAnnotatedMethod(method), container);
+ assert tarantulaModel.getBindingTypes().size() == 1;
+ assert tarantulaModel.getBindingTypes().iterator().next().annotationType().equals(Tame.class);
+ }
+
+ @Test @SpecAssertion(section="3.3")
+ public void testFinalMethod() throws SecurityException, NoSuchMethodException
+ {
+ SimpleComponentModel<ComponentWithFinalProducerMethod> componentModel = new SimpleComponentModel<ComponentWithFinalProducerMethod>(new SimpleAnnotatedType<ComponentWithFinalProducerMethod>(ComponentWithFinalProducerMethod.class), emptyAnnotatedItem, container);
+ container.getModelManager().addComponentModel(componentModel);
+ Method method = ComponentWithFinalProducerMethod.class.getMethod("getString");
+ boolean exception = false;
+ try
+ {
+ new ProducerMethodComponentModel<String>(new SimpleAnnotatedMethod(method), container);
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+ }
+
+ @Test @SpecAssertion(section="3.3")
+ public void testFinalMethodWithDependentScope() throws SecurityException, NoSuchMethodException
+ {
+ SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
+ container.getModelManager().addComponentModel(componentModel);
+ Method method = SpiderProducer.class.getMethod("produceTrapdoorSpider");
+ ProducerMethodComponentModel<TrapdoorSpider> trapdoorSpiderModel = new ProducerMethodComponentModel<TrapdoorSpider>(new SimpleAnnotatedMethod(method), container);
+ assert trapdoorSpiderModel.getScopeType().annotationType().equals(Dependent.class);
+ }
+
+ @Test @SpecAssertion(section="3.3.6")
+ public void testNamedMethod() throws SecurityException, NoSuchMethodException
+ {
+ SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
+ container.getModelManager().addComponentModel(componentModel);
+ Method method = SpiderProducer.class.getMethod("produceBlackWidow");
+ ProducerMethodComponentModel<BlackWidow> blackWidowSpiderModel = new ProducerMethodComponentModel<BlackWidow>(new SimpleAnnotatedMethod(method), container);
+ assert blackWidowSpiderModel.getName().equals("blackWidow");
+ }
+
+ @Test @SpecAssertion(section="3.3.6")
+ public void testDefaultNamedMethod() throws SecurityException, NoSuchMethodException
+ {
+ SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
+ container.getModelManager().addComponentModel(componentModel);
+ Method method = SpiderProducer.class.getMethod("produceDaddyLongLegs");
+ ProducerMethodComponentModel<DaddyLongLegs> daddyLongLegsSpiderModel = new ProducerMethodComponentModel<DaddyLongLegs>(new SimpleAnnotatedMethod(method), container);
+ assert daddyLongLegsSpiderModel.getName().equals("produceDaddyLongLegs");
+ }
+
+ @Test @SpecAssertion(section="3.3.6")
+ public void testDefaultNamedJavaBeanMethod() throws SecurityException, NoSuchMethodException
+ {
+ SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
+ container.getModelManager().addComponentModel(componentModel);
+ Method method = SpiderProducer.class.getMethod("getLadybirdSpider");
+ ProducerMethodComponentModel<LadybirdSpider> ladybirdSpiderModel = new ProducerMethodComponentModel<LadybirdSpider>(new SimpleAnnotatedMethod(method), container);
+ assert ladybirdSpiderModel.getName().equals("ladybirdSpider");
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentModelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentTest.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodComponentTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -1,159 +0,0 @@
-package org.jboss.webbeans.test;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-
-import javax.webbeans.Current;
-import javax.webbeans.Dependent;
-
-import org.jboss.webbeans.ContainerImpl;
-import org.jboss.webbeans.introspector.AnnotatedType;
-import org.jboss.webbeans.introspector.SimpleAnnotatedMethod;
-import org.jboss.webbeans.introspector.SimpleAnnotatedType;
-import org.jboss.webbeans.model.ProducerMethodComponentModel;
-import org.jboss.webbeans.model.SimpleComponentModel;
-import org.jboss.webbeans.test.annotations.Tame;
-import org.jboss.webbeans.test.components.Animal;
-import org.jboss.webbeans.test.components.BlackWidow;
-import org.jboss.webbeans.test.components.DaddyLongLegs;
-import org.jboss.webbeans.test.components.DeadlyAnimal;
-import org.jboss.webbeans.test.components.DeadlySpider;
-import org.jboss.webbeans.test.components.LadybirdSpider;
-import org.jboss.webbeans.test.components.Spider;
-import org.jboss.webbeans.test.components.SpiderProducer;
-import org.jboss.webbeans.test.components.Tarantula;
-import org.jboss.webbeans.test.components.TrapdoorSpider;
-import org.jboss.webbeans.test.components.broken.ComponentWithFinalProducerMethod;
-import org.jboss.webbeans.test.components.broken.ComponentWithStaticProducerMethod;
-import org.jboss.webbeans.test.mock.MockContainerImpl;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ProducerMethodComponentTest
-{
-
- private ContainerImpl container;
- private AnnotatedType<?> emptyAnnotatedItem;
-
- @Before
- public void before()
- {
- emptyAnnotatedItem = new SimpleAnnotatedType(null, new HashMap<Class<? extends Annotation>, Annotation>());
- container = new MockContainerImpl(null);
- }
-
- @Test @SpecAssertion(section="3.3")
- public void testStaticMethod() throws SecurityException, NoSuchMethodException
- {
- SimpleComponentModel<ComponentWithStaticProducerMethod> componentModel = new SimpleComponentModel<ComponentWithStaticProducerMethod>(new SimpleAnnotatedType<ComponentWithStaticProducerMethod>(ComponentWithStaticProducerMethod.class), emptyAnnotatedItem, container);
- container.getModelManager().addComponentModel(componentModel);
- Method method = ComponentWithStaticProducerMethod.class.getMethod("getString");
- boolean exception = false;
- try
- {
- new ProducerMethodComponentModel<String>(new SimpleAnnotatedMethod(method), container);
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
- }
-
- @Test @SpecAssertion(section="3.3")
- public void testApiTypes() throws SecurityException, NoSuchMethodException
- {
- SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
- container.getModelManager().addComponentModel(componentModel);
- Method method = SpiderProducer.class.getMethod("produceTarantula");
- ProducerMethodComponentModel<Tarantula> tarantulaModel = new ProducerMethodComponentModel<Tarantula>(new SimpleAnnotatedMethod(method), container);
- assert tarantulaModel.getApiTypes().contains(Tarantula.class);
- assert tarantulaModel.getApiTypes().contains(DeadlySpider.class);
- assert tarantulaModel.getApiTypes().contains(Spider.class);
- assert tarantulaModel.getApiTypes().contains(Animal.class);
- assert tarantulaModel.getApiTypes().contains(DeadlyAnimal.class);
- assert !tarantulaModel.getApiTypes().contains(Object.class);
- }
-
- @Test @SpecAssertion(section="3.3.1")
- public void testDefaultBindingType() throws SecurityException, NoSuchMethodException
- {
- SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
- container.getModelManager().addComponentModel(componentModel);
- Method method = SpiderProducer.class.getMethod("produceTarantula");
- ProducerMethodComponentModel<Tarantula> tarantulaModel = new ProducerMethodComponentModel<Tarantula>(new SimpleAnnotatedMethod(method), container);
- assert tarantulaModel.getBindingTypes().size() == 1;
- assert tarantulaModel.getBindingTypes().iterator().next().annotationType().equals(Current.class);
- }
-
- @Test
- public void testBindingType() throws SecurityException, NoSuchMethodException
- {
- SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
- container.getModelManager().addComponentModel(componentModel);
- Method method = SpiderProducer.class.getMethod("produceTameTarantula");
- ProducerMethodComponentModel<Tarantula> tarantulaModel = new ProducerMethodComponentModel<Tarantula>(new SimpleAnnotatedMethod(method), container);
- assert tarantulaModel.getBindingTypes().size() == 1;
- assert tarantulaModel.getBindingTypes().iterator().next().annotationType().equals(Tame.class);
- }
-
- @Test @SpecAssertion(section="3.3")
- public void testFinalMethod() throws SecurityException, NoSuchMethodException
- {
- SimpleComponentModel<ComponentWithFinalProducerMethod> componentModel = new SimpleComponentModel<ComponentWithFinalProducerMethod>(new SimpleAnnotatedType<ComponentWithFinalProducerMethod>(ComponentWithFinalProducerMethod.class), emptyAnnotatedItem, container);
- container.getModelManager().addComponentModel(componentModel);
- Method method = ComponentWithFinalProducerMethod.class.getMethod("getString");
- boolean exception = false;
- try
- {
- new ProducerMethodComponentModel<String>(new SimpleAnnotatedMethod(method), container);
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
- }
-
- @Test @SpecAssertion(section="3.3")
- public void testFinalMethodWithDependentScope() throws SecurityException, NoSuchMethodException
- {
- SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
- container.getModelManager().addComponentModel(componentModel);
- Method method = SpiderProducer.class.getMethod("produceTrapdoorSpider");
- ProducerMethodComponentModel<TrapdoorSpider> trapdoorSpiderModel = new ProducerMethodComponentModel<TrapdoorSpider>(new SimpleAnnotatedMethod(method), container);
- assert trapdoorSpiderModel.getScopeType().annotationType().equals(Dependent.class);
- }
-
- @Test @SpecAssertion(section="3.3.6")
- public void testNamedMethod() throws SecurityException, NoSuchMethodException
- {
- SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
- container.getModelManager().addComponentModel(componentModel);
- Method method = SpiderProducer.class.getMethod("produceBlackWidow");
- ProducerMethodComponentModel<BlackWidow> blackWidowSpiderModel = new ProducerMethodComponentModel<BlackWidow>(new SimpleAnnotatedMethod(method), container);
- assert blackWidowSpiderModel.getName().equals("blackWidow");
- }
-
- @Test @SpecAssertion(section="3.3.6")
- public void testDefaultNamedMethod() throws SecurityException, NoSuchMethodException
- {
- SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
- container.getModelManager().addComponentModel(componentModel);
- Method method = SpiderProducer.class.getMethod("produceDaddyLongLegs");
- ProducerMethodComponentModel<DaddyLongLegs> daddyLongLegsSpiderModel = new ProducerMethodComponentModel<DaddyLongLegs>(new SimpleAnnotatedMethod(method), container);
- assert daddyLongLegsSpiderModel.getName().equals("produceDaddyLongLegs");
- }
-
- @Test @SpecAssertion(section="3.3.6")
- public void testDefaultNamedJavaBeanMethod() throws SecurityException, NoSuchMethodException
- {
- SimpleComponentModel<SpiderProducer> componentModel = new SimpleComponentModel<SpiderProducer>(new SimpleAnnotatedType<SpiderProducer>(SpiderProducer.class), emptyAnnotatedItem, container);
- container.getModelManager().addComponentModel(componentModel);
- Method method = SpiderProducer.class.getMethod("getLadybirdSpider");
- ProducerMethodComponentModel<LadybirdSpider> ladybirdSpiderModel = new ProducerMethodComponentModel<LadybirdSpider>(new SimpleAnnotatedMethod(method), container);
- assert ladybirdSpiderModel.getName().equals("ladybirdSpider");
- }
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java (from rev 99, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,64 @@
+package org.jboss.webbeans.test;
+
+import java.lang.annotation.Annotation;
+import java.util.HashMap;
+
+import javax.webbeans.Current;
+
+import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.introspector.AnnotatedType;
+import org.jboss.webbeans.introspector.SimpleAnnotatedType;
+import org.jboss.webbeans.model.RemoteComponentModel;
+import org.jboss.webbeans.test.annotations.Tame;
+import org.jboss.webbeans.test.components.Animal;
+import org.jboss.webbeans.test.components.Baboon;
+import org.jboss.webbeans.test.components.TameApe;
+import org.jboss.webbeans.test.mock.MockContainerImpl;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class RemoteComponentModelTest
+{
+
+ private ContainerImpl container;
+ private AnnotatedType<?> emptyAnnotatedItem;
+
+ @BeforeMethod
+ public void before()
+ {
+ emptyAnnotatedItem = new SimpleAnnotatedType(null, new HashMap<Class<? extends Annotation>, Annotation>());
+ container = new MockContainerImpl(null);
+ }
+
+ @Test @SpecAssertion(section="3.5")
+ public void testApiTypes() throws SecurityException, NoSuchMethodException
+ {
+ RemoteComponentModel<Baboon> baboonModel = new RemoteComponentModel<Baboon>(new SimpleAnnotatedType<Baboon>(Baboon.class), emptyAnnotatedItem, container);
+ assert baboonModel.getApiTypes().contains(Baboon.class);
+ assert baboonModel.getApiTypes().contains(Animal.class);
+ }
+
+ @Test @SpecAssertion(section="3.5.4")
+ public void testDefaultName() throws SecurityException, NoSuchMethodException
+ {
+ RemoteComponentModel<TameApe> tameApeModel = new RemoteComponentModel<TameApe>(new SimpleAnnotatedType<TameApe>(TameApe.class), emptyAnnotatedItem, container);
+ assert tameApeModel.getName().equals("tameApe");
+ }
+
+ @Test @SpecAssertion(section="3.5.1")
+ public void testDefaultBindingType() throws SecurityException, NoSuchMethodException
+ {
+ RemoteComponentModel<Baboon> baboonModel = new RemoteComponentModel<Baboon>(new SimpleAnnotatedType<Baboon>(Baboon.class), emptyAnnotatedItem, container);
+ assert baboonModel.getBindingTypes().size() == 1;
+ assert baboonModel.getBindingTypes().iterator().next().annotationType().equals(Current.class);
+ }
+
+ @Test
+ public void testBindingType() throws SecurityException, NoSuchMethodException
+ {
+ RemoteComponentModel<TameApe> tameApeModel = new RemoteComponentModel<TameApe>(new SimpleAnnotatedType<TameApe>(TameApe.class), emptyAnnotatedItem, container);
+ assert tameApeModel.getBindingTypes().size() == 1;
+ assert tameApeModel.getBindingTypes().iterator().next().annotationType().equals(Tame.class);
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentModelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentTest.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/RemoteComponentTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -1,64 +0,0 @@
-package org.jboss.webbeans.test;
-
-import java.lang.annotation.Annotation;
-import java.util.HashMap;
-
-import javax.webbeans.Current;
-
-import org.jboss.webbeans.ContainerImpl;
-import org.jboss.webbeans.introspector.AnnotatedType;
-import org.jboss.webbeans.introspector.SimpleAnnotatedType;
-import org.jboss.webbeans.model.RemoteComponentModel;
-import org.jboss.webbeans.test.annotations.Tame;
-import org.jboss.webbeans.test.components.Animal;
-import org.jboss.webbeans.test.components.Baboon;
-import org.jboss.webbeans.test.components.TameApe;
-import org.jboss.webbeans.test.mock.MockContainerImpl;
-import org.junit.Before;
-import org.junit.Test;
-
-public class RemoteComponentTest
-{
-
- private ContainerImpl container;
- private AnnotatedType<?> emptyAnnotatedItem;
-
- @Before
- public void before()
- {
- emptyAnnotatedItem = new SimpleAnnotatedType(null, new HashMap<Class<? extends Annotation>, Annotation>());
- container = new MockContainerImpl(null);
- }
-
- @Test @SpecAssertion(section="3.5")
- public void testApiTypes() throws SecurityException, NoSuchMethodException
- {
- RemoteComponentModel<Baboon> baboonModel = new RemoteComponentModel<Baboon>(new SimpleAnnotatedType<Baboon>(Baboon.class), emptyAnnotatedItem, container);
- assert baboonModel.getApiTypes().contains(Baboon.class);
- assert baboonModel.getApiTypes().contains(Animal.class);
- }
-
- @Test @SpecAssertion(section="3.5.4")
- public void testDefaultName() throws SecurityException, NoSuchMethodException
- {
- RemoteComponentModel<TameApe> tameApeModel = new RemoteComponentModel<TameApe>(new SimpleAnnotatedType<TameApe>(TameApe.class), emptyAnnotatedItem, container);
- assert tameApeModel.getName().equals("tameApe");
- }
-
- @Test @SpecAssertion(section="3.5.1")
- public void testDefaultBindingType() throws SecurityException, NoSuchMethodException
- {
- RemoteComponentModel<Baboon> baboonModel = new RemoteComponentModel<Baboon>(new SimpleAnnotatedType<Baboon>(Baboon.class), emptyAnnotatedItem, container);
- assert baboonModel.getBindingTypes().size() == 1;
- assert baboonModel.getBindingTypes().iterator().next().annotationType().equals(Current.class);
- }
-
- @Test
- public void testBindingType() throws SecurityException, NoSuchMethodException
- {
- RemoteComponentModel<TameApe> tameApeModel = new RemoteComponentModel<TameApe>(new SimpleAnnotatedType<TameApe>(TameApe.class), emptyAnnotatedItem, container);
- assert tameApeModel.getBindingTypes().size() == 1;
- assert tameApeModel.getBindingTypes().iterator().next().annotationType().equals(Tame.class);
- }
-
-}
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentLifecycleTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentLifecycleTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentLifecycleTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.test;
+
+import org.testng.annotations.Test;
+
+public class SimpleComponentLifecycleTest
+{
+
+ @Test(groups="componentLifecycle") @SpecAssertion(section="3.1.3")
+ public void testInjectionOfParametersIntoComponentConstructor()
+ {
+ // TODO Placeholder
+ assert false;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentLifecycleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleComponentModelTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -63,8 +63,8 @@
import org.jboss.webbeans.test.components.broken.OuterComponent.InnerComponent;
import org.jboss.webbeans.test.mock.MockContainerImpl;
import org.jboss.webbeans.util.Reflections;
-import org.junit.Before;
-import org.junit.Test;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
public class SimpleComponentModelTest
{
@@ -73,7 +73,7 @@
private AnnotatedType emptyAnnotatedItem;
- @Before
+ @BeforeMethod
public void before()
{
emptyAnnotatedItem = new SimpleAnnotatedType(null, new HashMap<Class<? extends Annotation>, Annotation>());
@@ -578,4 +578,5 @@
}
}
+
}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeMetaModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeMetaModelTest.java 2008-09-11 11:23:58 UTC (rev 103)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeMetaModelTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -1,152 +0,0 @@
-package org.jboss.webbeans.test;
-
-import java.util.Arrays;
-
-import javax.webbeans.Component;
-import javax.webbeans.Model;
-import javax.webbeans.Production;
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.introspector.SimpleAnnotatedType;
-import org.jboss.webbeans.model.StereotypeModel;
-import org.jboss.webbeans.test.annotations.AnimalOrderStereotype;
-import org.jboss.webbeans.test.annotations.AnimalStereotype;
-import org.jboss.webbeans.test.annotations.RequestScopedAnimalStereotype;
-import org.jboss.webbeans.test.annotations.broken.StereotypeWithBindingTypes;
-import org.jboss.webbeans.test.annotations.broken.StereotypeWithNonEmptyNamed;
-import org.jboss.webbeans.test.annotations.broken.StereotypeWithTooManyDeploymentTypes;
-import org.jboss.webbeans.test.annotations.broken.StereotypeWithTooManyScopeTypes;
-import org.jboss.webbeans.test.components.Animal;
-import org.jboss.webbeans.test.components.Order;
-import org.junit.Test;
-
-public class StereotypeMetaModelTest
-{
-
- @Test
- public void testComponentStereotype()
- {
- StereotypeModel componentStereotype = new StereotypeModel(new SimpleAnnotatedType(Component.class));
-
- assert Production.class.equals(componentStereotype.getDefaultDeploymentType().annotationType());
- assert componentStereotype.getDefaultScopeType() == null;
- assert componentStereotype.getInterceptorBindings().size() == 0;
- assert componentStereotype.getRequiredTypes().size() == 0;
- assert componentStereotype.getSupportedScopes().size() == 0;
- assert !componentStereotype.isComponentNameDefaulted();
- }
-
- @Test
- public void testModelStereotype()
- {
- StereotypeModel modelStereotype = new StereotypeModel(new SimpleAnnotatedType(Model.class));
- assert Production.class.equals(modelStereotype.getDefaultDeploymentType().annotationType());
- assert RequestScoped.class.equals(modelStereotype.getDefaultScopeType().annotationType());
- assert modelStereotype.isComponentNameDefaulted();
- assert modelStereotype.getInterceptorBindings().size() == 0;
- assert modelStereotype.getRequiredTypes().size() == 0;
- assert modelStereotype.getSupportedScopes().size() == 0;
- }
-
- @Test
- public void testAnimalStereotype()
- {
- StereotypeModel animalStereotype = new StereotypeModel(new SimpleAnnotatedType(AnimalStereotype.class));
- assert animalStereotype.getDefaultScopeType().annotationType().equals(RequestScoped.class);
- assert animalStereotype.getInterceptorBindings().size() == 0;
- assert animalStereotype.getRequiredTypes().size() == 1;
- assert animalStereotype.getRequiredTypes().contains(Animal.class);
- assert animalStereotype.getSupportedScopes().size() == 0;
- assert !animalStereotype.isComponentNameDefaulted();
- assert animalStereotype.getDefaultDeploymentType() == null;
- }
-
- @Test
- public void testAnimalOrderStereotype()
- {
- StereotypeModel animalStereotype = new StereotypeModel(new SimpleAnnotatedType(AnimalOrderStereotype.class));
- assert animalStereotype.getDefaultScopeType() == null;
- assert animalStereotype.getInterceptorBindings().size() == 0;
- assert animalStereotype.getRequiredTypes().size() == 2;
- Class<?> [] requiredTypes = {Animal.class, Order.class};
- assert animalStereotype.getRequiredTypes().containsAll(Arrays.asList(requiredTypes));
- assert animalStereotype.getSupportedScopes().size() == 0;
- assert !animalStereotype.isComponentNameDefaulted();
- assert animalStereotype.getDefaultDeploymentType() == null;
- }
-
- @Test
- public void testRequestScopedAnimalStereotype()
- {
- StereotypeModel animalStereotype = new StereotypeModel(new SimpleAnnotatedType(RequestScopedAnimalStereotype.class));
- assert animalStereotype.getDefaultScopeType() == null;
- assert animalStereotype.getInterceptorBindings().size() == 0;
- assert animalStereotype.getRequiredTypes().size() == 1;
- assert Animal.class.equals(animalStereotype.getRequiredTypes().iterator().next());
- assert animalStereotype.getSupportedScopes().size() == 1;
- assert animalStereotype.getSupportedScopes().contains(RequestScoped.class);
- assert !animalStereotype.isComponentNameDefaulted();
- assert animalStereotype.getDefaultDeploymentType() == null;
- }
-
- @Test
- public void testStereotypeWithTooManyScopeTypes()
- {
- boolean exception = false;
- try
- {
- new StereotypeModel(new SimpleAnnotatedType(StereotypeWithTooManyScopeTypes.class));
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
- }
-
- @Test
- public void testStereotypeWithTooManyDeploymentTypes()
- {
- boolean exception = false;
- try
- {
- new StereotypeModel(new SimpleAnnotatedType(StereotypeWithTooManyDeploymentTypes.class));
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
- }
-
- @Test
- public void testStereotypeWithNonEmptyNamed()
- {
- boolean exception = false;
- try
- {
- new StereotypeModel(new SimpleAnnotatedType(StereotypeWithNonEmptyNamed.class));
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
- }
-
- @Test
- public void testStereotypeWithBindingTypes()
- {
- boolean exception = false;
- try
- {
- new StereotypeModel(new SimpleAnnotatedType(StereotypeWithBindingTypes.class));
- }
- catch (Exception e)
- {
- exception = true;
- }
- assert exception;
- }
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeModelTest.java (from rev 95, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeMetaModelTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeModelTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeModelTest.java 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,152 @@
+package org.jboss.webbeans.test;
+
+import java.util.Arrays;
+
+import javax.webbeans.Component;
+import javax.webbeans.Model;
+import javax.webbeans.Production;
+import javax.webbeans.RequestScoped;
+
+import org.jboss.webbeans.introspector.SimpleAnnotatedType;
+import org.jboss.webbeans.model.StereotypeModel;
+import org.jboss.webbeans.test.annotations.AnimalOrderStereotype;
+import org.jboss.webbeans.test.annotations.AnimalStereotype;
+import org.jboss.webbeans.test.annotations.RequestScopedAnimalStereotype;
+import org.jboss.webbeans.test.annotations.broken.StereotypeWithBindingTypes;
+import org.jboss.webbeans.test.annotations.broken.StereotypeWithNonEmptyNamed;
+import org.jboss.webbeans.test.annotations.broken.StereotypeWithTooManyDeploymentTypes;
+import org.jboss.webbeans.test.annotations.broken.StereotypeWithTooManyScopeTypes;
+import org.jboss.webbeans.test.components.Animal;
+import org.jboss.webbeans.test.components.Order;
+import org.testng.annotations.Test;
+
+public class StereotypeModelTest
+{
+
+ @Test
+ public void testComponentStereotype()
+ {
+ StereotypeModel componentStereotype = new StereotypeModel(new SimpleAnnotatedType(Component.class));
+
+ assert Production.class.equals(componentStereotype.getDefaultDeploymentType().annotationType());
+ assert componentStereotype.getDefaultScopeType() == null;
+ assert componentStereotype.getInterceptorBindings().size() == 0;
+ assert componentStereotype.getRequiredTypes().size() == 0;
+ assert componentStereotype.getSupportedScopes().size() == 0;
+ assert !componentStereotype.isComponentNameDefaulted();
+ }
+
+ @Test
+ public void testModelStereotype()
+ {
+ StereotypeModel modelStereotype = new StereotypeModel(new SimpleAnnotatedType(Model.class));
+ assert Production.class.equals(modelStereotype.getDefaultDeploymentType().annotationType());
+ assert RequestScoped.class.equals(modelStereotype.getDefaultScopeType().annotationType());
+ assert modelStereotype.isComponentNameDefaulted();
+ assert modelStereotype.getInterceptorBindings().size() == 0;
+ assert modelStereotype.getRequiredTypes().size() == 0;
+ assert modelStereotype.getSupportedScopes().size() == 0;
+ }
+
+ @Test
+ public void testAnimalStereotype()
+ {
+ StereotypeModel animalStereotype = new StereotypeModel(new SimpleAnnotatedType(AnimalStereotype.class));
+ assert animalStereotype.getDefaultScopeType().annotationType().equals(RequestScoped.class);
+ assert animalStereotype.getInterceptorBindings().size() == 0;
+ assert animalStereotype.getRequiredTypes().size() == 1;
+ assert animalStereotype.getRequiredTypes().contains(Animal.class);
+ assert animalStereotype.getSupportedScopes().size() == 0;
+ assert !animalStereotype.isComponentNameDefaulted();
+ assert animalStereotype.getDefaultDeploymentType() == null;
+ }
+
+ @Test
+ public void testAnimalOrderStereotype()
+ {
+ StereotypeModel animalStereotype = new StereotypeModel(new SimpleAnnotatedType(AnimalOrderStereotype.class));
+ assert animalStereotype.getDefaultScopeType() == null;
+ assert animalStereotype.getInterceptorBindings().size() == 0;
+ assert animalStereotype.getRequiredTypes().size() == 2;
+ Class<?> [] requiredTypes = {Animal.class, Order.class};
+ assert animalStereotype.getRequiredTypes().containsAll(Arrays.asList(requiredTypes));
+ assert animalStereotype.getSupportedScopes().size() == 0;
+ assert !animalStereotype.isComponentNameDefaulted();
+ assert animalStereotype.getDefaultDeploymentType() == null;
+ }
+
+ @Test
+ public void testRequestScopedAnimalStereotype()
+ {
+ StereotypeModel animalStereotype = new StereotypeModel(new SimpleAnnotatedType(RequestScopedAnimalStereotype.class));
+ assert animalStereotype.getDefaultScopeType() == null;
+ assert animalStereotype.getInterceptorBindings().size() == 0;
+ assert animalStereotype.getRequiredTypes().size() == 1;
+ assert Animal.class.equals(animalStereotype.getRequiredTypes().iterator().next());
+ assert animalStereotype.getSupportedScopes().size() == 1;
+ assert animalStereotype.getSupportedScopes().contains(RequestScoped.class);
+ assert !animalStereotype.isComponentNameDefaulted();
+ assert animalStereotype.getDefaultDeploymentType() == null;
+ }
+
+ @Test
+ public void testStereotypeWithTooManyScopeTypes()
+ {
+ boolean exception = false;
+ try
+ {
+ new StereotypeModel(new SimpleAnnotatedType(StereotypeWithTooManyScopeTypes.class));
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+ }
+
+ @Test
+ public void testStereotypeWithTooManyDeploymentTypes()
+ {
+ boolean exception = false;
+ try
+ {
+ new StereotypeModel(new SimpleAnnotatedType(StereotypeWithTooManyDeploymentTypes.class));
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+ }
+
+ @Test
+ public void testStereotypeWithNonEmptyNamed()
+ {
+ boolean exception = false;
+ try
+ {
+ new StereotypeModel(new SimpleAnnotatedType(StereotypeWithNonEmptyNamed.class));
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+ }
+
+ @Test
+ public void testStereotypeWithBindingTypes()
+ {
+ boolean exception = false;
+ try
+ {
+ new StereotypeModel(new SimpleAnnotatedType(StereotypeWithBindingTypes.class));
+ }
+ catch (Exception e)
+ {
+ exception = true;
+ }
+ assert exception;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypeModelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/testng.xml
===================================================================
--- ri/trunk/webbeans-ri/testng.xml (rev 0)
+++ ri/trunk/webbeans-ri/testng.xml 2008-09-11 11:24:52 UTC (rev 104)
@@ -0,0 +1,71 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+
+<suite name="WebBeans RI" verbose="1">
+
+ <test name="Reflection Support">
+ <classes>
+ <class name="org.jboss.webbeans.test.ClassAnnotatedItemTest" />
+ <class name="org.jboss.webbeans.test.ConstructorModelTest" />
+ </classes>
+ </test>
+
+ <test name="Deployment">
+ <groups>
+ <run>
+ <exclude name="specialization" />
+ <exclude name="componentLifecycle" />
+ </run>
+ </groups>
+ <classes>
+ <class name="org.jboss.webbeans.test.ComponentDeploymentTest" />
+ <class name="org.jboss.webbeans.test.DeploymentStrategyTest" />
+ </classes>
+ </test>
+
+ <test name="Component Model">
+ <classes>
+ <class name="org.jboss.webbeans.test.SimpleComponentModelTest" />
+ <class name="org.jboss.webbeans.test.EnterpriseComponentModelTest" />
+ <class name="org.jboss.webbeans.test.ProducerExpressionComponentModelTest" />
+ <class name="org.jboss.webbeans.test.ProducerMethodComponentModelTest" />
+ <class name="org.jboss.webbeans.test.RemoteComponentModelTest" />
+ <class name="org.jboss.webbeans.test.StereotypeModelTest" />
+ </classes>
+ </test>
+
+ <test name="Component Lifecycle">
+ <groups>
+ <run>
+ <exclude name="componentLifecycle" />
+ </run>
+ </groups>
+ <classes>
+ <class name="org.jboss.webbeans.test.SimpleComponentLifecycleTest" />
+ </classes>
+ </test>
+
+ <test name="Container">
+ <classes>
+ <class name="org.jboss.webbeans.test.ContainerTest" />
+ </classes>
+ </test>
+
+ <test name="EJB">
+ <classes>
+ <class name="org.jboss.webbeans.test.EjbMetaDataTest" />
+ </classes>
+ </test>
+
+ <test name="Event Bus">
+ <groups>
+ <run>
+ <exclude name="eventbus" />
+ </run>
+ </groups>
+ <classes>
+ <class name="org.jboss.webbeans.test.DeferredEventNotificationTest" />
+ <class name="org.jboss.webbeans.test.ObserverTest" />
+ </classes>
+ </test>
+
+</suite>
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/testng.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 2 months
[webbeans-commits] Webbeans SVN: r103 - ri/trunk.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-11 07:23:58 -0400 (Thu, 11 Sep 2008)
New Revision: 103
Modified:
ri/trunk/pom.xml
Log:
switch to testng
Modified: ri/trunk/pom.xml
===================================================================
--- ri/trunk/pom.xml 2008-09-10 19:05:06 UTC (rev 102)
+++ ri/trunk/pom.xml 2008-09-11 11:23:58 UTC (rev 103)
@@ -70,11 +70,12 @@
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.4</version>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.8</version>
+ <classifier>jdk15</classifier>
</dependency>
-
+
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>ejb-api</artifactId>
@@ -132,13 +133,6 @@
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.0</version>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkMode>always</forkMode>
- </configuration>
- </plugin>
</plugins>
</pluginManagement>
</build>
16 years, 2 months
[webbeans-commits] Webbeans SVN: r102 - ri/trunk/webbeans-ri.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-10 15:05:06 -0400 (Wed, 10 Sep 2008)
New Revision: 102
Modified:
ri/trunk/webbeans-ri/pom.xml
Log:
remove servlet and jta versions
Modified: ri/trunk/webbeans-ri/pom.xml
===================================================================
--- ri/trunk/webbeans-ri/pom.xml 2008-09-10 18:40:28 UTC (rev 101)
+++ ri/trunk/webbeans-ri/pom.xml 2008-09-10 19:05:06 UTC (rev 102)
@@ -27,10 +27,14 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.5</version>
</dependency>
<dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>javax.ejb</groupId>
<artifactId>ejb-api</artifactId>
<scope>test</scope>
16 years, 2 months
[webbeans-commits] Webbeans SVN: r101 - ri/trunk.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-10 14:40:28 -0400 (Wed, 10 Sep 2008)
New Revision: 101
Modified:
ri/trunk/pom.xml
Log:
add servlet and jta
Modified: ri/trunk/pom.xml
===================================================================
--- ri/trunk/pom.xml 2008-09-10 18:25:12 UTC (rev 100)
+++ ri/trunk/pom.xml 2008-09-10 18:40:28 UTC (rev 101)
@@ -92,6 +92,19 @@
<artifactId>javassist</artifactId>
<version>3.8.1.GA</version>
</dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.0.1B</version>
+ </dependency>
+
</dependencies>
</dependencyManagement>
16 years, 2 months
[webbeans-commits] Webbeans SVN: r100 - ri/trunk/webbeans-api/src/main/java/javax/webbeans.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-10 14:25:12 -0400 (Wed, 10 Sep 2008)
New Revision: 100
Added:
ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java
Log:
Add Observable annotation (thanks to David Allen)
Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java 2008-09-10 18:25:12 UTC (rev 100)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.webbeans;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Annotates a variable to be injected with an Event object that can be fired and
+ * observed by observer methods.
+ *
+ * @author David Allen
+ */
+
+@Target( { FIELD, LOCAL_VARIABLE, PARAMETER })
+@Retention(RUNTIME)
+@Documented
+public @interface Observable
+{
+
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 2 months