[webbeans-commits] Webbeans SVN: r48 - ri/trunk.
by webbeans-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2008-07-08 09:17:40 -0400 (Tue, 08 Jul 2008)
New Revision: 48
Added:
ri/trunk/webbeans-tck/
Log:
base directory for the Web Beans TCK project
15 years, 9 months
[webbeans-commits] Webbeans SVN: r47 - ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model.
by webbeans-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2008-07-07 14:46:28 -0400 (Mon, 07 Jul 2008)
New Revision: 47
Modified:
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/JmsComponentModel.java
Log:
Fixed a compile time error by casting to the specified return type - the same way that it is done in the AbstractComponentModel.
webbeans-impl/src/main/java/org/jboss/webbeans/model/JmsComponentModel.java:[43,21] type parameters of <T>java.lang.Class<? extends T> cannot be determined; no unique maximal instance exists for type variable T with upper bounds T,java.lang.Object,java.lang.Object
Modified: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/JmsComponentModel.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/JmsComponentModel.java 2008-07-06 18:46:14 UTC (rev 46)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/JmsComponentModel.java 2008-07-07 18:46:28 UTC (rev 47)
@@ -27,10 +27,11 @@
private String jndiName;
private ComponentConstructor<T> constructor;
+ @SuppressWarnings("unchecked")
public JmsComponentModel(AnnotatedItem xmlAnnotatedItem, ContainerImpl container)
{
AnnotatedItem annotatedItem = new MutableAnnotatedItem(null, new HashMap<Class<? extends Annotation>, Annotation>());
- type = initType(xmlAnnotatedItem);
+ type = (Class<? extends T>)initType(xmlAnnotatedItem);
bindingTypes = initBindingTypes(annotatedItem, xmlAnnotatedItem);
scopeType = new DependentBinding();
checkBindingTypesAllowed(bindingTypes, type);
15 years, 9 months
[webbeans-commits] Webbeans SVN: r46 - in ri/trunk: webbeans-api/.settings and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-07-06 14:46:14 -0400 (Sun, 06 Jul 2008)
New Revision: 46
Modified:
ri/trunk/pom.xml
ri/trunk/webbeans-api/.settings/org.eclipse.jdt.core.prefs
Log:
add jboss repo
Modified: ri/trunk/pom.xml
===================================================================
--- ri/trunk/pom.xml 2008-07-04 04:15:33 UTC (rev 45)
+++ ri/trunk/pom.xml 2008-07-06 18:46:14 UTC (rev 46)
@@ -31,13 +31,24 @@
</developer>
</developers>
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ </repositories>
-
<pluginRepositories>
<pluginRepository>
<id>snapshots.repository.codehaus.org</id>
<url>http://snapshots.repository.codehaus.org</url>
</pluginRepository>
+ <pluginRepository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ </pluginRepository>
</pluginRepositories>
<modules>
@@ -58,6 +69,13 @@
<artifactId>junit</artifactId>
<version>4.4</version>
</dependency>
+
+ <dependency>
+ <groupId>javax.ejb</groupId>
+ <artifactId>ejb-api</artifactId>
+ <version>3.0</version>
+ </dependency>
+
</dependencies>
</dependencyManagement>
Modified: ri/trunk/webbeans-api/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- ri/trunk/webbeans-api/.settings/org.eclipse.jdt.core.prefs 2008-07-04 04:15:33 UTC (rev 45)
+++ ri/trunk/webbeans-api/.settings/org.eclipse.jdt.core.prefs 2008-07-06 18:46:14 UTC (rev 46)
@@ -1,256 +1,259 @@
-#Mon Jun 23 17:31:13 BST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+#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
+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.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.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_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.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_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.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_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_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.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.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.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.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.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.insert_new_line_in_empty_type_declaration=insert
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_before_comma_in_method_declaration_parameters=do not 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.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_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_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_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.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_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_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_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_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_comma_in_constructor_declaration_throws=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_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_comma_in_constructor_declaration_parameters=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.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.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_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_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_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_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_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_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_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_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.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
15 years, 9 months
[webbeans-commits] Webbeans SVN: r45 - in ri/trunk/webbeans-impl: src/main/java/org/jboss/webbeans and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-07-04 00:15:33 -0400 (Fri, 04 Jul 2008)
New Revision: 45
Added:
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/servlet/
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java
Modified:
ri/trunk/webbeans-impl/pom.xml
Log:
added servlet api dependency
Modified: ri/trunk/webbeans-impl/pom.xml
===================================================================
--- ri/trunk/webbeans-impl/pom.xml 2008-07-04 03:27:53 UTC (rev 44)
+++ ri/trunk/webbeans-impl/pom.xml 2008-07-04 04:15:33 UTC (rev 45)
@@ -22,7 +22,13 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ </dependency>
<dependency>
<groupId>javax.ejb</groupId>
Added: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java (rev 0)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/servlet/WebBeansListener.java 2008-07-04 04:15:33 UTC (rev 45)
@@ -0,0 +1,36 @@
+package org.jboss.webbeans.servlet;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
+
+/**
+ *
+ * @author Shane Bryzak
+ *
+ */
+public class WebBeansListener implements ServletContextListener, HttpSessionListener
+{
+
+ public void contextDestroyed(ServletContextEvent arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void contextInitialized(ServletContextEvent arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void sessionCreated(HttpSessionEvent arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void sessionDestroyed(HttpSessionEvent arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
15 years, 9 months
[webbeans-commits] Webbeans SVN: r44 - ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-07-03 23:27:53 -0400 (Thu, 03 Jul 2008)
New Revision: 44
Added:
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/BasicContext.java
Log:
Context implementation
Added: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/BasicContext.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/BasicContext.java (rev 0)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/BasicContext.java 2008-07-04 03:27:53 UTC (rev 44)
@@ -0,0 +1,86 @@
+package org.jboss.webbeans;
+
+import java.lang.annotation.Annotation;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.webbeans.ComponentInstance;
+import javax.webbeans.Container;
+import javax.webbeans.Context;
+
+/**
+ * Basic implementation of javax.webbeans.Context, backed by a HashMap
+ *
+ * @author Shane Bryzak
+ *
+ */
+public class BasicContext implements Context
+{
+ private Map<ComponentInstance<?>, Object> values;
+ private Class<Annotation> scopeType;
+
+ public BasicContext(Class<Annotation> scopeType)
+ {
+ this.scopeType = scopeType;
+ values = new HashMap<ComponentInstance<?>,Object>();
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> T get(Container container, ComponentInstance<T> component, boolean create)
+ {
+ T instance = (T) values.get(component);
+ if (instance != null)
+ {
+ return instance;
+ }
+
+ if (!create)
+ {
+ return null;
+ }
+
+ // TODO should component creation be synchronized?
+
+ instance = component.create(container);
+
+ values.put(component, instance);
+ return instance;
+ }
+
+ public Class<Annotation> getScopeType()
+ {
+ return scopeType;
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> void remove(Container container, ComponentInstance<T> component)
+ {
+ T instance = (T) values.get(component);
+
+ if (instance != null)
+ {
+ values.remove(component);
+ component.destroy(container, instance);
+ }
+ else
+ {
+ // TODO is this the correct exception to throw? See section 9.1 of spec
+ throw new RuntimeException("Component " + component.getName() + " cannot be removed as it " +
+ "does not exist in [" + scopeType + "] context.");
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public void destroy(Container 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())
+ {
+ c.destroy(container, values.get(c));
+ }
+
+ values.clear();
+ }
+
+}
15 years, 9 months
[webbeans-commits] Webbeans SVN: r43 - in ri/trunk/webbeans-impl/src: main/java/org/jboss/webbeans/injectable and 4 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-07-03 18:23:57 -0400 (Thu, 03 Jul 2008)
New Revision: 43
Added:
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/injectable/JMSConstructor.java
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/JmsComponentModel.java
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/util/JNDI.java
Modified:
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbManager.java
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/util/Reflections.java
ri/trunk/webbeans-impl/src/test/java/org/jboss/webbeans/test/ComponentMetaModelTest.java
ri/trunk/webbeans-impl/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java
ri/trunk/webbeans-impl/src/test/java/org/jboss/webbeans/test/util/Util.java
Log:
ComponentModel for JMS - needs a lot of refactoring
Modified: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbManager.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbManager.java 2008-07-03 21:29:26 UTC (rev 42)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbManager.java 2008-07-03 22:23:57 UTC (rev 43)
@@ -5,7 +5,9 @@
import javax.webbeans.EnterpriseBeanLookup;
+import org.jboss.webbeans.util.JNDI;
+
public class EjbManager
{
@@ -24,12 +26,12 @@
{
if (ejb.getEjbLinkJndiName() != null)
{
- return (T) lookupInJndi(ejb.getEjbLinkJndiName());
+ return (T) JNDI.lookup(ejb.getEjbLinkJndiName());
}
try
{
// TODO How is a JNDI lookup failure shown to us?
- return (T) lookupInJndi(ejb.getDefaultJndiName());
+ return (T) JNDI.lookup(ejb.getDefaultJndiName());
}
catch (Exception e)
{
@@ -54,11 +56,5 @@
}
}
-
- protected Object lookupInJndi(String name)
- {
- // TODO Write JNDI lookup
- return null;
- }
}
Added: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/injectable/JMSConstructor.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/injectable/JMSConstructor.java (rev 0)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/injectable/JMSConstructor.java 2008-07-03 22:23:57 UTC (rev 43)
@@ -0,0 +1,24 @@
+package org.jboss.webbeans.injectable;
+
+import javax.webbeans.Container;
+
+import org.jboss.webbeans.util.JNDI;
+
+public class JMSConstructor<T> implements ComponentConstructor<T>
+{
+
+ Class<? extends T> type;
+
+ private String jndiName;
+
+ public JMSConstructor(String jndiName)
+ {
+ this.jndiName = jndiName;
+ }
+
+ public T invoke(Container container)
+ {
+ return JNDI.lookup(jndiName, type);
+ }
+
+}
Property changes on: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/injectable/JMSConstructor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java 2008-07-03 21:29:26 UTC (rev 42)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java 2008-07-03 22:23:57 UTC (rev 43)
@@ -1,7 +1,6 @@
package org.jboss.webbeans.model;
import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
@@ -13,7 +12,6 @@
import javax.webbeans.Dependent;
import javax.webbeans.DeploymentType;
import javax.webbeans.Destroys;
-import javax.webbeans.Initializer;
import javax.webbeans.Named;
import javax.webbeans.ScopeType;
@@ -23,7 +21,6 @@
import org.jboss.webbeans.bindings.ProductionBinding;
import org.jboss.webbeans.ejb.EjbMetaData;
import org.jboss.webbeans.injectable.ComponentConstructor;
-import org.jboss.webbeans.injectable.SimpleConstructor;
import org.jboss.webbeans.injectable.InjectableMethod;
import org.jboss.webbeans.util.AnnotatedItem;
import org.jboss.webbeans.util.LoggerUtil;
@@ -85,6 +82,11 @@
// TODO Interceptors
}
+ public AbstractComponentModel()
+ {
+ // TODO Auto-generated constructor stub
+ }
+
@SuppressWarnings("unchecked")
protected static Class<?> initType(AnnotatedItem annotatedItem, AnnotatedItem xmlAnnotatedItem)
{
Added: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/JmsComponentModel.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/JmsComponentModel.java (rev 0)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/JmsComponentModel.java 2008-07-03 22:23:57 UTC (rev 43)
@@ -0,0 +1,103 @@
+package org.jboss.webbeans.model;
+
+import java.lang.annotation.Annotation;
+import java.util.HashMap;
+import java.util.Set;
+
+import javax.webbeans.Current;
+import javax.webbeans.Dependent;
+import javax.webbeans.ScopeType;
+
+import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.bindings.DependentBinding;
+import org.jboss.webbeans.injectable.ComponentConstructor;
+import org.jboss.webbeans.injectable.JMSConstructor;
+import org.jboss.webbeans.util.AnnotatedItem;
+import org.jboss.webbeans.util.MutableAnnotatedItem;
+import org.jboss.webbeans.util.Reflections;
+
+public class JmsComponentModel<T> extends AbstractComponentModel<T>
+{
+
+ // TODO Work out how to handle xml elements which don't correspond to annotations
+
+ private Set<Annotation> bindingTypes;
+ private Class<? extends T> type;
+ private Annotation scopeType;
+ private String jndiName;
+ private ComponentConstructor<T> constructor;
+
+ public JmsComponentModel(AnnotatedItem xmlAnnotatedItem, ContainerImpl container)
+ {
+ AnnotatedItem annotatedItem = new MutableAnnotatedItem(null, new HashMap<Class<? extends Annotation>, Annotation>());
+ type = initType(xmlAnnotatedItem);
+ bindingTypes = initBindingTypes(annotatedItem, xmlAnnotatedItem);
+ scopeType = new DependentBinding();
+ checkBindingTypesAllowed(bindingTypes, type);
+ checkScopeAllowed(xmlAnnotatedItem, type);
+ // TODO Initialize queue. topic
+ this.constructor = new JMSConstructor<T>(jndiName);
+ }
+
+
+
+ @SuppressWarnings("unchecked")
+ protected static void checkBindingTypesAllowed(Set<Annotation> bindingTypes,
+ Class<?> type)
+ {
+ if (bindingTypes.size() == 0)
+ {
+ throw new RuntimeException("Must declare at least one binding type for JMS Component " + type);
+ }
+ if (Reflections.annotationSetMatches(bindingTypes, Current.class))
+ {
+ throw new RuntimeException("Cannot declared the binding type @Current for JMS Component " + type);
+ }
+
+ }
+
+ protected static <T> Class<? extends T> initType(AnnotatedItem xmlAnnotatedItem)
+ {
+ // TODO return TopicPublisher if its a topic or QueueSession if its a queue
+ return null;
+ }
+
+ protected static void checkScopeAllowed(AnnotatedItem xmlAnnotatedItem, Class<?> type)
+ {
+ Set<Annotation> scopeTypeAnnotations = xmlAnnotatedItem.getAnnotations(ScopeType.class);
+ if (scopeTypeAnnotations.size() > 0 && ! scopeTypeAnnotations.iterator().next().annotationType().equals(Dependent.class))
+ {
+ throw new RuntimeException("JMS component may only have scope @Dependent for " + type);
+ }
+ }
+
+ @Override
+ public ComponentConstructor<T> getConstructor()
+ {
+ return constructor;
+ }
+
+ @Override
+ public Set<Annotation> getBindingTypes()
+ {
+ return bindingTypes;
+ }
+
+ @Override
+ protected Class<? extends T> getType()
+ {
+ return type;
+ }
+
+ public String getJndiName()
+ {
+ return jndiName;
+ }
+
+ @Override
+ public Annotation getScopeType()
+ {
+ return scopeType;
+ }
+
+}
Property changes on: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/JmsComponentModel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/util/JNDI.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/util/JNDI.java (rev 0)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/util/JNDI.java 2008-07-03 22:23:57 UTC (rev 43)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.util;
+
+public class JNDI
+{
+
+ public static Object lookup(String name)
+ {
+ return lookup(name, Object.class);
+ }
+
+ public static <T> T lookup(String name, Class<? extends T> expectedType)
+ {
+ return null;
+ }
+
+}
Property changes on: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/util/JNDI.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/util/Reflections.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/util/Reflections.java 2008-07-03 21:29:26 UTC (rev 42)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/util/Reflections.java 2008-07-03 22:23:57 UTC (rev 43)
@@ -5,7 +5,9 @@
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
+import java.util.Set;
public class Reflections
@@ -113,4 +115,40 @@
}
return constructors;
}
+
+ public static boolean annotationTypeSetMatches(Set<Class<? extends Annotation>> annotations, Class<? extends Annotation>... annotationTypes)
+ {
+ List<Class<? extends Annotation>> annotationTypeList = new ArrayList<Class<? extends Annotation>>();
+ annotationTypeList.addAll(Arrays.asList(annotationTypes));
+ for (Class<? extends Annotation> annotation : annotations)
+ {
+ if (annotationTypeList.contains(annotation))
+ {
+ annotationTypeList.remove(annotation);
+ }
+ else
+ {
+ return false;
+ }
+ }
+ return annotationTypeList.size() == 0;
+ }
+
+ public static boolean annotationSetMatches(Set<Annotation> annotations, Class<? extends Annotation>... annotationTypes)
+ {
+ List<Class<? extends Annotation>> annotationTypeList = new ArrayList<Class<? extends Annotation>>();
+ annotationTypeList.addAll(Arrays.asList(annotationTypes));
+ for (Annotation annotation : annotations)
+ {
+ if (annotationTypeList.contains(annotation.annotationType()))
+ {
+ annotationTypeList.remove(annotation.annotationType());
+ }
+ else
+ {
+ return false;
+ }
+ }
+ return annotationTypeList.size() == 0;
+ }
}
Modified: ri/trunk/webbeans-impl/src/test/java/org/jboss/webbeans/test/ComponentMetaModelTest.java
===================================================================
--- ri/trunk/webbeans-impl/src/test/java/org/jboss/webbeans/test/ComponentMetaModelTest.java 2008-07-03 21:29:26 UTC (rev 42)
+++ ri/trunk/webbeans-impl/src/test/java/org/jboss/webbeans/test/ComponentMetaModelTest.java 2008-07-03 22:23:57 UTC (rev 43)
@@ -1,6 +1,5 @@
package org.jboss.webbeans.test;
-import static org.jboss.webbeans.test.util.Util.annotationSetMatches;
import java.lang.annotation.Annotation;
import java.util.ArrayList;
@@ -63,6 +62,7 @@
import org.jboss.webbeans.util.AnnotatedItem;
import org.jboss.webbeans.util.ClassAnnotatedItem;
import org.jboss.webbeans.util.MutableAnnotatedItem;
+import org.jboss.webbeans.util.Reflections;
import org.junit.Before;
import org.junit.Test;
@@ -165,7 +165,7 @@
SimpleComponentModel<Cat> cat = new SimpleComponentModel<Cat>(new ClassAnnotatedItem(Cat.class), annotatedItem, container);
assert cat.getBindingTypes().size() == 1;
- assert annotationSetMatches(cat.getBindingTypes(), Asynchronous.class);
+ assert Reflections.annotationSetMatches(cat.getBindingTypes(), Asynchronous.class);
}
@SuppressWarnings("unchecked")
@@ -174,7 +174,7 @@
{
SimpleComponentModel<Cat> cat = new SimpleComponentModel<Cat>(new ClassAnnotatedItem(Cat.class), emptyAnnotatedItem, container);
assert cat.getBindingTypes().size() == 1;
- assert annotationSetMatches(cat.getBindingTypes(), Synchronous.class);
+ assert Reflections.annotationSetMatches(cat.getBindingTypes(), Synchronous.class);
}
@SuppressWarnings("unchecked")
@@ -186,7 +186,7 @@
AnnotatedItem annotatedItem = new MutableAnnotatedItem(Antelope.class, annotations);
SimpleComponentModel<Antelope> antelope = new SimpleComponentModel<Antelope>(emptyAnnotatedItem, annotatedItem, container);
- assert annotationSetMatches(antelope.getBindingTypes(), Asynchronous.class);
+ assert Reflections.annotationSetMatches(antelope.getBindingTypes(), Asynchronous.class);
}
@SuppressWarnings("unchecked")
@@ -417,7 +417,7 @@
assert Production.class.equals(order.getDeploymentType().annotationType());
assert "currentSynchronousOrder".equals(order.getName());
assert order.getBindingTypes().size() == 2;
- assert annotationSetMatches(order.getBindingTypes(), Current.class, Synchronous.class);
+ assert Reflections.annotationSetMatches(order.getBindingTypes(), Current.class, Synchronous.class);
assert order.getScopeType().annotationType().equals(Dependent.class);
}
Modified: ri/trunk/webbeans-impl/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java
===================================================================
--- ri/trunk/webbeans-impl/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java 2008-07-03 21:29:26 UTC (rev 42)
+++ ri/trunk/webbeans-impl/src/test/java/org/jboss/webbeans/test/EnterpriseComponentModelTest.java 2008-07-03 22:23:57 UTC (rev 43)
@@ -1,7 +1,5 @@
package org.jboss.webbeans.test;
-import static org.jboss.webbeans.test.util.Util.annotationSetMatches;
-
import java.lang.annotation.Annotation;
import java.util.HashMap;
import java.util.Map;
@@ -26,6 +24,8 @@
import org.jboss.webbeans.util.AnnotatedItem;
import org.jboss.webbeans.util.ClassAnnotatedItem;
import org.jboss.webbeans.util.MutableAnnotatedItem;
+import org.jboss.webbeans.util.Reflections;
+import static org.jboss.webbeans.util.Reflections.annotationSetMatches;
import org.junit.Before;
import org.junit.Test;
@@ -49,7 +49,7 @@
{
EnterpriseComponentModel<Lion> lion = new EnterpriseComponentModel<Lion>(new ClassAnnotatedItem(Lion.class), emptyAnnotatedItem, container);
assert lion.getScopeType().annotationType().equals(Dependent.class);
- annotationSetMatches(lion.getBindingTypes(), Current.class);
+ Reflections.annotationSetMatches(lion.getBindingTypes(), Current.class);
assert lion.getName().equals("lion");
}
@@ -62,7 +62,7 @@
EnterpriseComponentModel<Giraffe> giraffe = new EnterpriseComponentModel<Giraffe>(new ClassAnnotatedItem(Giraffe.class), annotatedItem, container);
assert giraffe.getScopeType().annotationType().equals(Dependent.class);
- annotationSetMatches(giraffe.getBindingTypes(), Current.class);
+ Reflections.annotationSetMatches(giraffe.getBindingTypes(), Current.class);
}
@Test
@@ -102,7 +102,7 @@
{
EnterpriseComponentModel<Tiger> tiger = new EnterpriseComponentModel<Tiger>(new ClassAnnotatedItem(Tiger.class), emptyAnnotatedItem, container);
- annotationSetMatches(tiger.getBindingTypes(), Synchronous.class);
+ Reflections.annotationSetMatches(tiger.getBindingTypes(), Synchronous.class);
assert tiger.getRemoveMethod().getMethod().getName().equals("remove");
assert tiger.getName() == null;
}
@@ -182,7 +182,7 @@
public void testMessageDriven()
{
EnterpriseComponentModel<Leopard> leopard = new EnterpriseComponentModel<Leopard>(new ClassAnnotatedItem(Leopard.class), emptyAnnotatedItem, container);
- annotationSetMatches(leopard.getBindingTypes(), Current.class);
+ Reflections.annotationSetMatches(leopard.getBindingTypes(), Current.class);
}
}
Modified: ri/trunk/webbeans-impl/src/test/java/org/jboss/webbeans/test/util/Util.java
===================================================================
--- ri/trunk/webbeans-impl/src/test/java/org/jboss/webbeans/test/util/Util.java 2008-07-03 21:29:26 UTC (rev 42)
+++ ri/trunk/webbeans-impl/src/test/java/org/jboss/webbeans/test/util/Util.java 2008-07-03 22:23:57 UTC (rev 43)
@@ -1,48 +1,7 @@
package org.jboss.webbeans.test.util;
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
public class Util
{
-
- public static boolean annotationSetMatches(Set<Annotation> annotations, Class<? extends Annotation>... annotationTypes)
- {
- List<Class<? extends Annotation>> annotationTypeList = new ArrayList<Class<? extends Annotation>>();
- annotationTypeList.addAll(Arrays.asList(annotationTypes));
- for (Annotation annotation : annotations)
- {
- if (annotationTypeList.contains(annotation.annotationType()))
- {
- annotationTypeList.remove(annotation.annotationType());
- }
- else
- {
- return false;
- }
- }
- return annotationTypeList.size() == 0;
- }
- public static boolean annotationTypeSetMatches(Set<Class<? extends Annotation>> annotations, Class<? extends Annotation>... annotationTypes)
- {
- List<Class<? extends Annotation>> annotationTypeList = new ArrayList<Class<? extends Annotation>>();
- annotationTypeList.addAll(Arrays.asList(annotationTypes));
- for (Class<? extends Annotation> annotation : annotations)
- {
- if (annotationTypeList.contains(annotation))
- {
- annotationTypeList.remove(annotation);
- }
- else
- {
- return false;
- }
- }
- return annotationTypeList.size() == 0;
- }
-
}
15 years, 9 months
[webbeans-commits] Webbeans SVN: r42 - in ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans: ejb and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-07-03 17:29:26 -0400 (Thu, 03 Jul 2008)
New Revision: 42
Added:
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbManager.java
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/injectable/EnterpriseConstructor.java
Modified:
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ContainerImpl.java
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EJB.java
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbMetaData.java
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/EnterpriseComponentModel.java
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java
ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/SimpleComponentModel.java
Log:
Some WIP on remote components (which is wrong somewhere)
Modified: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ContainerImpl.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ContainerImpl.java 2008-07-03 17:44:20 UTC (rev 41)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ContainerImpl.java 2008-07-03 21:29:26 UTC (rev 42)
@@ -14,17 +14,20 @@
import org.jboss.webbeans.bindings.ProductionBinding;
import org.jboss.webbeans.bindings.StandardBinding;
+import org.jboss.webbeans.ejb.EjbManager;
public class ContainerImpl implements Container
{
private List<Annotation> enabledDeploymentTypes;
private StereotypeManager stereotypeManager;
+ private EjbManager ejbLookupManager;
public ContainerImpl(List<Annotation> enabledDeploymentTypes)
{
initEnabledDeploymentTypes(enabledDeploymentTypes);
this.stereotypeManager = new StereotypeManager();
+ this.ejbLookupManager = new EjbManager();
}
private void initEnabledDeploymentTypes(List<Annotation> enabledDeploymentTypes)
@@ -135,4 +138,9 @@
return this.stereotypeManager;
}
+ public EjbManager getEjbManager()
+ {
+ return ejbLookupManager;
+ }
+
}
Modified: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EJB.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EJB.java 2008-07-03 17:44:20 UTC (rev 41)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EJB.java 2008-07-03 21:29:26 UTC (rev 42)
@@ -1,9 +1,8 @@
package org.jboss.webbeans.ejb;
import java.lang.annotation.Annotation;
-import java.util.HashMap;
-import java.util.Map;
+
import org.jboss.webbeans.util.Reflections;
@@ -11,8 +10,6 @@
public class EJB
{
- private static Map<Class<?>, EjbMetaData> ejbMetaDataMap = new HashMap<Class<?>, EjbMetaData>();
-
public @interface Dummy {}
public static final Class<Annotation> STATELESS_ANNOTATION;
@@ -42,20 +39,4 @@
}
}
- public static <T> EjbMetaData<T> getEjbMetaData(Class<? extends T> clazz)
- {
- // TODO replace with an application lookup
- if (!ejbMetaDataMap.containsKey(clazz))
- {
- EjbMetaData<T> ejbMetaData = new EjbMetaData(clazz);
- ejbMetaDataMap.put(clazz, ejbMetaData);
- return ejbMetaData;
- }
- else
- {
- return ejbMetaDataMap.get(clazz);
- }
-
- }
-
}
Added: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbManager.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbManager.java (rev 0)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbManager.java 2008-07-03 21:29:26 UTC (rev 42)
@@ -0,0 +1,64 @@
+package org.jboss.webbeans.ejb;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.webbeans.EnterpriseBeanLookup;
+
+
+public class EjbManager
+{
+
+ private Map<Class<?>, EjbMetaData<?>> ejbMetaDataMap = new HashMap<Class<?>, EjbMetaData<?>>();
+
+ private EnterpriseBeanLookup enterpriseBeanLookup;
+
+ public EjbManager()
+ {
+ // TODO Write enterpriseBeanLookup instantiation
+ }
+
+ // TODO Should this be static?
+ @SuppressWarnings("unchecked")
+ public <T> T lookup(EjbMetaData<T> ejb)
+ {
+ if (ejb.getEjbLinkJndiName() != null)
+ {
+ return (T) lookupInJndi(ejb.getEjbLinkJndiName());
+ }
+ try
+ {
+ // TODO How is a JNDI lookup failure shown to us?
+ return (T) lookupInJndi(ejb.getDefaultJndiName());
+ }
+ catch (Exception e)
+ {
+
+ }
+ return (T) enterpriseBeanLookup.lookup(ejb.getEjbName());
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> EjbMetaData<T> getEjbMetaData(Class<? extends T> clazz)
+ {
+ // TODO replace with an application lookup
+ if (!ejbMetaDataMap.containsKey(clazz))
+ {
+ EjbMetaData<T> ejbMetaData = new EjbMetaData<T>(clazz);
+ ejbMetaDataMap.put(clazz, ejbMetaData);
+ return ejbMetaData;
+ }
+ else
+ {
+ return (EjbMetaData<T>) ejbMetaDataMap.get(clazz);
+ }
+
+ }
+
+ protected Object lookupInJndi(String name)
+ {
+ // TODO Write JNDI lookup
+ return null;
+ }
+
+}
Property changes on: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbMetaData.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbMetaData.java 2008-07-03 17:44:20 UTC (rev 41)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/ejb/EjbMetaData.java 2008-07-03 21:29:26 UTC (rev 42)
@@ -29,8 +29,18 @@
private EjbType ejbType;
private List<Method> removeMethods;
+
+ // TODO Populate this from web.xml
+ private String ejbLinkJndiName;
+
+ // TODO Initialize this based on the EJB 3.1 spec
+ private String defaultJndiName;
+
+ // TODO Initialize the ejb name
+ private String ejbName;
+
- public EjbMetaData(Class<T> type)
+ public EjbMetaData(Class<? extends T> type)
{
// TODO Merge in ejb-jar.xml
if (type.isAnnotationPresent(STATELESS_ANNOTATION))
@@ -80,5 +90,20 @@
{
return removeMethods;
}
+
+ public String getEjbLinkJndiName()
+ {
+ return ejbLinkJndiName;
+ }
+ public String getDefaultJndiName()
+ {
+ return defaultJndiName;
+ }
+
+ public String getEjbName()
+ {
+ return ejbName;
+ }
+
}
Added: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/injectable/EnterpriseConstructor.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/injectable/EnterpriseConstructor.java (rev 0)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/injectable/EnterpriseConstructor.java 2008-07-03 21:29:26 UTC (rev 42)
@@ -0,0 +1,33 @@
+package org.jboss.webbeans.injectable;
+
+import javax.webbeans.Container;
+
+import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ejb.EjbMetaData;
+
+
+public class EnterpriseConstructor<T> implements ComponentConstructor<T>
+{
+
+ private EjbMetaData<T> ejbMetaData;
+
+ public EnterpriseConstructor(EjbMetaData<T> ejbMetaData)
+ {
+ this.ejbMetaData = ejbMetaData;
+ }
+
+ public T invoke(Container container)
+ {
+ // TODO Hmm, this isn't right
+ if (container instanceof ContainerImpl)
+ {
+ ContainerImpl containerImpl = (ContainerImpl) container;
+ return containerImpl.getEjbManager().lookup(ejbMetaData);
+ }
+ else
+ {
+ throw new RuntimeException("Error accessing webbeans container");
+ }
+ }
+
+}
Property changes on: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/injectable/EnterpriseConstructor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java 2008-07-03 17:44:20 UTC (rev 41)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/AbstractComponentModel.java 2008-07-03 21:29:26 UTC (rev 42)
@@ -238,62 +238,6 @@
return null;
}
- @SuppressWarnings("unchecked")
- protected static <T> SimpleConstructor<T> initConstructor(Class<? extends T> type)
- {
- if (type.getConstructors().length == 1)
- {
- Constructor<T> constructor = type.getConstructors()[0];
- log.finest("Exactly one constructor (" + constructor +") defined, using it as the component constructor for " + type);
- return new SimpleConstructor<T>(constructor);
- }
-
- if (type.getConstructors().length > 1)
- {
- List<Constructor<T>> initializerAnnotatedConstructors = Reflections.getConstructors(type, Initializer.class);
- List<Constructor<T>> bindingTypeAnnotatedConstructors = Reflections.getConstructorsForMetaAnnotatedParameter(type, BindingType.class);
- log.finest("Found " + initializerAnnotatedConstructors + " constructors annotated with @Initializer for " + type);
- log.finest("Found " + bindingTypeAnnotatedConstructors + " with parameters annotated with binding types for " + type);
- if ((initializerAnnotatedConstructors.size() + bindingTypeAnnotatedConstructors.size()) > 1)
- {
- if (initializerAnnotatedConstructors.size() > 1)
- {
- throw new RuntimeException("Cannot have more than one constructor annotated with @Initializer for " + type);
- }
-
- else if (bindingTypeAnnotatedConstructors.size() > 1)
- {
- throw new RuntimeException("Cannot have more than one constructor with binding types specified on constructor parameters for " + type);
- }
- else
- {
- throw new RuntimeException("Specify a constructor either annotated with @Initializer or with parameters annotated with binding types for " + type);
- }
- }
- else if (initializerAnnotatedConstructors.size() == 1)
- {
- Constructor<T> constructor = initializerAnnotatedConstructors.get(0);
- log.finest("Exactly one constructor (" + constructor +") annotated with @Initializer defined, using it as the component constructor for " + type);
- return new SimpleConstructor<T>(constructor);
- }
- else if (bindingTypeAnnotatedConstructors.size() == 1)
- {
- Constructor<T> constructor = bindingTypeAnnotatedConstructors.get(0);
- log.finest("Exactly one constructor (" + constructor +") with parameters annotated with binding types defined, using it as the component constructor for " + type);
- return new SimpleConstructor<T>(constructor);
- }
- }
-
- if (type.getConstructors().length == 0)
- {
- Constructor<T> constructor = (Constructor<T>) Reflections.getConstructor(type);
- log.finest("No constructor defined, using implicit no arguement constructor for " + type);
- return new SimpleConstructor<T>(constructor);
- }
-
- throw new RuntimeException("Cannot determine constructor to use for " + type);
- }
-
protected static String initName(MergedStereotypesModel stereotypes, AnnotatedItem annotatedItem, AnnotatedItem xmlAnnotatedItem, Class<?> type)
{
boolean componentNameDefaulted = false;
Modified: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/EnterpriseComponentModel.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/EnterpriseComponentModel.java 2008-07-03 17:44:20 UTC (rev 41)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/EnterpriseComponentModel.java 2008-07-03 21:29:26 UTC (rev 42)
@@ -6,28 +6,33 @@
import javax.webbeans.Dependent;
import org.jboss.webbeans.ContainerImpl;
-import org.jboss.webbeans.ejb.EJB;
import org.jboss.webbeans.ejb.EjbMetaData;
-import org.jboss.webbeans.injectable.SimpleConstructor;
+import org.jboss.webbeans.injectable.ComponentConstructor;
+import org.jboss.webbeans.injectable.EnterpriseConstructor;
import org.jboss.webbeans.injectable.InjectableMethod;
import org.jboss.webbeans.util.AnnotatedItem;
public class EnterpriseComponentModel<T> extends AbstractComponentModel<T>
{
- private SimpleConstructor<T> constructor;
+ private EnterpriseConstructor<T> constructor;
private InjectableMethod<?> removeMethod;
public EnterpriseComponentModel(AnnotatedItem annotatedItem,
AnnotatedItem xmlAnnotatedItem, ContainerImpl container)
{
super(annotatedItem, xmlAnnotatedItem, container);
- this.constructor = initConstructor(getType());
- EjbMetaData<T> ejbMetaData = EJB.getEjbMetaData(getType());
+ EjbMetaData<T> ejbMetaData = container.getEjbManager().getEjbMetaData(getType());
+ this.constructor = initConstructor(ejbMetaData, container);
EnterpriseComponentModel.checkScopeAllowed(getMergedStereotypes(), getScopeType(), getType(), ejbMetaData);
this.removeMethod = initRemoveMethod(ejbMetaData, getType());
}
+ protected static <T> EnterpriseConstructor<T> initConstructor(EjbMetaData<T> ejbMetaData, ContainerImpl container)
+ {
+ return new EnterpriseConstructor<T>(ejbMetaData);
+ }
+
/**
* Check that the scope type is allowed by the stereotypes on the component and the component type
* @param type
@@ -44,7 +49,7 @@
}
}
- public SimpleConstructor<T> getConstructor()
+ public ComponentConstructor<T> getConstructor()
{
return constructor;
}
Modified: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java 2008-07-03 17:44:20 UTC (rev 41)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/RemoteComponentModel.java 2008-07-03 21:29:26 UTC (rev 42)
@@ -1,26 +1,83 @@
package org.jboss.webbeans.model;
+import java.lang.annotation.Annotation;
+
+import javax.webbeans.ApplicationScoped;
+import javax.webbeans.BoundTo;
+import javax.webbeans.Dependent;
+
import org.jboss.webbeans.ContainerImpl;
+import org.jboss.webbeans.ejb.EjbMetaData;
import org.jboss.webbeans.injectable.ComponentConstructor;
+import org.jboss.webbeans.injectable.EnterpriseConstructor;
+import org.jboss.webbeans.injectable.InjectableMethod;
import org.jboss.webbeans.util.AnnotatedItem;
public class RemoteComponentModel<T> extends AbstractComponentModel<T>
{
+ private EnterpriseConstructor<T> constructor;
+ private InjectableMethod<?> removeMethod;
+ private String boundTo;
+
public RemoteComponentModel(AnnotatedItem annotatedItem,
AnnotatedItem xmlAnnotatedItem, ContainerImpl container)
{
super(annotatedItem, xmlAnnotatedItem, container);
- // TODO Auto-generated constructor stub
+ EjbMetaData<T> ejbMetaData = container.getEjbManager().getEjbMetaData(getType());
+ this.constructor = initConstructor(ejbMetaData, container);
+ EnterpriseComponentModel.checkScopeAllowed(getMergedStereotypes(), getScopeType(), getType(), ejbMetaData);
+ this.removeMethod = initRemoveMethod(ejbMetaData, getType());
+ this.boundTo = initBoundTo(annotatedItem, xmlAnnotatedItem, getType());
}
+
+ protected static <T> EnterpriseConstructor<T> initConstructor(EjbMetaData<T> ejbMetaData, ContainerImpl container)
+ {
+ return new EnterpriseConstructor<T>(ejbMetaData);
+ }
- @Override
+ /**
+ * Check that the scope type is allowed by the stereotypes on the component and the component type
+ * @param type
+ */
+ protected static <T> void checkScopeAllowed(MergedStereotypesModel stereotypes, Annotation scopeType, Class<?> type, EjbMetaData<T> ejbMetaData)
+ {
+ if (ejbMetaData.isStateless() && !scopeType.annotationType().equals(Dependent.class))
+ {
+ throw new RuntimeException("Scope " + scopeType + " is not allowed on stateless enterpise bean components for " + type + ". Only @Dependent is allowed on stateless enterprise bean components");
+ }
+ if (ejbMetaData.isSingleton() && (!scopeType.annotationType().equals(Dependent.class) || !scopeType.annotationType().equals(ApplicationScoped.class)))
+ {
+ throw new RuntimeException("Scope " + scopeType + " is not allowed on singleton enterpise bean components for " + type + ". Only @Dependent or @ApplicationScoped is allowed on singleton enterprise bean components");
+ }
+ }
+
+ protected static String initBoundTo(AnnotatedItem annotatedItem, AnnotatedItem xmlAnnotatedItem, Class<?> type)
+ {
+ if (xmlAnnotatedItem.isAnnotationPresent(BoundTo.class))
+ {
+ return xmlAnnotatedItem.getAnnotation(BoundTo.class).value();
+ }
+ if (annotatedItem.isAnnotationPresent(BoundTo.class))
+ {
+ return annotatedItem.getAnnotation(BoundTo.class).value();
+ }
+ throw new RuntimeException("Remote component doesn't specify @BoundTo or <bound-to /> for " + type);
+ }
+
public ComponentConstructor<T> getConstructor()
{
- // TODO Auto-generated method stub
- return null;
+ return constructor;
}
-
+ public InjectableMethod<?> getRemoveMethod()
+ {
+ return removeMethod;
+ }
+ public String getBoundTo()
+ {
+ return boundTo;
+ }
+
}
Modified: ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/SimpleComponentModel.java
===================================================================
--- ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/SimpleComponentModel.java 2008-07-03 17:44:20 UTC (rev 41)
+++ ri/trunk/webbeans-impl/src/main/java/org/jboss/webbeans/model/SimpleComponentModel.java 2008-07-03 21:29:26 UTC (rev 42)
@@ -1,13 +1,26 @@
package org.jboss.webbeans.model;
+import java.lang.reflect.Constructor;
+import java.util.List;
+import java.util.logging.Logger;
+
+import javax.webbeans.BindingType;
+import javax.webbeans.Initializer;
+
import org.jboss.webbeans.ContainerImpl;
import org.jboss.webbeans.injectable.SimpleConstructor;
import org.jboss.webbeans.injectable.InjectableMethod;
import org.jboss.webbeans.util.AnnotatedItem;
+import org.jboss.webbeans.util.LoggerUtil;
+import org.jboss.webbeans.util.Reflections;
public class SimpleComponentModel<T> extends AbstractComponentModel<T>
{
+ public static final String LOGGER_NAME = "componentMetaModel";
+
+ private static Logger log = LoggerUtil.getLogger(LOGGER_NAME);
+
private SimpleConstructor<T> constructor;
private InjectableMethod<?> removeMethod;
@@ -24,6 +37,62 @@
this.constructor = initConstructor(getType());
// TODO Interceptors
}
+
+ @SuppressWarnings("unchecked")
+ protected static <T> SimpleConstructor<T> initConstructor(Class<? extends T> type)
+ {
+ if (type.getConstructors().length == 1)
+ {
+ Constructor<T> constructor = type.getConstructors()[0];
+ log.finest("Exactly one constructor (" + constructor +") defined, using it as the component constructor for " + type);
+ return new SimpleConstructor<T>(constructor);
+ }
+
+ if (type.getConstructors().length > 1)
+ {
+ List<Constructor<T>> initializerAnnotatedConstructors = Reflections.getConstructors(type, Initializer.class);
+ List<Constructor<T>> bindingTypeAnnotatedConstructors = Reflections.getConstructorsForMetaAnnotatedParameter(type, BindingType.class);
+ log.finest("Found " + initializerAnnotatedConstructors + " constructors annotated with @Initializer for " + type);
+ log.finest("Found " + bindingTypeAnnotatedConstructors + " with parameters annotated with binding types for " + type);
+ if ((initializerAnnotatedConstructors.size() + bindingTypeAnnotatedConstructors.size()) > 1)
+ {
+ if (initializerAnnotatedConstructors.size() > 1)
+ {
+ throw new RuntimeException("Cannot have more than one constructor annotated with @Initializer for " + type);
+ }
+
+ else if (bindingTypeAnnotatedConstructors.size() > 1)
+ {
+ throw new RuntimeException("Cannot have more than one constructor with binding types specified on constructor parameters for " + type);
+ }
+ else
+ {
+ throw new RuntimeException("Specify a constructor either annotated with @Initializer or with parameters annotated with binding types for " + type);
+ }
+ }
+ else if (initializerAnnotatedConstructors.size() == 1)
+ {
+ Constructor<T> constructor = initializerAnnotatedConstructors.get(0);
+ log.finest("Exactly one constructor (" + constructor +") annotated with @Initializer defined, using it as the component constructor for " + type);
+ return new SimpleConstructor<T>(constructor);
+ }
+ else if (bindingTypeAnnotatedConstructors.size() == 1)
+ {
+ Constructor<T> constructor = bindingTypeAnnotatedConstructors.get(0);
+ log.finest("Exactly one constructor (" + constructor +") with parameters annotated with binding types defined, using it as the component constructor for " + type);
+ return new SimpleConstructor<T>(constructor);
+ }
+ }
+
+ if (type.getConstructors().length == 0)
+ {
+ Constructor<T> constructor = (Constructor<T>) Reflections.getConstructor(type);
+ log.finest("No constructor defined, using implicit no arguement constructor for " + type);
+ return new SimpleConstructor<T>(constructor);
+ }
+
+ throw new RuntimeException("Cannot determine constructor to use for " + type);
+ }
public SimpleConstructor<T> getConstructor()
{
15 years, 9 months
[webbeans-commits] Webbeans SVN: r41 - ri/trunk/webbeans-api/src/main/java/javax/webbeans.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-07-03 13:44:20 -0400 (Thu, 03 Jul 2008)
New Revision: 41
Added:
ri/trunk/webbeans-api/src/main/java/javax/webbeans/EnterpriseBeanLookup.java
Log:
Add EnterpriseBeanLookup
Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/EnterpriseBeanLookup.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/EnterpriseBeanLookup.java (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/EnterpriseBeanLookup.java 2008-07-03 17:44:20 UTC (rev 41)
@@ -0,0 +1,8 @@
+package javax.webbeans;
+
+public interface EnterpriseBeanLookup
+{
+
+ public Object lookup(String ejbName);
+
+}
Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/EnterpriseBeanLookup.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 9 months