diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 6bee080..0000000 --- a/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,291 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -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 -org.eclipse.jdt.core.compiler.source=1.5 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=true -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 -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_method_declaration=0 -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_resources_in_try=80 -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.alignment_for_union_type_in_multicatch=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=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_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=false -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=120 -org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true -org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true -org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=3 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off -org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=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=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not 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=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=insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=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=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=do not 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_try=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_semicolon_in_try_resources=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_try=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_try=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_semicolon_in_try_resources=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.join_lines_in_comments=true -org.eclipse.jdt.core.formatter.join_wrapped_lines=true -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=120 -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=mixed -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.use_on_off_tags=false -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true -org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true -org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/.travis.yml b/.travis.yml index c4dfc48..9782748 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ language: java jdk: - - oraclejdk7 + - oraclejdk8 script: - mvn -B -Ptravis clean install diff --git a/README.md b/README.md index b6f4659..ea3ec0e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Coverage Status](https://coveralls.io/repos/github/dmak/jaxb-xew-plugin/badge.svg?branch=master)](https://coveralls.io/github/dmak/jaxb-xew-plugin?branch=master) [![Dependency Status](https://www.versioneye.com/java/com.github.jaxb-xew-plugin:jaxb-xew-plugin/badge?style=flat)](https://www.versioneye.com/java/com.github.jaxb-xew-plugin:jaxb-xew-plugin/) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.jaxb-xew-plugin/jaxb-xew-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.jaxb-xew-plugin/jaxb-xew-plugin) -[![Javadoc](https://javadoc-emblem.rhcloud.com/doc/com.github.jaxb-xew-plugin/jaxb-xew-plugin/badge.svg)](http://www.javadoc.io/doc/com.github.jaxb-xew-plugin/jaxb-xew-plugin) +[![Javadoc](http://javadoc.io/badge/com.github.jaxb-xew-plugin/jaxb-xew-plugin.svg)](http://www.javadoc.io/doc/com.github.jaxb-xew-plugin/jaxb-xew-plugin) ## Description @@ -469,6 +469,11 @@ These plugins don't work with `xew` as last one is causing side effects (see [#4 ## What's new +### [v1.10](http://search.maven.org/#artifactdetails|com.github.jaxb-xew-plugin|jaxb-xew-plugin|1.10|jar) (future release) + +* Bugs fixed ([#57](https://github.com/dmak/jaxb-xew-plugin/issues/57)). +* Updated dependencies and plugins versions. Made JavaDocs Java8-compliant. + ### [v1.9](http://search.maven.org/#artifactdetails|com.github.jaxb-xew-plugin|jaxb-xew-plugin|1.9|jar) * Bugs fixed ([#52](https://github.com/dmak/jaxb-xew-plugin/issues/52)). @@ -569,7 +574,7 @@ This very open source project is maintained and improved during my free time. Th #### Build and release procedure * Read [Sonatype OSS Maven Repository Usage Guide](http://central.sonatype.org/pages/ossrh-guide.html) from cover to cover. -* Use the following `settings.xml` for your Maven (see [Sharing Files with Build Agents](http://wiki.cloudbees.com/bin/view/DEV/Sharing+Files+with+Build+Executors) about how to share `settings.xml` with build nodes on CloudBees): +* Use the following `settings.xml` for your Maven (see [Sharing Files with Build Agents](http://wiki.cloudbees.com/bin/view/DEV/Sharing+Files+with+Build+Executors) about how to share `settings.xml` with build nodes on CloudBees and [Configuring GPG/PGP for Maven Releases](https://nblair.github.io/2015/10/29/maven-gpg-sonatype/) about GPG profile): ```xml @@ -612,6 +617,7 @@ This very open source project is maintained and improved during my free time. Th secure + false ...passphrase... /private/...github_user.../gpg diff --git a/pom-effective.xml b/pom-effective.xml new file mode 100644 index 0000000..3b258ee --- /dev/null +++ b/pom-effective.xml @@ -0,0 +1,627 @@ +[INFO] Scanning for projects... +Downloading: http://prod.repo.internal.epo.org/nexus/content/groups/development/com/vaadin/maven-metadata.xml +Downloading: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/apache/maven/plugins/maven-metadata.xml +Downloading: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/mortbay/jetty/maven-metadata.xml +Downloading: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/epo/common/maven/plugins/maven-metadata.xml +Downloaded: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/epo/common/maven/plugins/maven-metadata.xml (2 KB at 3.7 KB/sec) +Downloading: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/codehaus/mojo/maven-metadata.xml +Downloaded: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/apache/maven/plugins/maven-metadata.xml (15 KB at 16.9 KB/sec) +Downloaded: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/codehaus/mojo/maven-metadata.xml (24 KB at 44.9 KB/sec) +Downloaded: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/mortbay/jetty/maven-metadata.xml (2 KB at 0.1 KB/sec) +Downloaded: http://prod.repo.internal.epo.org/nexus/content/groups/development/com/vaadin/maven-metadata.xml (239 B at 0.0 KB/sec) +Downloading: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/apache/maven/plugins/maven-help-plugin/maven-metadata.xml +Downloaded: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/apache/maven/plugins/maven-help-plugin/maven-metadata.xml (630 B at 0.1 KB/sec) +Downloading: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/apache/maven/plugins/maven-help-plugin/3.1.0/maven-help-plugin-3.1.0.pom +Downloaded: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/apache/maven/plugins/maven-help-plugin/3.1.0/maven-help-plugin-3.1.0.pom (10 KB at 50.5 KB/sec) +Downloading: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/apache/maven/plugins/maven-help-plugin/3.1.0/maven-help-plugin-3.1.0.jar +Downloaded: http://prod.repo.internal.epo.org/nexus/content/groups/development/org/apache/maven/plugins/maven-help-plugin/3.1.0/maven-help-plugin-3.1.0.jar (63 KB at 113.3 KB/sec) +[INFO] +[INFO] ------------------------------------------------------------------------ +[INFO] Building JAXB @XmlElementWrapper Plugin 1.10-SNAPSHOT +[INFO] ------------------------------------------------------------------------ +[INFO] +[INFO] --- maven-help-plugin:3.1.0:effective-pom (default-cli) @ jaxb-xew-plugin --- +Downloading: http://prod.repo.internal.epo.org/nexus/content/groups/development/com/thoughtworks/xstream/xstream/1.4.10/xstream-1.4.10.pom +Downloaded: http://prod.repo.internal.epo.org/nexus/content/groups/development/com/thoughtworks/xstream/xstream/1.4.10/xstream-1.4.10.pom (15 KB at 57.5 KB/sec) +Downloading: http://prod.repo.internal.epo.org/nexus/content/groups/development/com/thoughtworks/xstream/xstream-parent/1.4.10/xstream-parent-1.4.10.pom +Downloaded: http://prod.repo.internal.epo.org/nexus/content/groups/development/com/thoughtworks/xstream/xstream-parent/1.4.10/xstream-parent-1.4.10.pom (35 KB at 226.5 KB/sec) +Downloading: http://prod.repo.internal.epo.org/nexus/content/groups/development/com/thoughtworks/xstream/xstream/1.4.10/xstream-1.4.10.jar +Downloaded: http://prod.repo.internal.epo.org/nexus/content/groups/development/com/thoughtworks/xstream/xstream/1.4.10/xstream-1.4.10.jar (576 KB at 3147.4 KB/sec) +[INFO] +Effective POMs, after inheritance, interpolation, and profiles are applied: + + + + + + + + + + + + + + + + 4.0.0 + com.github.jaxb-xew-plugin + jaxb-xew-plugin + 1.10-SNAPSHOT + JAXB @XmlElementWrapper Plugin + This JAXB plugin utilizes the power of @XmlElementWrapper annotation. Originally xjc trends to create wrapper classes which are the containers for collections. This plugin goes through all properties to find ones which can be represented in the model in more optimal way. + https://github.com/dmak/jaxb-xew-plugin + 2012 + + + LGPLv3 License + http://www.gnu.org/licenses/lgpl-3.0.html + repo + + + + + Bjarne Hansen + bjarne@conspicio.dk + + developer + + + + Dmitry Katsubo + dmitry.katsubo@gmail.com + http://www.linkedin.com/in/dkatsubo + + developer + + + + + scm:git:https://github.com/dmak/jaxb-xew-plugin.git + scm:git:https://dmak@github.com/dmak/jaxb-xew-plugin.git + https://github.com/dmak/jaxb-xew-plugin + + + GitHub + https://github.com/dmak/jaxb-xew-plugin/issues + + + Jenkins + https://travis-ci.org/dmak/jaxb-xew-plugin + + + + sonatype-nexus-staging + Nexus Release Repository + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + sonatype-nexus-snapshots + Sonatype Nexus Snapshots + https://oss.sonatype.org/content/repositories/snapshots/ + + + + 2.2.11 + + + + com.sun.xml.bind + jaxb-xjc + 2.2.11 + compile + + + com.sun.xml.bind + jaxb-core + 2.2.11 + compile + + + commons-logging + commons-logging + 1.2 + compile + + + org.apache.commons + commons-lang3 + 3.7 + compile + + + org.jvnet.jaxb2_commons + jaxb2-basics-tools + 0.12.0 + compile + + + jcl-over-slf4j + org.slf4j + + + slf4j-api + org.slf4j + + + + + junit + junit + 4.12 + test + + + xmlunit + xmlunit + 1.6 + test + + + com.sun.xml.bind + jaxb-impl + 2.2.11 + test + + + commons-io + commons-io + 2.6 + test + + + com.sun + tools + 1.6.0 + system + C:\Applications\Java8\jre/../lib/tools.jar + + + + + + true + daily + + + true + interval:600 + + central + http://central + + + vaadin-addons + http://maven.vaadin.com/vaadin-addons + + + + false + + + true + + apache.snapshots + Apache Development Snapshot Repository + https://repository.apache.org/content/repositories/snapshots/ + + + + + + true + daily + + + true + interval:600 + + central + http://central + + + + C:\Development\jaxb-xew-plugin\src\main\java + C:\Development\jaxb-xew-plugin\src\main\scripts + C:\Development\jaxb-xew-plugin\src\test\java + C:\Development\jaxb-xew-plugin\target\classes + C:\Development\jaxb-xew-plugin\target\test-classes + + + C:\Development\jaxb-xew-plugin\src\main\resources + + + + + C:\Development\jaxb-xew-plugin\src\test\resources + + + C:\Development\jaxb-xew-plugin\target + jaxb-xew-plugin-1.10-SNAPSHOT + + + + maven-antrun-plugin + 1.3 + + + maven-assembly-plugin + 2.2-beta-5 + + + maven-dependency-plugin + 2.1 + + + maven-release-plugin + 2.0 + + + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + + + + maven-surefire-plugin + 2.21.0 + + + + + + org.codehaus.mojo + cobertura-maven-plugin + 2.5.2 + + + cobertura-report + verify + + cobertura + + + + xml + html + + + + + + + xml + html + + + + + maven-gpg-plugin + 1.6 + + + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + --pinentry-mode + loopback + + + + + maven-clean-plugin + 2.4.1 + + + default-clean + clean + + clean + + + + + + maven-resources-plugin + 2.5 + + + default-testResources + process-test-resources + + testResources + + + + default-resources + process-resources + + resources + + + + + + maven-jar-plugin + 2.3.2 + + + default-jar + package + + jar + + + + + + maven-compiler-plugin + 2.3.2 + + + default-compile + compile + + compile + + + 1.6 + 1.6 + + + + default-testCompile + test-compile + + testCompile + + + 1.6 + 1.6 + + + + + 1.6 + 1.6 + + + + maven-surefire-plugin + 2.21.0 + + + default-test + test + + test + + + + + + maven-install-plugin + 2.3.1 + + + default-install + install + + install + + + + + + maven-deploy-plugin + 2.7 + + + default-deploy + deploy + + deploy + + + + + + maven-site-plugin + 3.0 + + + default-site + site + + site + + + C:\Development\jaxb-xew-plugin\target\site + + + org.apache.maven.plugins + maven-project-info-reports-plugin + + + + + + default-deploy + site-deploy + + deploy + + + C:\Development\jaxb-xew-plugin\target\site + + + org.apache.maven.plugins + maven-project-info-reports-plugin + + + + + + + C:\Development\jaxb-xew-plugin\target\site + + + org.apache.maven.plugins + maven-project-info-reports-plugin + + + + + + + + C:\Development\jaxb-xew-plugin\target\site + + + + stage-release + + + + + maven-release-plugin + 2.5.3 + + release-@{project.version} + clean verify + + + + maven-deploy-plugin + 2.8.2 + + 3 + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + sonatype-nexus-staging + https://oss.sonatype.org/ + true + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + --pinentry-mode + loopback + + + + + + + + jdk-tools-dependency + + + C:\Applications\Java8\jre/../lib/tools.jar + + + + + com.sun + tools + 1.6.0 + system + C:\Applications\Java8\jre/../lib/tools.jar + + + + + secure + + + + maven-gpg-plugin + 1.6 + + + verify + + sign + + + + + + --pinentry-mode + loopback + + + + + + + + travis + + + + org.eluder.coveralls + coveralls-maven-plugin + 4.3.0 + + + install + + report + + + + + + + + + + + +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 20.043s +[INFO] Finished at: Mon Jun 11 12:41:03 CEST 2018 +[INFO] Final Memory: 14M/220M +[INFO] ------------------------------------------------------------------------ +[WARNING] The requested profile "release" could not be activated because it does not exist. diff --git a/pom.xml b/pom.xml index 00afc5f..62a7370 100644 --- a/pom.xml +++ b/pom.xml @@ -8,12 +8,6 @@ 1.10-SNAPSHOT jar - - org.sonatype.oss - oss-parent - 9 - - JAXB @XmlElementWrapper Plugin 2012 This JAXB plugin utilizes the power of @XmlElementWrapper annotation. Originally xjc trends to create wrapper classes which are the containers for collections. This plugin goes through all properties to find ones which can be represented in the model in more optimal way. @@ -26,6 +20,19 @@ HEAD + + + sonatype-nexus-snapshots + Sonatype Nexus Snapshots + https://oss.sonatype.org/content/repositories/snapshots/ + + + sonatype-nexus-staging + Nexus Release Repository + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + GitHub https://github.com/dmak/jaxb-xew-plugin/issues @@ -53,18 +60,11 @@ stage-release - - - org.sonatype.plugins - nexus-staging-maven-plugin - - - maven-release-plugin - 2.5.2 + 2.5.3 release-@{project.version} clean verify @@ -80,7 +80,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.7 + 1.6.8 true sonatype-nexus-staging @@ -90,6 +90,34 @@ + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + + --pinentry-mode + loopback + + + + + sign-artifacts + verify + + sign + + + + + @@ -109,25 +137,31 @@ - - jdk-specific-test - - 1.8 - + secure - - - - maven-surefire-plugin - - - **/*SpecificTest.java - - - - - + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + + --pinentry-mode + loopback + + + + + verify + + sign + + + + + @@ -142,7 +176,7 @@ - install + install report @@ -191,12 +225,22 @@ org.apache.commons commons-lang3 - 3.5 + 3.7 org.jvnet.jaxb2_commons jaxb2-basics-tools 0.12.0 + + + org.slf4j + jcl-over-slf4j + + + org.slf4j + slf4j-api + + @@ -220,7 +264,7 @@ commons-io commons-io - 2.5 + 2.6 test @@ -231,13 +275,13 @@ maven-compiler-plugin - 1.5 - 1.5 + 1.6 + 1.6 maven-surefire-plugin - 2.19.1 + 2.21.0 diff --git a/src/test/generated_resources/different_namespaces/Container.java b/src/test/generated_resources/different_namespaces/Container.java index 7a29689..59373fd 100644 --- a/src/test/generated_resources/different_namespaces/Container.java +++ b/src/test/generated_resources/different_namespaces/Container.java @@ -48,18 +48,18 @@ "items", "tests" }) -@XmlRootElement(name = "container", namespace = "http://example.com/namespaces") +@XmlRootElement(name = "container") public class Container extends BaseContainer { - @XmlElementWrapper(name = "entries") + @XmlElementWrapper(name = "entries", namespace = "http://example.com/entries") @XmlElement(name = "entry", namespace = "http://example.com/entry") protected List entries; @XmlElementWrapper(name = "items", required = true, namespace = "http://example.com/items") @XmlElement(name = "entry", namespace = "http://example.com/entry") protected List items; - @XmlElementWrapper(name = "tests", namespace = "http://example.com/namespaces") + @XmlElementWrapper(name = "tests") @XmlElement(name = "test", namespace = "http://example.com/namespaces") protected List tests; diff --git a/src/test/generated_resources/different_namespaces/Container_1.java b/src/test/generated_resources/different_namespaces/Container_1.java new file mode 100644 index 0000000..7ee2b5d --- /dev/null +++ b/src/test/generated_resources/different_namespaces/Container_1.java @@ -0,0 +1,99 @@ + +package different_namespaces; + +import java.util.LinkedList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <extension base="{http://example.com/container}base_container">
+ *       <sequence>
+ *         <element ref="{http://example.com/entries}entries" minOccurs="0"/>
+ *         <element ref="{http://example.com/items}items"/>
+ *         <element name="tests" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element name="test" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *     </extension>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "entries", + "items", + "tests" +}) +@XmlRootElement(name = "container", namespace = "http://example.com/namespaces") +public class Container + extends BaseContainer +{ + + @XmlElementWrapper(name = "entries", namespace = "http://example.com/entries") + @XmlElement(name = "entry", namespace = "http://example.com/entry") + protected List entries; + @XmlElementWrapper(name = "items", required = true, namespace = "http://example.com/items") + @XmlElement(name = "entry", namespace = "http://example.com/entry") + protected List items; + @XmlElementWrapper(name = "tests", namespace = "http://example.com/namespaces") + @XmlElement(name = "test", namespace = "http://example.com/namespaces") + protected List tests; + + public List getEntries() { + if (entries == null) { + entries = new LinkedList(); + } + return entries; + } + + public void setEntries(List entries) { + this.entries = entries; + } + + public List getItems() { + if (items == null) { + items = new LinkedList(); + } + return items; + } + + public void setItems(List items) { + this.items = items; + } + + public List getTests() { + if (tests == null) { + tests = new LinkedList(); + } + return tests; + } + + public void setTests(List tests) { + this.tests = tests; + } + +} diff --git a/src/test/generated_resources/different_namespaces/Entry_1.java b/src/test/generated_resources/different_namespaces/Entry_1.java new file mode 100644 index 0000000..7e9aa15 --- /dev/null +++ b/src/test/generated_resources/different_namespaces/Entry_1.java @@ -0,0 +1,62 @@ + +package different_namespaces; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "entry") +public class Entry { + + @XmlAttribute(name = "name") + @XmlSchemaType(name = "anySimpleType") + protected String name; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + +} diff --git a/src/test/generated_resources/different_namespaces/package-info.java b/src/test/generated_resources/different_namespaces/package-info.java index 8519cc0..2d5e5b6 100644 --- a/src/test/generated_resources/different_namespaces/package-info.java +++ b/src/test/generated_resources/different_namespaces/package-info.java @@ -1,2 +1,2 @@ -@javax.xml.bind.annotation.XmlSchema(namespace = "http://example.com/entries", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +@javax.xml.bind.annotation.XmlSchema(namespace = "http://example.com/namespaces", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package different_namespaces; diff --git a/src/test/generated_resources/different_namespaces/package-info_1.java b/src/test/generated_resources/different_namespaces/package-info_1.java new file mode 100644 index 0000000..ef190d6 --- /dev/null +++ b/src/test/generated_resources/different_namespaces/package-info_1.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://example.com/entry", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package different_namespaces; diff --git a/src/test/generated_resources/element_as_parametrisation_2/Family.java b/src/test/generated_resources/element_as_parametrisation_family/Family.java similarity index 94% rename from src/test/generated_resources/element_as_parametrisation_2/Family.java rename to src/test/generated_resources/element_as_parametrisation_family/Family.java index 7240f4b..9e10348 100644 --- a/src/test/generated_resources/element_as_parametrisation_2/Family.java +++ b/src/test/generated_resources/element_as_parametrisation_family/Family.java @@ -1,5 +1,5 @@ -package element_as_parametrisation_2; +package element_as_parametrisation_family; import java.util.ArrayList; import java.util.List; diff --git a/src/test/generated_resources/element_as_parametrisation_2/FamilyMember.java b/src/test/generated_resources/element_as_parametrisation_family/FamilyMember.java similarity index 95% rename from src/test/generated_resources/element_as_parametrisation_2/FamilyMember.java rename to src/test/generated_resources/element_as_parametrisation_family/FamilyMember.java index 19359de..4dd281e 100644 --- a/src/test/generated_resources/element_as_parametrisation_2/FamilyMember.java +++ b/src/test/generated_resources/element_as_parametrisation_family/FamilyMember.java @@ -1,5 +1,5 @@ -package element_as_parametrisation_2; +package element_as_parametrisation_family; import java.util.ArrayList; import java.util.List; diff --git a/src/test/generated_resources/element_as_parametrisation_2/ObjectFactory.java b/src/test/generated_resources/element_as_parametrisation_family/ObjectFactory.java similarity index 87% rename from src/test/generated_resources/element_as_parametrisation_2/ObjectFactory.java rename to src/test/generated_resources/element_as_parametrisation_family/ObjectFactory.java index 8ea17ba..cea55c7 100644 --- a/src/test/generated_resources/element_as_parametrisation_2/ObjectFactory.java +++ b/src/test/generated_resources/element_as_parametrisation_family/ObjectFactory.java @@ -1,5 +1,5 @@ -package element_as_parametrisation_2; +package element_as_parametrisation_family; import javax.xml.bind.annotation.XmlRegistry; @@ -7,7 +7,7 @@ /** * This object contains factory methods for each * Java content interface and Java element interface - * generated in the element_as_parametrisation_2 package. + * generated in the element_as_parametrisation_family package. *

An ObjectFactory allows you to programatically * construct new instances of the Java representation * for XML content. The Java representation of XML @@ -23,7 +23,7 @@ public class ObjectFactory { /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: element_as_parametrisation_2 + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: element_as_parametrisation_family * */ public ObjectFactory() { diff --git a/src/test/generated_resources/element_as_parametrisation_1/Article.java b/src/test/generated_resources/element_as_parametrisation_publisher/Article.java similarity index 93% rename from src/test/generated_resources/element_as_parametrisation_1/Article.java rename to src/test/generated_resources/element_as_parametrisation_publisher/Article.java index 3c067da..052a2ed 100644 --- a/src/test/generated_resources/element_as_parametrisation_1/Article.java +++ b/src/test/generated_resources/element_as_parametrisation_publisher/Article.java @@ -1,5 +1,5 @@ -package element_as_parametrisation_1; +package element_as_parametrisation_publisher; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/src/test/generated_resources/element_as_parametrisation_1/Articles.java b/src/test/generated_resources/element_as_parametrisation_publisher/Articles.java similarity index 93% rename from src/test/generated_resources/element_as_parametrisation_1/Articles.java rename to src/test/generated_resources/element_as_parametrisation_publisher/Articles.java index 943ded8..c8ade2b 100644 --- a/src/test/generated_resources/element_as_parametrisation_1/Articles.java +++ b/src/test/generated_resources/element_as_parametrisation_publisher/Articles.java @@ -1,5 +1,5 @@ -package element_as_parametrisation_1; +package element_as_parametrisation_publisher; import java.util.ArrayList; import java.util.List; diff --git a/src/test/generated_resources/element_as_parametrisation_1/ArticlesCollections.java b/src/test/generated_resources/element_as_parametrisation_publisher/ArticlesCollections.java similarity index 94% rename from src/test/generated_resources/element_as_parametrisation_1/ArticlesCollections.java rename to src/test/generated_resources/element_as_parametrisation_publisher/ArticlesCollections.java index ecc6dcd..7858324 100644 --- a/src/test/generated_resources/element_as_parametrisation_1/ArticlesCollections.java +++ b/src/test/generated_resources/element_as_parametrisation_publisher/ArticlesCollections.java @@ -1,5 +1,5 @@ -package element_as_parametrisation_1; +package element_as_parametrisation_publisher; import java.util.ArrayList; import java.util.List; diff --git a/src/test/generated_resources/element_as_parametrisation_1/ObjectFactory.java b/src/test/generated_resources/element_as_parametrisation_publisher/ObjectFactory.java similarity index 87% rename from src/test/generated_resources/element_as_parametrisation_1/ObjectFactory.java rename to src/test/generated_resources/element_as_parametrisation_publisher/ObjectFactory.java index d19e7b4..65f626c 100644 --- a/src/test/generated_resources/element_as_parametrisation_1/ObjectFactory.java +++ b/src/test/generated_resources/element_as_parametrisation_publisher/ObjectFactory.java @@ -1,5 +1,5 @@ -package element_as_parametrisation_1; +package element_as_parametrisation_publisher; import javax.xml.bind.annotation.XmlRegistry; @@ -7,7 +7,7 @@ /** * This object contains factory methods for each * Java content interface and Java element interface - * generated in the element_as_parametrisation_1 package. + * generated in the element_as_parametrisation_publisher package. *

An ObjectFactory allows you to programatically * construct new instances of the Java representation * for XML content. The Java representation of XML @@ -23,7 +23,7 @@ public class ObjectFactory { /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: element_as_parametrisation_1 + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: element_as_parametrisation_publisher * */ public ObjectFactory() { diff --git a/src/test/generated_resources/element_as_parametrisation_1/Publisher.java b/src/test/generated_resources/element_as_parametrisation_publisher/Publisher.java similarity index 92% rename from src/test/generated_resources/element_as_parametrisation_1/Publisher.java rename to src/test/generated_resources/element_as_parametrisation_publisher/Publisher.java index f0fad80..9b6d5aa 100644 --- a/src/test/generated_resources/element_as_parametrisation_1/Publisher.java +++ b/src/test/generated_resources/element_as_parametrisation_publisher/Publisher.java @@ -1,5 +1,5 @@ -package element_as_parametrisation_1; +package element_as_parametrisation_publisher; import java.util.ArrayList; import java.util.List; diff --git a/src/test/generated_resources/element_mixed/AnyText_1.java b/src/test/generated_resources/element_mixed/AnyText_1.java new file mode 100644 index 0000000..463b59f --- /dev/null +++ b/src/test/generated_resources/element_mixed/AnyText_1.java @@ -0,0 +1,96 @@ + +package element_mixed; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="formatted-text" type="{http://foo.org/}formatted-text"/>
+ *         <element name="fixed-text" type="{http://foo.org/}fixed-text"/>
+ *         <element name="prefixed-text" type="{http://foo.org/}prefixed-text"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "formattedText", + "fixedText", + "prefixedText" +}) +@XmlRootElement(name = "any-text") +public class AnyText { + + @XmlElementWrapper(name = "formatted-text", required = true) + @XmlElements({ + @XmlElement(name = "i", type = I.class, namespace = "http://foo.org/"), + @XmlElement(name = "b", type = B.class, namespace = "http://foo.org/"), + @XmlElement(name = "br", type = Br.class, namespace = "http://foo.org/") + }) + protected List formattedText = new ArrayList(); + @XmlElementWrapper(name = "fixed-text", required = true) + @XmlMixed + @XmlElementRefs({ + @XmlElementRef(name = "title", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "year", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + }) + protected List fixedText = new ArrayList(); + @XmlElementWrapper(name = "prefixed-text", required = true) + @XmlElementRefs({ + @XmlElementRef(name = "title", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "suffix", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "prefix", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + }) + protected List> prefixedText = new ArrayList>(); + + public List getFormattedText() { + return formattedText; + } + + public void setFormattedText(List formattedText) { + this.formattedText = formattedText; + } + + public List getFixedText() { + return fixedText; + } + + public void setFixedText(List fixedText) { + this.fixedText = fixedText; + } + + public List> getPrefixedText() { + return prefixedText; + } + + public void setPrefixedText(List> prefixedText) { + this.prefixedText = prefixedText; + } + +} diff --git a/src/test/generated_resources/element_mixed/AnyText_2.java b/src/test/generated_resources/element_mixed/AnyText_2.java new file mode 100644 index 0000000..96a43ac --- /dev/null +++ b/src/test/generated_resources/element_mixed/AnyText_2.java @@ -0,0 +1,96 @@ + +package element_mixed; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="formatted-text" type="{http://foo.org/}formatted-text"/>
+ *         <element name="fixed-text" type="{http://foo.org/}fixed-text"/>
+ *         <element name="prefixed-text" type="{http://foo.org/}prefixed-text"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "formattedText", + "fixedText", + "prefixedText" +}) +@XmlRootElement(name = "any-text") +public class AnyText { + + @XmlElementWrapper(name = "formatted-text", required = true) + @XmlElements({ + @XmlElement(name = "i", type = I.class, namespace = "http://foo.org/"), + @XmlElement(name = "b", type = B.class, namespace = "http://foo.org/"), + @XmlElement(name = "br", type = Br.class, namespace = "http://foo.org/") + }) + protected List formattedText = new ArrayList(); + @XmlElementWrapper(name = "fixed-text", required = true) + @XmlMixed + @XmlElementRefs({ + @XmlElementRef(name = "title", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "year", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + }) + protected List fixedText = new ArrayList(); + @XmlElementWrapper(name = "prefixed-text", required = true) + @XmlElementRefs({ + @XmlElementRef(name = "prefix", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "title", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "suffix", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + }) + protected List> prefixedText = new ArrayList>(); + + public List getFormattedText() { + return formattedText; + } + + public void setFormattedText(List formattedText) { + this.formattedText = formattedText; + } + + public List getFixedText() { + return fixedText; + } + + public void setFixedText(List fixedText) { + this.fixedText = fixedText; + } + + public List> getPrefixedText() { + return prefixedText; + } + + public void setPrefixedText(List> prefixedText) { + this.prefixedText = prefixedText; + } + +} diff --git a/src/test/generated_resources/element_mixed/AnyText_3.java b/src/test/generated_resources/element_mixed/AnyText_3.java new file mode 100644 index 0000000..62cba66 --- /dev/null +++ b/src/test/generated_resources/element_mixed/AnyText_3.java @@ -0,0 +1,96 @@ + +package element_mixed; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="formatted-text" type="{http://foo.org/}formatted-text"/>
+ *         <element name="fixed-text" type="{http://foo.org/}fixed-text"/>
+ *         <element name="prefixed-text" type="{http://foo.org/}prefixed-text"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "formattedText", + "fixedText", + "prefixedText" +}) +@XmlRootElement(name = "any-text") +public class AnyText { + + @XmlElementWrapper(name = "formatted-text", required = true) + @XmlElements({ + @XmlElement(name = "i", type = I.class, namespace = "http://foo.org/"), + @XmlElement(name = "b", type = B.class, namespace = "http://foo.org/"), + @XmlElement(name = "br", type = Br.class, namespace = "http://foo.org/") + }) + protected List formattedText = new ArrayList(); + @XmlElementWrapper(name = "fixed-text", required = true) + @XmlMixed + @XmlElementRefs({ + @XmlElementRef(name = "year", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "title", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + }) + protected List fixedText = new ArrayList(); + @XmlElementWrapper(name = "prefixed-text", required = true) + @XmlElementRefs({ + @XmlElementRef(name = "prefix", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "title", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "suffix", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + }) + protected List> prefixedText = new ArrayList>(); + + public List getFormattedText() { + return formattedText; + } + + public void setFormattedText(List formattedText) { + this.formattedText = formattedText; + } + + public List getFixedText() { + return fixedText; + } + + public void setFixedText(List fixedText) { + this.fixedText = fixedText; + } + + public List> getPrefixedText() { + return prefixedText; + } + + public void setPrefixedText(List> prefixedText) { + this.prefixedText = prefixedText; + } + +} diff --git a/src/test/generated_resources/element_mixed/AnyText_4.java b/src/test/generated_resources/element_mixed/AnyText_4.java new file mode 100644 index 0000000..b642221e --- /dev/null +++ b/src/test/generated_resources/element_mixed/AnyText_4.java @@ -0,0 +1,96 @@ + +package element_mixed; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="formatted-text" type="{http://foo.org/}formatted-text"/>
+ *         <element name="fixed-text" type="{http://foo.org/}fixed-text"/>
+ *         <element name="prefixed-text" type="{http://foo.org/}prefixed-text"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "formattedText", + "fixedText", + "prefixedText" +}) +@XmlRootElement(name = "any-text") +public class AnyText { + + @XmlElementWrapper(name = "formatted-text", required = true) + @XmlElements({ + @XmlElement(name = "i", type = I.class, namespace = "http://foo.org/"), + @XmlElement(name = "b", type = B.class, namespace = "http://foo.org/"), + @XmlElement(name = "br", type = Br.class, namespace = "http://foo.org/") + }) + protected List formattedText = new ArrayList(); + @XmlElementWrapper(name = "fixed-text", required = true) + @XmlMixed + @XmlElementRefs({ + @XmlElementRef(name = "year", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "title", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + }) + protected List fixedText = new ArrayList(); + @XmlElementWrapper(name = "prefixed-text", required = true) + @XmlElementRefs({ + @XmlElementRef(name = "suffix", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "prefix", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "title", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + }) + protected List> prefixedText = new ArrayList>(); + + public List getFormattedText() { + return formattedText; + } + + public void setFormattedText(List formattedText) { + this.formattedText = formattedText; + } + + public List getFixedText() { + return fixedText; + } + + public void setFixedText(List fixedText) { + this.fixedText = fixedText; + } + + public List> getPrefixedText() { + return prefixedText; + } + + public void setPrefixedText(List> prefixedText) { + this.prefixedText = prefixedText; + } + +} diff --git a/src/test/generated_resources/element_mixed/AnyText_5.java b/src/test/generated_resources/element_mixed/AnyText_5.java new file mode 100644 index 0000000..813c118 --- /dev/null +++ b/src/test/generated_resources/element_mixed/AnyText_5.java @@ -0,0 +1,96 @@ + +package element_mixed; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="formatted-text" type="{http://foo.org/}formatted-text"/>
+ *         <element name="fixed-text" type="{http://foo.org/}fixed-text"/>
+ *         <element name="prefixed-text" type="{http://foo.org/}prefixed-text"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "formattedText", + "fixedText", + "prefixedText" +}) +@XmlRootElement(name = "any-text") +public class AnyText { + + @XmlElementWrapper(name = "formatted-text", required = true) + @XmlElements({ + @XmlElement(name = "i", type = I.class, namespace = "http://foo.org/"), + @XmlElement(name = "b", type = B.class, namespace = "http://foo.org/"), + @XmlElement(name = "br", type = Br.class, namespace = "http://foo.org/") + }) + protected List formattedText = new ArrayList(); + @XmlElementWrapper(name = "fixed-text", required = true) + @XmlMixed + @XmlElementRefs({ + @XmlElementRef(name = "title", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "year", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + }) + protected List fixedText = new ArrayList(); + @XmlElementWrapper(name = "prefixed-text", required = true) + @XmlElementRefs({ + @XmlElementRef(name = "prefix", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "suffix", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "title", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + }) + protected List> prefixedText = new ArrayList>(); + + public List getFormattedText() { + return formattedText; + } + + public void setFormattedText(List formattedText) { + this.formattedText = formattedText; + } + + public List getFixedText() { + return fixedText; + } + + public void setFixedText(List fixedText) { + this.fixedText = fixedText; + } + + public List> getPrefixedText() { + return prefixedText; + } + + public void setPrefixedText(List> prefixedText) { + this.prefixedText = prefixedText; + } + +} diff --git a/src/test/generated_resources/element_mixed/AnyText_6.java b/src/test/generated_resources/element_mixed/AnyText_6.java new file mode 100644 index 0000000..5a6cb2e --- /dev/null +++ b/src/test/generated_resources/element_mixed/AnyText_6.java @@ -0,0 +1,96 @@ + +package element_mixed; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="formatted-text" type="{http://foo.org/}formatted-text"/>
+ *         <element name="fixed-text" type="{http://foo.org/}fixed-text"/>
+ *         <element name="prefixed-text" type="{http://foo.org/}prefixed-text"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "formattedText", + "fixedText", + "prefixedText" +}) +@XmlRootElement(name = "any-text") +public class AnyText { + + @XmlElementWrapper(name = "formatted-text", required = true) + @XmlElements({ + @XmlElement(name = "i", type = I.class, namespace = "http://foo.org/"), + @XmlElement(name = "b", type = B.class, namespace = "http://foo.org/"), + @XmlElement(name = "br", type = Br.class, namespace = "http://foo.org/") + }) + protected List formattedText = new ArrayList(); + @XmlElementWrapper(name = "fixed-text", required = true) + @XmlMixed + @XmlElementRefs({ + @XmlElementRef(name = "year", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "title", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + }) + protected List fixedText = new ArrayList(); + @XmlElementWrapper(name = "prefixed-text", required = true) + @XmlElementRefs({ + @XmlElementRef(name = "suffix", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "title", namespace = "http://foo.org/", type = JAXBElement.class, required = false), + @XmlElementRef(name = "prefix", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + }) + protected List> prefixedText = new ArrayList>(); + + public List getFormattedText() { + return formattedText; + } + + public void setFormattedText(List formattedText) { + this.formattedText = formattedText; + } + + public List getFixedText() { + return fixedText; + } + + public void setFixedText(List fixedText) { + this.fixedText = fixedText; + } + + public List> getPrefixedText() { + return prefixedText; + } + + public void setPrefixedText(List> prefixedText) { + this.prefixedText = prefixedText; + } + +} diff --git a/src/test/generated_resources/element_mixed/B.java b/src/test/generated_resources/element_mixed/B.java new file mode 100644 index 0000000..899ab15 --- /dev/null +++ b/src/test/generated_resources/element_mixed/B.java @@ -0,0 +1,74 @@ + +package element_mixed; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for b complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="b">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence minOccurs="0">
+ *         <element name="i" type="{http://foo.org/}i"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "b", propOrder = { + "content" +}) +public class B { + + @XmlElementRef(name = "i", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + @XmlMixed + protected List content; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link I }{@code >} + * {@link String } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/src/test/generated_resources/element_mixed/B_1.java b/src/test/generated_resources/element_mixed/B_1.java new file mode 100644 index 0000000..c2211d7 --- /dev/null +++ b/src/test/generated_resources/element_mixed/B_1.java @@ -0,0 +1,74 @@ + +package element_mixed; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for b complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="b">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence minOccurs="0">
+ *         <element name="i" type="{http://foo.org/}i"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "b", propOrder = { + "content" +}) +public class B { + + @XmlElementRef(name = "i", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + @XmlMixed + protected List content; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * {@link JAXBElement }{@code <}{@link I }{@code >} + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/src/test/generated_resources/element_mixed/I.java b/src/test/generated_resources/element_mixed/I.java new file mode 100644 index 0000000..378b442 --- /dev/null +++ b/src/test/generated_resources/element_mixed/I.java @@ -0,0 +1,74 @@ + +package element_mixed; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for i complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="i">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence minOccurs="0">
+ *         <element name="b" type="{http://foo.org/}b"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "i", propOrder = { + "content" +}) +public class I { + + @XmlElementRef(name = "b", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + @XmlMixed + protected List content; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link B }{@code >} + * {@link String } + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/src/test/generated_resources/element_mixed/I_1.java b/src/test/generated_resources/element_mixed/I_1.java new file mode 100644 index 0000000..d981f77 --- /dev/null +++ b/src/test/generated_resources/element_mixed/I_1.java @@ -0,0 +1,74 @@ + +package element_mixed; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlMixed; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for i complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="i">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence minOccurs="0">
+ *         <element name="b" type="{http://foo.org/}b"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "i", propOrder = { + "content" +}) +public class I { + + @XmlElementRef(name = "b", namespace = "http://foo.org/", type = JAXBElement.class, required = false) + @XmlMixed + protected List content; + + /** + * Gets the value of the content property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the content property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getContent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * {@link JAXBElement }{@code <}{@link B }{@code >} + * + * + */ + public List getContent() { + if (content == null) { + content = new ArrayList(); + } + return this.content; + } + +} diff --git a/src/test/generated_resources/element_mixed/ObjectFactory.java b/src/test/generated_resources/element_mixed/ObjectFactory.java new file mode 100644 index 0000000..8bfbc18 --- /dev/null +++ b/src/test/generated_resources/element_mixed/ObjectFactory.java @@ -0,0 +1,111 @@ + +package element_mixed; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the element_mixed package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _IB_QNAME = new QName("http://foo.org/", "b"); + private final static QName _BI_QNAME = new QName("http://foo.org/", "i"); + private final static QName _PrefixedTextPrefix_QNAME = new QName("http://foo.org/", "prefix"); + private final static QName _PrefixedTextTitle_QNAME = new QName("http://foo.org/", "title"); + private final static QName _PrefixedTextSuffix_QNAME = new QName("http://foo.org/", "suffix"); + private final static QName _FixedTextYear_QNAME = new QName("http://foo.org/", "year"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: element_mixed + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link AnyText } + * + */ + public AnyText createAnyText() { + return new AnyText(); + } + + /** + * Create an instance of {@link B } + * + */ + public B createB() { + return new B(); + } + + /** + * Create an instance of {@link I } + * + */ + public I createI() { + return new I(); + } + + /** + * Create an instance of {@link Br } + * + */ + public Br createBr() { + return new Br(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link B }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://foo.org/", name = "b", scope = I.class) + public JAXBElement createIB(B value) { + return new JAXBElement(_IB_QNAME, B.class, I.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link I }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://foo.org/", name = "i", scope = B.class) + public JAXBElement createBI(I value) { + return new JAXBElement(_BI_QNAME, I.class, B.class, value); + } + + @XmlElementDecl(namespace = "http://foo.org/", name = "title", scope = AnyText.class) + public JAXBElement createAnyTextTitle(String value) { + return new JAXBElement(new QName("http://foo.org/", "title"), String.class, AnyText.class, value); + } + + @XmlElementDecl(namespace = "http://foo.org/", name = "year", scope = AnyText.class) + public JAXBElement createAnyTextYear(Integer value) { + return new JAXBElement(new QName("http://foo.org/", "year"), Integer.class, AnyText.class, value); + } + + @XmlElementDecl(namespace = "http://foo.org/", name = "prefix", scope = AnyText.class) + public JAXBElement createAnyTextPrefix(String value) { + return new JAXBElement(new QName("http://foo.org/", "prefix"), String.class, AnyText.class, value); + } + + @XmlElementDecl(namespace = "http://foo.org/", name = "suffix", scope = AnyText.class) + public JAXBElement createAnyTextSuffix(String value) { + return new JAXBElement(new QName("http://foo.org/", "suffix"), String.class, AnyText.class, value); + } + +} diff --git a/src/test/generated_resources/element_scoped/Return.java b/src/test/generated_resources/element_scoped/Return.java new file mode 100644 index 0000000..c55446e --- /dev/null +++ b/src/test/generated_resources/element_scoped/Return.java @@ -0,0 +1,125 @@ + +package element_scoped; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence minOccurs="0">
+ *         <element name="users">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence maxOccurs="unbounded">
+ *                   <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *                   <element name="age" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element ref="{http://example.com/extra}age"/>
+ *         <element name="search-parameters" type="{http://example.com/scope}search-parameters"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "users", + "age", + "searchParameters" +}) +@XmlRootElement(name = "return") +public class Return { + + @XmlElementWrapper + @XmlElementRefs({ + @XmlElementRef(name = "age", namespace = "http://example.com/scope", type = JAXBElement.class), + @XmlElementRef(name = "name", namespace = "http://example.com/scope", type = JAXBElement.class) + }) + protected List> users = new ArrayList>(); + @XmlElement(namespace = "http://example.com/extra") + protected String age; + @XmlElement(name = "search-parameters") + protected SearchParameters searchParameters; + + /** + * Gets the value of the age property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAge() { + return age; + } + + /** + * Sets the value of the age property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAge(String value) { + this.age = value; + } + + /** + * Gets the value of the searchParameters property. + * + * @return + * possible object is + * {@link SearchParameters } + * + */ + public SearchParameters getSearchParameters() { + return searchParameters; + } + + /** + * Sets the value of the searchParameters property. + * + * @param value + * allowed object is + * {@link SearchParameters } + * + */ + public void setSearchParameters(SearchParameters value) { + this.searchParameters = value; + } + + public List> getUsers() { + return users; + } + + public void setUsers(List> users) { + this.users = users; + } + +} diff --git a/src/test/generated_resources/element_scoped/Return_1.java b/src/test/generated_resources/element_scoped/Return_1.java new file mode 100644 index 0000000..91d1513 --- /dev/null +++ b/src/test/generated_resources/element_scoped/Return_1.java @@ -0,0 +1,125 @@ + +package element_scoped; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence minOccurs="0">
+ *         <element name="users">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence maxOccurs="unbounded">
+ *                   <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *                   <element name="age" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <element ref="{http://example.com/extra}age"/>
+ *         <element name="search-parameters" type="{http://example.com/scope}search-parameters"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "users", + "age", + "searchParameters" +}) +@XmlRootElement(name = "return") +public class Return { + + @XmlElementWrapper + @XmlElementRefs({ + @XmlElementRef(name = "name", namespace = "http://example.com/scope", type = JAXBElement.class), + @XmlElementRef(name = "age", namespace = "http://example.com/scope", type = JAXBElement.class) + }) + protected List> users = new ArrayList>(); + @XmlElement(namespace = "http://example.com/extra") + protected String age; + @XmlElement(name = "search-parameters") + protected SearchParameters searchParameters; + + /** + * Gets the value of the age property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAge() { + return age; + } + + /** + * Sets the value of the age property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAge(String value) { + this.age = value; + } + + /** + * Gets the value of the searchParameters property. + * + * @return + * possible object is + * {@link SearchParameters } + * + */ + public SearchParameters getSearchParameters() { + return searchParameters; + } + + /** + * Sets the value of the searchParameters property. + * + * @param value + * allowed object is + * {@link SearchParameters } + * + */ + public void setSearchParameters(SearchParameters value) { + this.searchParameters = value; + } + + public List> getUsers() { + return users; + } + + public void setUsers(List> users) { + this.users = users; + } + +} diff --git a/src/test/generated_resources/inner_element_value_objects/impl/ArticlesCollectionsImpl.java b/src/test/generated_resources/inner_element_value_objects/impl/ArticlesCollectionsImpl.java new file mode 100644 index 0000000..4068d10 --- /dev/null +++ b/src/test/generated_resources/inner_element_value_objects/impl/ArticlesCollectionsImpl.java @@ -0,0 +1,30 @@ + +package inner_element_value_objects.impl; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import inner_element_value_objects.Articles; +import inner_element_value_objects.ArticlesCollections; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "articles-collections", propOrder = { + "articles" +}) +public class ArticlesCollectionsImpl implements ArticlesCollections +{ + + @XmlElement(required = true, type = ArticlesImpl.class) + protected List articles; + + public List getArticles() { + if (articles == null) { + articles = new ArrayList(); + } + return this.articles; + } + +} diff --git a/src/test/java/com/sun/tools/xjc/addon/xew/XmlElementWrapperPluginSpecificTest.java b/src/test/java/com/sun/tools/xjc/addon/xew/XmlElementWrapperPluginSpecificTest.java deleted file mode 100644 index 45ae9bb..0000000 --- a/src/test/java/com/sun/tools/xjc/addon/xew/XmlElementWrapperPluginSpecificTest.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.sun.tools.xjc.addon.xew; - -import static com.sun.tools.xjc.addon.xew.XmlElementWrapperPluginTest.assertXsd; - -import org.junit.Test; - -public class XmlElementWrapperPluginSpecificTest { - - /** - * This test unfortunately does not run on Java8. - */ - @Test - public void testDifferentNamespacesForWrapperAndElement() throws Exception { - // Plural form in this case will have no impact as all properties are already in plural: - assertXsd("different-namespaces", new String[] { "-Xxew:collection", "java.util.LinkedList", - "-Xxew:instantiate", "lazy", "-Xxew:plural" }, false, "BaseContainer", "Container", "Entry", - "package-info"); - } -} diff --git a/src/test/java/com/sun/tools/xjc/addon/xew/XmlElementWrapperPluginTest.java b/src/test/java/com/sun/tools/xjc/addon/xew/XmlElementWrapperPluginTest.java index b1e0d0f..c0e488c 100644 --- a/src/test/java/com/sun/tools/xjc/addon/xew/XmlElementWrapperPluginTest.java +++ b/src/test/java/com/sun/tools/xjc/addon/xew/XmlElementWrapperPluginTest.java @@ -33,6 +33,7 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; @@ -85,32 +86,42 @@ public void testUsage() throws Exception { @Test(expected = BadCommandLineException.class) public void testUnknownOption() throws Exception { - assertXsd("different-namespaces", new String[] { "-Xxew:unknown" }, false); + runTest("different-namespaces", new String[] { "-Xxew:unknown" }, false); } @Test(expected = IllegalArgumentException.class) public void testInvalidInstantiationMode() throws Exception { - assertXsd("element-list-extended", new String[] { "-Xxew:instantiate invalid" }, false); + runTest("element-list-extended", new String[] { "-Xxew:instantiate invalid" }, false); } @Test(expected = BadCommandLineException.class) public void testInvalidControlFile() throws Exception { - assertXsd("element-list-extended", new String[] { "-Xxew:control invalid" }, false); + runTest("element-list-extended", new String[] { "-Xxew:control invalid" }, false); } @Test(expected = BadCommandLineException.class) public void testInvalidCollectionClass() throws Exception { - assertXsd("element-list-extended", new String[] { "-Xxew:collection badvalue" }, false); + runTest("element-list-extended", new String[] { "-Xxew:collection badvalue" }, false); } @Test(expected = IllegalArgumentException.class) public void testInvalidCustomization() throws Exception { - assertXsd("element-with-invalid-customization", null, false); + runTest("element-with-invalid-customization", null, false); + } + + /** + * This test works reliably on Java7 but produces different results from run to run on Java8. + */ + @Test + public void testDifferentNamespacesForWrapperAndElement() throws Exception { + // Plural form in this case will have no impact as all properties are already in plural: + runTest("different-namespaces", new String[] { "-Xxew:collection", "java.util.LinkedList", "-Xxew:instantiate", + "lazy", "-Xxew:plural" }, false, "BaseContainer", "Container", "Entry", "package-info"); } @Test public void testInnerElement() throws Exception { - assertXsd("inner-element", + runTest("inner-element", new String[] { "-verbose", "-Xxew:instantiate none", "-Xxew:control " + getClass().getResource("inner-element-control.txt").getFile() }, true, "Filesystem", "Volumes", "package-info"); @@ -118,7 +129,7 @@ public void testInnerElement() throws Exception { @Test public void testInnerElementWithValueObjects() throws Exception { - assertXsd("inner-element-value-objects", new String[] { "-debug" }, false, "Article", "Articles", + runTest("inner-element-value-objects", new String[] { "-debug" }, false, "Article", "Articles", "ArticlesCollections", "Filesystem", "Publisher", "Volume", "package-info", "impl.ArticleImpl", "impl.ArticlesImpl", "impl.ArticlesCollectionsImpl", "impl.FilesystemImpl", "impl.PublisherImpl", "impl.VolumeImpl", "impl.ObjectFactory", "impl.JAXBContextFactory", "impl.package-info"); @@ -129,24 +140,25 @@ public void testAnnotationReference() throws Exception { // "Markup.java" cannot be verified for content because the content is changing from // one compilation to other as order of @XmlElementRef/@XmlElement annotations is not pre-defined // (set is used as their container). - assertXsd("annotation-reference", new String[] { "-verbose", "-debug" }, false, "ClassCommon", "ClassesEu", + runTest("annotation-reference", new String[] { "-verbose", "-debug" }, false, "ClassCommon", "ClassesEu", "ClassesUs", "ClassExt", "Markup", "Para", "SearchEu", "SearchMulti", "package-info"); } @Test - public void testElementAsParametrisation1() throws Exception { - assertXsd("element-as-parametrisation-1", - new String[] { "-Xxew:control " - + getClass().getResource("element-as-parametrisation-1-control.txt").getFile() }, + public void testElementAsParametrisationPublisher() throws Exception { + runTest("element-as-parametrisation-publisher", + new String[] { "-debug", + "-Xxew:control " + getClass() + .getResource("element-as-parametrisation-publisher-control.txt").getFile() }, false, "Article", "Articles", "ArticlesCollections", "Publisher", "package-info"); } @Test - public void testElementAsParametrisation2() throws Exception { - assertXsd("element-as-parametrisation-2", - new String[] { - "-Xxew:control " - + getClass().getResource("element-as-parametrisation-2-control.txt").getFile(), + public void testElementAsParametrisationFamily() throws Exception { + runTest("element-as-parametrisation-family", + new String[] { "-debug", + "-Xxew:control " + getClass().getResource("element-as-parametrisation-family-control.txt") + .getFile(), "-Xxew:summary " + GENERATED_SOURCES_PREFIX + "summary.txt" }, false, "Family", "FamilyMember", "package-info"); @@ -159,49 +171,49 @@ public void testElementAsParametrisation2() throws Exception { @Test public void testElementWithParent() throws Exception { - assertXsd("element-with-parent", new String[] { "-debug" }, false, "Alliance", "Group", "Organization", + runTest("element-with-parent", new String[] { "-debug" }, false, "Alliance", "Group", "Organization", "package-info"); } @Test public void testElementAny() throws Exception { - assertXsd("element-any", new String[] { "-quiet", "-Xxew:plural" }, false, "Message", "package-info"); + runTest("element-any", new String[] { "-quiet", "-Xxew:plural" }, false, "Message", "package-info"); } @Test public void testElementAnyType() throws Exception { - assertXsd("element-any-type", new String[] { "-Xxew:plural" }, false, "Conversion", "Entry", "package-info"); + runTest("element-any-type", new String[] { "-Xxew:plural" }, false, "Conversion", "Entry", "package-info"); } @Test public void testElementMixed() throws Exception { // Most classes cannot be tested for content - assertXsd("element-mixed", new String[] { "-debug" }, false, "B", "Br", "I", "AnyText", "package-info"); + runTest("element-mixed", new String[] { "-debug" }, false, "B", "Br", "I", "AnyText", "package-info"); } @Test public void testElementListExtended() throws Exception { // This run is configured from XSD (): - assertXsd("element-list-extended", null, false, "Foo", "package-info"); + runTest("element-list-extended", null, false, "Foo", "package-info"); } @Test public void testElementNameCollision() throws Exception { // Most classes cannot be tested for content - assertXsd("element-name-collision", new String[] { "-debug", "-Xxew:instantiate", "lazy" }, false, "Root", + runTest("element-name-collision", new String[] { "-debug", "-Xxew:instantiate", "lazy" }, false, "Root", "package-info"); } @Test public void testElementScoped() throws Exception { // Most classes cannot be tested for content - assertXsd("element-scoped", new String[] { "-debug" }, false, "Return", "SearchParameters", "package-info"); + runTest("element-scoped", new String[] { "-debug" }, false, "Return", "SearchParameters", "package-info"); } @Test public void testElementWithAdapter() throws Exception { // Plural form in this case will have no impact as there is property customization: - assertXsd("element-with-adapter", + runTest("element-with-adapter", new String[] { "-Xxew:plural", "-Xxew:collectionInterface java.util.Collection" }, false, "Calendar", "Adapter1", "package-info"); } @@ -209,24 +221,24 @@ public void testElementWithAdapter() throws Exception { @Test public void testElementWithCustomization() throws Exception { // This run is additionally configured from XSD (): - assertXsd("element-with-customization", new String[] { "-debug", "-Xxew:plural" }, false, "PostOffice", "Args", + runTest("element-with-customization", new String[] { "-debug", "-Xxew:plural" }, false, "PostOffice", "Args", "package-info"); } @Test public void testElementReservedWord() throws Exception { - assertXsd("element-reserved-word", null, false, "Class", "Method", "package-info"); + runTest("element-reserved-word", null, false, "Class", "Method", "package-info"); } @Test public void testSubstitutionGroups() throws Exception { - assertXsd("substitution-groups", null, false, "Address", "ContactInfo", "Customer", "PhoneNumber", + runTest("substitution-groups", null, false, "Address", "ContactInfo", "Customer", "PhoneNumber", "package-info"); } @Test public void testUnqualifiedSchema() throws Exception { - assertXsd("unqualified", null, false, "RootElement", "package-info"); + runTest("unqualified", null, false, "RootElement", "package-info"); } /** @@ -242,7 +254,7 @@ public void testUnqualifiedSchema() throws Exception { * expected classes/files in target directory; these files content is checked if it is present in * resources directory; {@code ObjectFactory.java} is automatically included */ - static void assertXsd(String testName, String[] extraXewOptions, boolean generateEpisode, String... classesToCheck) + static void runTest(String testName, String[] extraXewOptions, boolean generateEpisode, String... classesToCheck) throws Exception { String resourceXsd = testName + ".xsd"; String packageName = testName.replace('-', '_'); @@ -313,14 +325,40 @@ static void assertXsd(String testName, String[] extraXewOptions, boolean generat // Check the contents for those files which exist in resources: for (String className : classesToCheck) { - className = className.replace('.', '/') + ".java"; + className = className.replace('.', '/'); + + AssertionError lastFailedAssertion = null; + + byte sourceFileSuffix = -1; + + while (true) { + sourceFileSuffix++; + + File sourceFile = new File(PREGENERATED_SOURCES_PREFIX + packageName, + className + (sourceFileSuffix == 0 ? "" : "_" + sourceFileSuffix) + ".java"); + + if (!sourceFile.isFile()) { + if (lastFailedAssertion != null) { + throw lastFailedAssertion; + } + + break; + } + + String targetClassName = className + ".java"; - File sourceFile = new File(PREGENERATED_SOURCES_PREFIX + packageName, className); + try { + // To avoid CR/LF conflicts: + assertEquals("For " + targetClassName + " in " + PREGENERATED_SOURCES_PREFIX + packageName, + FileUtils.readFileToString(sourceFile, StandardCharsets.UTF_8).replace("\r", ""), + FileUtils.readFileToString(new File(targetDir, targetClassName), StandardCharsets.UTF_8) + .replace("\r", "")); - if (sourceFile.exists()) { - // To avoid CR/LF conflicts: - assertEquals("For " + className, FileUtils.readFileToString(sourceFile).replace("\r", ""), - FileUtils.readFileToString(new File(targetDir, className)).replace("\r", "")); + break; + } + catch (AssertionError e) { + lastFailedAssertion = e; + } } } @@ -343,7 +381,7 @@ static void assertXsd(String testName, String[] extraXewOptions, boolean generat XMLUnit.setIgnoreComments(true); XMLUnit.setIgnoreWhitespace(true); - Diff xmlDiff = new Diff(IOUtils.toString(xmlTestFile), writer.toString()); + Diff xmlDiff = new Diff(IOUtils.toString(xmlTestFile, StandardCharsets.UTF_8), writer.toString()); assertXMLEqual("Generated XML is wrong: " + writer.toString(), xmlDiff, true); } diff --git a/src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-2-control.txt b/src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-family-control.txt similarity index 100% rename from src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-2-control.txt rename to src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-family-control.txt diff --git a/src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-2.xsd b/src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-family.xsd similarity index 90% rename from src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-2.xsd rename to src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-family.xsd index cd8eca4..ad6332a 100644 --- a/src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-2.xsd +++ b/src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-family.xsd @@ -8,7 +8,7 @@ - + diff --git a/src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-1-control.txt b/src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-publisher-control.txt similarity index 100% rename from src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-1-control.txt rename to src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-publisher-control.txt diff --git a/src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-1.xsd b/src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-publisher.xsd similarity index 62% rename from src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-1.xsd rename to src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-publisher.xsd index 5bcf5b6..a554fbd 100644 --- a/src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-1.xsd +++ b/src/test/resources/com/sun/tools/xjc/addon/xew/element-as-parametrisation-publisher.xsd @@ -8,10 +8,11 @@ - + + \ No newline at end of file