Revize b980047e
Přidáno uživatelem Michal Horký před téměř 5 roky(ů)
demo_jh/Deserializer_tests/.classpath | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<classpath> |
|
3 |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> |
|
4 |
<classpathentry kind="src" path="src"/> |
|
5 |
<classpathentry excluding="src/" kind="src" path=""/> |
|
6 |
<classpathentry kind="output" path="bin"/> |
|
7 |
<classpathentry exported="true" kind="lib" path="lib/jackson-core-asl-1.9.13.jar"/> |
|
8 |
<classpathentry exported="true" kind="lib" path="lib/jackson-mapper-asl-1.9.13.jar"/> |
|
9 |
<classpathentry exported="true" kind="lib" path="lib/jdeserialize-1.2.jar"/> |
|
10 |
</classpath> |
demo_jh/Deserializer_tests/.gitignore | ||
---|---|---|
1 |
/bin/ |
|
2 |
/.settings/ |
|
3 |
/.vscode/ |
demo_jh/Deserializer_tests/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
|
2 |
<projectDescription> |
|
3 |
<name>Deserializer_tests</name> |
|
4 |
<comment/> |
|
5 |
<projects>
 |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
<buildCommand> |
|
9 |
<name>org.eclipse.jdt.core.javabuilder</name> |
|
10 |
<arguments>
 |
|
11 |
</arguments> |
|
12 |
</buildCommand> |
|
13 |
</buildSpec> |
|
14 |
<natures> |
|
15 |
<nature>org.eclipse.jdt.core.javanature</nature> |
|
16 |
</natures> |
|
17 |
</projectDescription> |
demo_jh/Deserializer_tests/.settings/org.eclipse.jdt.core.prefs | ||
---|---|---|
1 |
eclipse.preferences.version=1 |
|
2 |
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled |
|
3 |
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 |
|
4 |
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve |
|
5 |
org.eclipse.jdt.core.compiler.compliance=10 |
|
6 |
org.eclipse.jdt.core.compiler.debug.lineNumber=generate |
|
7 |
org.eclipse.jdt.core.compiler.debug.localVariable=generate |
|
8 |
org.eclipse.jdt.core.compiler.debug.sourceFile=generate |
|
9 |
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error |
|
10 |
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error |
|
11 |
org.eclipse.jdt.core.compiler.source=11 |
demo_jh/Deserializer_tests/eclipse-formatter.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|
2 |
<profiles version="13"> |
|
3 |
<profile kind="CodeFormatterProfile" name="GoogleStyle" version="13"> |
|
4 |
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/> |
|
5 |
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/> |
|
6 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> |
|
7 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/> |
|
8 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/> |
|
9 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/> |
|
10 |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/> |
|
11 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/> |
|
12 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/> |
|
13 |
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/> |
|
14 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments.count_dependent" value="16|-1|16"/> |
|
15 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/> |
|
16 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/> |
|
17 |
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/> |
|
18 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/> |
|
19 |
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/> |
|
20 |
<setting id="org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments" value="false"/> |
|
21 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/> |
|
22 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/> |
|
23 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/> |
|
24 |
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/> |
|
25 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/> |
|
26 |
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/> |
|
27 |
<setting id="org.eclipse.jdt.core.formatter.wrap_comment_inline_tags" value="false"/> |
|
28 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/> |
|
29 |
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/> |
|
30 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/> |
|
31 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration" value="16"/> |
|
32 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/> |
|
33 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter" value="1040"/> |
|
34 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/> |
|
35 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type.count_dependent" value="1585|-1|1585"/> |
|
36 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/> |
|
37 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/> |
|
38 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields.count_dependent" value="16|-1|16"/> |
|
39 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/> |
|
40 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/> |
|
41 |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/> |
|
42 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/> |
|
43 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/> |
|
44 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/> |
|
45 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/> |
|
46 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/> |
|
47 |
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/> |
|
48 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression.count_dependent" value="16|4|80"/> |
|
49 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration.count_dependent" value="16|4|48"/> |
|
50 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/> |
|
51 |
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/> |
|
52 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration.count_dependent" value="16|4|49"/> |
|
53 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/> |
|
54 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/> |
|
55 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/> |
|
56 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/> |
|
57 |
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/> |
|
58 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/> |
|
59 |
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/> |
|
60 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_cascading_method_invocation_with_arguments" value="16"/> |
|
61 |
<setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/> |
|
62 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration.count_dependent" value="16|4|48"/> |
|
63 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/> |
|
64 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/> |
|
65 |
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/> |
|
66 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/> |
|
67 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/> |
|
68 |
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/> |
|
69 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/> |
|
70 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/> |
|
71 |
<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation" value="true"/> |
|
72 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/> |
|
73 |
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/> |
|
74 |
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="0"/> |
|
75 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/> |
|
76 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants.count_dependent" value="16|5|48"/> |
|
77 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/> |
|
78 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/> |
|
79 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/> |
|
80 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/> |
|
81 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/> |
|
82 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/> |
|
83 |
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/> |
|
84 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/> |
|
85 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/> |
|
86 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/> |
|
87 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/> |
|
88 |
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/> |
|
89 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/> |
|
90 |
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="100"/> |
|
91 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/> |
|
92 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation.count_dependent" value="16|4|48"/> |
|
93 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/> |
|
94 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/> |
|
95 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/> |
|
96 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/> |
|
97 |
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/> |
|
98 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/> |
|
99 |
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/> |
|
100 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/> |
|
101 |
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/> |
|
102 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/> |
|
103 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package" value="1585"/> |
|
104 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/> |
|
105 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="16"/> |
|
106 |
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/> |
|
107 |
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/> |
|
108 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/> |
|
109 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/> |
|
110 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/> |
|
111 |
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/> |
|
112 |
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/> |
|
113 |
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/> |
|
114 |
<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation" value="true"/> |
|
115 |
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/> |
|
116 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/> |
|
117 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_field_declaration" value="16"/> |
|
118 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/> |
|
119 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/> |
|
120 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/> |
|
121 |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/> |
|
122 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="do not insert"/> |
|
123 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/> |
|
124 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/> |
|
125 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/> |
|
126 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/> |
|
127 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/> |
|
128 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/> |
|
129 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/> |
|
130 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/> |
|
131 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/> |
|
132 |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/> |
|
133 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/> |
|
134 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/> |
|
135 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/> |
|
136 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/> |
|
137 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/> |
|
138 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/> |
|
139 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/> |
|
140 |
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/> |
|
141 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/> |
|
142 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/> |
|
143 |
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/> |
|
144 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments" value="16"/> |
|
145 |
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/> |
|
146 |
<setting id="org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph" value="true"/> |
|
147 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/> |
|
148 |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/> |
|
149 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comment_prefix" value="do not insert"/> |
|
150 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/> |
|
151 |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/> |
|
152 |
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/> |
|
153 |
<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation" value="false"/> |
|
154 |
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/> |
|
155 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/> |
|
156 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/> |
|
157 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method" value="1585"/> |
|
158 |
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/> |
|
159 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/> |
|
160 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/> |
|
161 |
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/> |
|
162 |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/> |
|
163 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/> |
|
164 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/> |
|
165 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/> |
|
166 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/> |
|
167 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/> |
|
168 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/> |
|
169 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/> |
|
170 |
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="2"/> |
|
171 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/> |
|
172 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/> |
|
173 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/> |
|
174 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/> |
|
175 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="do not insert"/> |
|
176 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/> |
|
177 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/> |
|
178 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/> |
|
179 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/> |
|
180 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation.count_dependent" value="16|5|80"/> |
|
181 |
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/> |
|
182 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter.count_dependent" value="1040|-1|1040"/> |
|
183 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/> |
|
184 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/> |
|
185 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/> |
|
186 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package.count_dependent" value="1585|-1|1585"/> |
|
187 |
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/> |
|
188 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/> |
|
189 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/> |
|
190 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/> |
|
191 |
<setting id="org.eclipse.jdt.core.formatter.force_if_else_statement_brace" value="true"/> |
|
192 |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/> |
|
193 |
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="3"/> |
|
194 |
<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation" value="true"/> |
|
195 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/> |
|
196 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/> |
|
197 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/> |
|
198 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/> |
|
199 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/> |
|
200 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/> |
|
201 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation.count_dependent" value="16|-1|16"/> |
|
202 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/> |
|
203 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type" value="1585"/> |
|
204 |
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7"/> |
|
205 |
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/> |
|
206 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/> |
|
207 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/> |
|
208 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/> |
|
209 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/> |
|
210 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/> |
|
211 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class" value="20"/> |
|
212 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/> |
|
213 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable.count_dependent" value="1585|-1|1585"/> |
|
214 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/> |
|
215 |
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/> |
|
216 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/> |
|
217 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field.count_dependent" value="1585|-1|1585"/> |
|
218 |
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/> |
|
219 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/> |
|
220 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/> |
|
221 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/> |
|
222 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="insert"/> |
|
223 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/> |
|
224 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/> |
|
225 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration.count_dependent" value="16|5|80"/> |
|
226 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/> |
|
227 |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/> |
|
228 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/> |
|
229 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/> |
|
230 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/> |
|
231 |
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/> |
|
232 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/> |
|
233 |
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="false"/> |
|
234 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/> |
|
235 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/> |
|
236 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/> |
|
237 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/> |
|
238 |
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/> |
|
239 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/> |
|
240 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/> |
|
241 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant.count_dependent" value="16|-1|16"/> |
|
242 |
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="100"/> |
|
243 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/> |
|
244 |
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="0"/> |
|
245 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/> |
|
246 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/> |
|
247 |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/> |
|
248 |
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/> |
|
249 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/> |
|
250 |
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/> |
|
251 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/> |
|
252 |
<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/> |
|
253 |
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2"/> |
|
254 |
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/> |
|
255 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/> |
|
256 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/> |
|
257 |
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/> |
|
258 |
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/> |
|
259 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/> |
|
260 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/> |
|
261 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/> |
|
262 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/> |
|
263 |
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/> |
|
264 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/> |
|
265 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/> |
|
266 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/> |
|
267 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/> |
|
268 |
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="0"/> |
|
269 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/> |
|
270 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field" value="1585"/> |
|
271 |
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/> |
|
272 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/> |
|
273 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/> |
|
274 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/> |
|
275 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="do not insert"/> |
|
276 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/> |
|
277 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> |
|
278 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/> |
|
279 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer.count_dependent" value="16|5|80"/> |
|
280 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/> |
|
281 |
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/> |
|
282 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/> |
|
283 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/> |
|
284 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/> |
|
285 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/> |
|
286 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/> |
|
287 |
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7"/> |
|
288 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/> |
|
289 |
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/> |
|
290 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="16"/> |
|
291 |
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/> |
|
292 |
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/> |
|
293 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/> |
|
294 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/> |
|
295 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/> |
|
296 |
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/> |
|
297 |
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/> |
|
298 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/> |
|
299 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/> |
|
300 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/> |
|
301 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration.count_dependent" value="16|4|48"/> |
|
302 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/> |
|
303 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/> |
|
304 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method.count_dependent" value="1585|-1|1585"/> |
|
305 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/> |
|
306 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/> |
|
307 |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/> |
|
308 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/> |
|
309 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/> |
|
310 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression.count_dependent" value="16|-1|16"/> |
|
311 |
<setting id="org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation" value="true"/> |
|
312 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable" value="1585"/> |
|
313 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/> |
|
314 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/> |
|
315 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call.count_dependent" value="16|5|80"/> |
|
316 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/> |
|
317 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> |
|
318 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/> |
|
319 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/> |
|
320 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments.count_dependent" value="16|-1|16"/> |
|
321 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/> |
|
322 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression.count_dependent" value="16|5|80"/> |
|
323 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/> |
|
324 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration.count_dependent" value="16|5|80"/> |
|
325 |
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/> |
|
326 |
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/> |
|
327 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/> |
|
328 |
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/> |
|
329 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/> |
|
330 |
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/> |
|
331 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/> |
|
332 |
<setting id="org.eclipse.jdt.core.formatter.alignment_for_for_statement" value="16"/> |
|
333 |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/> |
|
334 |
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/> |
|
335 |
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/> |
|
336 |
</profile> |
|
337 |
</profiles> |
demo_jh/Deserializer_tests/lib/licences | ||
---|---|---|
1 |
JACKSON JSON |
|
2 |
|
|
3 |
This copy of Jackson JSON processor streaming parser/generator is licensed under the |
|
4 |
Apache (Software) License, version 2.0 ("the License"). |
|
5 |
See the License for details about distribution rights, and the |
|
6 |
specific rights regarding derivate works. |
|
7 |
|
|
8 |
You may obtain a copy of the License at: |
|
9 |
|
|
10 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
11 |
|
|
12 |
************************************************************ |
|
13 |
|
|
14 |
JDESERIALIZE |
|
15 |
|
|
16 |
https://code.google.com/archive/p/jdeserialize/ |
|
17 |
https://opensource.org/licenses/BSD-3-Clause |
|
18 |
Copyright <YEAR> <COPYRIGHT HOLDER> |
|
19 |
|
|
20 |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
|
21 |
|
|
22 |
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
|
23 |
|
|
24 |
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
|
25 |
|
|
26 |
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
|
27 |
|
|
28 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
demo_jh/Deserializer_tests/src/app/App.java | ||
---|---|---|
1 |
package app; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
import java.io.FileInputStream; |
|
5 |
import java.io.FileOutputStream; |
|
6 |
import java.io.IOException; |
|
7 |
import java.io.ObjectInputStream; |
|
8 |
import java.io.ObjectOutputStream; |
|
9 |
import java.util.List; |
|
10 |
import org.codehaus.jackson.map.ObjectMapper; |
|
11 |
import org.codehaus.jackson.map.ObjectWriter; |
|
12 |
import org.unsynchronized.jdeserialize; |
|
13 |
|
|
14 |
public class App { |
|
15 |
|
|
16 |
/** |
|
17 |
* When the Serialized and deserialized classes are same, but placed in diff packages, the |
|
18 |
* deserialization does not work. When they are |
|
19 |
**/ |
|
20 |
public static void main(String[] args) throws Exception { |
|
21 |
App app = new App(); |
|
22 |
|
|
23 |
app.standartSerializationDeserialization(); |
|
24 |
String res = app.objectToJSON(new samples.ok.Simple()); |
|
25 |
System.out.println(res); |
|
26 |
|
|
27 |
//test with calling the name of original jd project |
|
28 |
//app.jdCallMain(); |
|
29 |
|
|
30 |
// test directly through code call |
|
31 |
//app.jdCallLib("serialized/simple.out", true, "deserializedResults/simple.json"); |
|
32 |
//System.out.println("Vše OK, díky."); |
|
33 |
} |
|
34 |
|
|
35 |
/** |
|
36 |
* Calls the jdeserialize through library approach. |
|
37 |
* |
|
38 |
* SHOULD NOT BE HERE |
|
39 |
* **/ |
|
40 |
private void jdCallLib(String filename, boolean dump, String outputFileJSON) |
|
41 |
{ |
|
42 |
try |
|
43 |
{ |
|
44 |
//FileInputStream as usual |
|
45 |
FileInputStream fis = null; |
|
46 |
fis = new FileInputStream(filename); |
|
47 |
|
|
48 |
//creating an instance of jdeserialize with given filename |
|
49 |
jdeserialize jd = new jdeserialize(filename); |
|
50 |
//running the main process of deserialization |
|
51 |
jd.run(fis, false); |
|
52 |
|
|
53 |
//gets the "contents" into an array - returnes the deserialization of all |
|
54 |
// 'writes' into serialized object via objectOutputStream |
|
55 |
List cntnts = jd.getContent(); |
|
56 |
String classname = cntnts.get(0).getClass().getName(); |
|
57 |
|
|
58 |
//testing with only first of the contents |
|
59 |
String json = objectToJSON(cntnts.get(0)); |
|
60 |
|
|
61 |
if(dump) |
|
62 |
{ |
|
63 |
System.out.println(json); |
|
64 |
} |
|
65 |
if(outputFileJSON != null && !outputFileJSON.isEmpty()) |
|
66 |
{ |
|
67 |
File toWrite = new File(outputFileJSON); |
|
68 |
toWrite.createNewFile(); |
|
69 |
|
|
70 |
FileOutputStream fos = new FileOutputStream(toWrite, false); |
|
71 |
ObjectOutputStream oos = new ObjectOutputStream(fos); |
|
72 |
|
|
73 |
oos.writeObject(json); |
|
74 |
oos.flush(); |
|
75 |
oos.close(); |
|
76 |
System.out.println("Soubor " + outputFileJSON + " s deserializovaným objektem vytvořen."); |
|
77 |
} |
|
78 |
|
|
79 |
} |
|
80 |
catch (IOException e) |
|
81 |
{ |
|
82 |
|
|
83 |
} |
|
84 |
} |
|
85 |
|
|
86 |
/** |
|
87 |
* Parses any object into String in JSON format |
|
88 |
* |
|
89 |
* SHOULD NOT BE HERE |
|
90 |
* **/ |
|
91 |
private String objectToJSON(Object in) |
|
92 |
{ |
|
93 |
ObjectWriter ow = new ObjectMapper().writer().withDefaultPrettyPrinter(); |
|
94 |
String json = ""; |
|
95 |
try |
|
96 |
{ |
|
97 |
json = ow.writeValueAsString(in); |
|
98 |
} |
|
99 |
catch (IOException e) |
|
100 |
{ |
|
101 |
// TODO Auto-generated catch block |
|
102 |
e.printStackTrace(); |
|
103 |
} |
|
104 |
|
|
105 |
return json; |
|
106 |
} |
|
107 |
|
|
108 |
/** |
|
109 |
* Basically, does the dump of deserialized object |
|
110 |
* Just to check if everything works well |
|
111 |
* and well, it does |
|
112 |
* |
|
113 |
* SHOULD NOT BE HERE |
|
114 |
* NOT NEEDED |
|
115 |
* **/ |
|
116 |
private void jdCallMain(String filename) |
|
117 |
{ |
|
118 |
String[] myArgs= new String[1]; |
|
119 |
myArgs[0] = filename; |
|
120 |
jdeserialize.main(myArgs); //testing call without any options. Outputs the deserialized data into console. |
|
121 |
} |
|
122 |
|
|
123 |
/** |
|
124 |
* Serializes and deserializes when the object remains untouched. |
|
125 |
* The package names used in this example shows the result (nearly clear) |
|
126 |
* |
|
127 |
* SHOULD NOT BE HERE |
|
128 |
* NOT NEEDED |
|
129 |
* **/ |
|
130 |
private void standartSerializationDeserialization() { |
|
131 |
try { |
|
132 |
System.out.println("Starting..."); |
|
133 |
|
|
134 |
this.serialize(new samples.ok.Simple(), "serialized/simple.out"); |
|
135 |
|
|
136 |
//samples.ok.SimpleChild test1 = this.deserialize("serialized/simple.out"); |
|
137 |
|
|
138 |
} catch (Exception e) { |
|
139 |
System.out.println(e.toString()); |
|
140 |
System.out.println(e.getMessage()); |
|
141 |
} |
|
142 |
} |
|
143 |
|
|
144 |
/** |
|
145 |
* Standard way of deserializing objects with java. |
|
146 |
* |
|
147 |
* Taken from example method, doc |
|
148 |
* |
|
149 |
* SHOULD NOT BE HERE |
|
150 |
* NOT NEEDED |
|
151 |
**/ |
|
152 |
private <T> T deserialize(String inputFilePath) { |
|
153 |
try { |
|
154 |
FileInputStream fis = new FileInputStream(inputFilePath); |
|
155 |
ObjectInputStream ois = new ObjectInputStream(fis); |
|
156 |
T deserialized = (T) ois.readObject(); |
|
157 |
System.out.println(deserialized.toString()); |
|
158 |
ois.close(); |
|
159 |
|
|
160 |
return deserialized; |
|
161 |
} catch (IOException e) { |
|
162 |
e.printStackTrace(); |
|
163 |
} catch (ClassNotFoundException e) { |
|
164 |
e.printStackTrace(); |
|
165 |
} |
|
166 |
return null; |
|
167 |
} |
|
168 |
|
|
169 |
/** |
|
170 |
* Standard way of serializing objects with java. |
|
171 |
* |
|
172 |
* Taken from example method, doc |
|
173 |
* |
|
174 |
* SHOULD NOT BE HERE |
|
175 |
**/ |
|
176 |
private void serialize(Object obj, String outputPath) { |
|
177 |
try { |
|
178 |
File toWrite = new File(outputPath); |
|
179 |
toWrite.createNewFile(); |
|
180 |
|
|
181 |
FileOutputStream fos = new FileOutputStream(toWrite, false); |
|
182 |
ObjectOutputStream oos = new ObjectOutputStream(fos); |
|
183 |
|
|
184 |
oos.writeObject(obj); |
|
185 |
oos.flush(); |
|
186 |
oos.close(); |
|
187 |
System.out.println("serialized."); |
|
188 |
} catch (Exception e) { |
|
189 |
e.printStackTrace(); |
|
190 |
} |
|
191 |
} |
|
192 |
} |
demo_jh/Deserializer_tests/src/samples/nok/Simple.java | ||
---|---|---|
1 |
package samples.nok; |
|
2 |
|
|
3 |
import java.io.Serializable; |
|
4 |
|
|
5 |
public class Simple implements Serializable |
|
6 |
{ |
|
7 |
private static final long serialVersionUID = 1L; |
|
8 |
|
|
9 |
private String pozdrav = "AHOJ"; |
|
10 |
private int testInt = 123; |
|
11 |
private double testDouble = 1.00; |
|
12 |
|
|
13 |
public Simple() |
|
14 |
{ |
|
15 |
int locInt = 5; |
|
16 |
} |
|
17 |
} |
demo_jh/Deserializer_tests/src/samples/ok/Inner.java | ||
---|---|---|
1 |
package samples.ok; |
|
2 |
|
|
3 |
import java.io.Serializable; |
|
4 |
|
|
5 |
public class Inner implements Serializable{ |
|
6 |
public String vnitrni = "INNER STRING AM I"; |
|
7 |
} |
demo_jh/Deserializer_tests/src/samples/ok/Simple.java | ||
---|---|---|
1 |
package samples.ok; |
|
2 |
|
|
3 |
import java.io.Serializable; |
|
4 |
|
|
5 |
public class Simple extends SimpleChild implements Serializable |
|
6 |
{ |
|
7 |
enum Level { |
|
8 |
LOW, |
|
9 |
MEDIUM, |
|
10 |
HIGH |
|
11 |
} |
|
12 |
|
|
13 |
public static final long serialVersionUID = 1L; |
|
14 |
|
|
15 |
public String pozdrav = "AHOJ"; |
|
16 |
public int testInt = 123; |
|
17 |
public double testDouble = 1.00; |
|
18 |
public int[] intArray = new int[3]; |
|
19 |
public String[] stringArray = new String[3]; |
|
20 |
|
|
21 |
public Inner locInnerClassInstance = new Inner(); |
|
22 |
|
|
23 |
public Level localEnum = Level.LOW; |
|
24 |
|
|
25 |
public Simple() |
|
26 |
{ |
|
27 |
int locInt = 5; |
|
28 |
this.intArray[0] = 5; |
|
29 |
this.intArray[1] = 10; |
|
30 |
this.intArray[2] = 15; |
|
31 |
|
|
32 |
this.stringArray[0] = "A"; |
|
33 |
this.stringArray[1] = "B"; |
|
34 |
this.stringArray[2] = "C"; |
|
35 |
} |
|
36 |
} |
demo_jh/Deserializer_tests/src/samples/ok/SimpleChild.java | ||
---|---|---|
1 |
package samples.ok; |
|
2 |
|
|
3 |
import java.io.Serializable; |
|
4 |
|
|
5 |
public class SimpleChild implements Serializable { |
|
6 |
String navic = "AHOJ, jsem tu navic"; |
|
7 |
} |
demo_mh/.gitignore | ||
---|---|---|
1 |
/.metadata/ |
demo_mh/Deserializer/.classpath | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<classpath> |
|
3 |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> |
|
4 |
<classpathentry kind="src" path="src"/> |
|
5 |
<classpathentry kind="lib" path="D:/Michal/University/1/LS/ASWI/semestralky/Deserializer/aswi2020horky/demo_mh/Deserializer/libs/jackson-core-asl-1.9.13.jar"/> |
|
6 |
<classpathentry kind="lib" path="D:/Michal/University/1/LS/ASWI/semestralky/Deserializer/aswi2020horky/demo_mh/Deserializer/libs/jackson-mapper-asl-1.9.13.jar"/> |
|
7 |
<classpathentry kind="lib" path="D:/Michal/University/1/LS/ASWI/semestralky/Deserializer/aswi2020horky/demo_mh/Deserializer/libs/jdeserialize-1.2.jar"/> |
|
8 |
<classpathentry kind="output" path="bin"/> |
|
9 |
</classpath> |
demo_mh/Deserializer/.gitignore | ||
---|---|---|
1 |
/bin/ |
|
2 |
/.settings/ |
|
3 |
/.vscode/ |
|
4 |
/.* |
demo_mh/Deserializer/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>Deserializer</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
<buildCommand> |
|
9 |
<name>org.eclipse.jdt.core.javabuilder</name> |
|
10 |
<arguments> |
|
11 |
</arguments> |
|
12 |
</buildCommand> |
|
13 |
</buildSpec> |
|
14 |
<natures> |
|
15 |
<nature>org.eclipse.jdt.core.javanature</nature> |
|
16 |
</natures> |
|
17 |
</projectDescription> |
demo_mh/Deserializer/.vscode/launch.json | ||
---|---|---|
1 |
{ |
|
2 |
// Use IntelliSense to learn about possible attributes. |
|
3 |
// Hover to view descriptions of existing attributes. |
|
4 |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 |
|
5 |
"version": "0.2.0", |
|
6 |
"configurations": [ |
|
7 |
{ |
|
8 |
"type": "java", |
|
9 |
"name": "Debug (Launch) - Current File", |
|
10 |
"request": "launch", |
|
11 |
"mainClass": "${file}" |
|
12 |
}, |
|
13 |
{ |
|
14 |
"type": "java", |
|
15 |
"name": "Debug (Launch)-Deserializer<Deserializer>", |
|
16 |
"request": "launch", |
|
17 |
"mainClass": "deserialize.Deserializer", |
|
18 |
"projectName": "Deserializer" |
|
19 |
}, |
|
20 |
{ |
|
21 |
"type": "java", |
|
22 |
"name": "Debug (Launch)-Example<Deserializer>", |
|
23 |
"request": "launch", |
|
24 |
"mainClass": "serialize.Example", |
|
25 |
"projectName": "Deserializer" |
|
26 |
} |
|
27 |
] |
|
28 |
} |
demo_mh/Deserializer/libs/Licenses | ||
---|---|---|
1 |
|
|
2 |
JACKSON JSON |
|
3 |
|
|
4 |
This copy of Jackson JSON processor streaming parser/generator is licensed under the |
|
5 |
Apache (Software) License, version 2.0 ("the License"). |
|
6 |
See the License for details about distribution rights, and the |
|
7 |
specific rights regarding derivate works. |
|
8 |
|
|
9 |
You may obtain a copy of the License at: |
|
10 |
|
|
11 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
12 |
|
|
13 |
************************************************************ |
|
14 |
|
|
15 |
JDESERIALIZE |
|
16 |
|
|
17 |
https://code.google.com/archive/p/jdeserialize/ |
|
18 |
https://opensource.org/licenses/BSD-3-Clause |
|
19 |
Copyright <YEAR> <COPYRIGHT HOLDER> |
|
20 |
|
|
21 |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
|
22 |
|
|
23 |
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
|
24 |
|
|
25 |
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
|
26 |
|
|
27 |
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
|
28 |
|
|
29 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
demo_mh/Deserializer/results.json | ||
---|---|---|
1 |
{ |
|
2 |
"class serialize.Example extends serialize.Example implements java.io.Serializable" : { |
|
3 |
"numberX" : "7", |
|
4 |
"x" : "10.0", |
|
5 |
"variable" : { |
|
6 |
"class serialize.Contain implements java.io.Serializable" : { |
|
7 |
"array" : "[W, X, Y, Z]", |
|
8 |
"array2" : "NOT_IMPLEMENTED" |
|
9 |
} |
|
10 |
}, |
|
11 |
"parent" : { |
|
12 |
"class serialize.Parent implements java.io.Serializable" : { |
|
13 |
"abc" : "true", |
|
14 |
"y" : "59.87", |
|
15 |
"str" : "ABCD" |
|
16 |
} |
|
17 |
} |
|
18 |
} |
|
19 |
} |
demo_mh/Deserializer/src/deserialize/ByteReader.java | ||
---|---|---|
1 |
package deserialize; |
|
2 |
|
|
3 |
import java.nio.ByteBuffer; |
|
4 |
import java.util.Arrays; |
|
5 |
|
|
6 |
// TODO osetreni vyjimek... a to celkove vsude. Zatim ponechavano z duvodu testovani. |
|
7 |
|
|
8 |
public class ByteReader { |
|
9 |
|
|
10 |
private byte[] buffer; |
|
11 |
private int actPos; |
|
12 |
|
|
13 |
public ByteReader(byte buffer[]) { |
|
14 |
this.buffer = Arrays.copyOf(buffer, buffer.length); |
|
15 |
actPos = 0; |
|
16 |
} |
|
17 |
|
|
18 |
public boolean end() { |
|
19 |
return actPos >= buffer.length; |
|
20 |
} |
|
21 |
|
|
22 |
private byte readNext() { |
|
23 |
return buffer[actPos++]; |
|
24 |
} |
|
25 |
|
|
26 |
private long readNumber(int bytes) { |
|
27 |
long result = 0; |
|
28 |
for (int i = (bytes - 1) * Byte.SIZE; i >= 0; i -= Byte.SIZE) { |
|
29 |
result = result | ((readNext() & 0xFF) << i); |
|
30 |
} |
|
31 |
return result; |
|
32 |
} |
|
33 |
|
|
34 |
public byte readByte() { |
|
35 |
return readNext(); |
|
36 |
} |
|
37 |
|
|
38 |
public char readUnsignedByte() { |
|
39 |
return (char) readNumber(Byte.BYTES); |
|
40 |
} |
|
41 |
|
|
42 |
public short readShort() { |
|
43 |
return (short) readNumber(Short.BYTES); |
|
44 |
} |
|
45 |
|
|
46 |
public char readChar() { |
|
47 |
return (char) readShort(); |
|
48 |
} |
|
49 |
|
|
50 |
public int readInt() { |
|
51 |
return (int) readNumber(Integer.BYTES); |
|
52 |
} |
|
53 |
|
|
54 |
public long readLong() { |
|
55 |
return readNumber(Long.BYTES); |
|
56 |
} |
|
57 |
|
|
58 |
public String readString(long length) { |
|
59 |
String str = ""; |
|
60 |
for (int i = 0; i < length; i++) { |
|
61 |
str += (char) readByte(); |
|
62 |
} |
|
63 |
return str; |
|
64 |
} |
|
65 |
|
|
66 |
public String readUtf() { |
|
67 |
short length = readShort(); |
|
68 |
return readString(length); |
|
69 |
} |
|
70 |
|
|
71 |
public String readLongUtf() { |
|
72 |
long length = readLong(); |
|
73 |
return readString(length); |
|
74 |
} |
|
75 |
|
|
76 |
public float readFloat() { |
|
77 |
return Float.intBitsToFloat(readInt()); |
|
78 |
} |
|
79 |
|
|
80 |
public double readDouble() { |
|
81 |
// return Double.longBitsToDouble(readLong()); DOESNT WORK... |
|
82 |
byte b[] = new byte[Long.BYTES]; |
|
83 |
for (int i = 0; i < b.length; i++) { |
|
84 |
b[i] = readByte(); |
|
85 |
} |
|
86 |
return ByteBuffer.wrap(b).getDouble(); |
|
87 |
} |
|
88 |
|
|
89 |
public boolean readBoolean() { |
|
90 |
return readByte() != 0; |
|
91 |
} |
|
92 |
|
|
93 |
} |
demo_mh/Deserializer/src/deserialize/ClassDescription.java | ||
---|---|---|
1 |
package deserialize; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
4 |
import java.util.List; |
|
5 |
|
|
6 |
import org.codehaus.jackson.JsonNode; |
|
7 |
import org.codehaus.jackson.map.ObjectMapper; |
|
8 |
import org.codehaus.jackson.node.ObjectNode; |
|
9 |
|
|
10 |
public class ClassDescription { |
|
11 |
|
|
12 |
private final static byte SC_SERIALIZABLE = (byte) 0x02; |
|
13 |
private final static byte SC_EXTERNALIZABLE = (byte) 0x04; |
|
14 |
|
|
15 |
String className; |
|
16 |
long serialVersionUID; |
|
17 |
byte flags; |
|
18 |
boolean isClass; // or enum |
|
19 |
|
|
20 |
// Class is in the first place, parents are in the other positions. |
|
21 |
private List<ClassDescription> instances = new ArrayList<ClassDescription>(); |
|
22 |
private int actParentIndex = -1; |
|
23 |
|
|
24 |
private List<Variable> variables = new ArrayList<Variable>(); |
|
25 |
private int actVariableIndex = -1; |
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
public List<ClassDescription> getInstances() { |
|
30 |
return instances; |
|
31 |
} |
|
32 |
|
|
33 |
public List<Variable> getVariables() { |
|
34 |
return variables; |
|
35 |
} |
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
public Variable nextVariable() { |
|
40 |
if (++actVariableIndex < variables.size()) { |
|
41 |
return variables.get(actVariableIndex); |
|
42 |
} else { |
|
43 |
return null; |
|
44 |
} |
|
45 |
} |
|
46 |
|
|
47 |
public void addParent(ClassDescription parent) { |
|
48 |
instances.add(parent); |
|
49 |
actParentIndex++; |
|
50 |
} |
|
51 |
|
|
52 |
public Variable getActVariable() { |
|
53 |
for (; actParentIndex >= 0; actParentIndex--) { |
|
54 |
Variable var = instances.get(actParentIndex).nextVariable(); |
|
55 |
if (var != null) { |
|
56 |
return var; |
|
57 |
} |
|
58 |
} |
|
59 |
return null; |
|
60 |
} |
|
61 |
|
|
62 |
public void setVariables(List<Variable> variables) { |
|
63 |
this.variables = variables; |
|
64 |
} |
|
65 |
|
|
66 |
public JsonNode getJsonNode() { |
|
67 |
int actIndex = ++actParentIndex; |
|
68 |
|
|
69 |
ObjectMapper mapper = new ObjectMapper(); |
|
70 |
|
|
71 |
JsonNode childNode = mapper.createObjectNode(); |
|
72 |
for (int j = 0; j < variables.size(); j++) { |
|
73 |
variables.get(j).putToJson((ObjectNode) childNode); |
|
74 |
} |
|
75 |
if ((actIndex + 1) < instances.size()) { |
|
76 |
((ObjectNode) childNode).put("parent", instances.get(actIndex + 1).getJsonNode()); |
|
77 |
} |
|
78 |
|
|
79 |
String name; |
|
80 |
if (isClass) { |
|
81 |
name = "class"; |
|
82 |
} else { |
|
83 |
name = "enum"; |
|
84 |
} |
|
85 |
|
|
86 |
name += " " + className; |
|
87 |
|
|
88 |
if (actIndex < instances.size()) { |
|
89 |
name += " extends " + instances.get(actIndex).className; |
|
90 |
} |
|
91 |
|
|
92 |
if (flags == SC_SERIALIZABLE) { |
|
93 |
name += " implements java.io.Serializable"; |
|
94 |
} else if (flags == SC_EXTERNALIZABLE) { |
|
95 |
name += " implements java.io.Externalizable"; |
|
96 |
} |
|
97 |
|
|
98 |
JsonNode rootNode = mapper.createObjectNode(); |
|
99 |
((ObjectNode) rootNode).put(name, childNode); |
|
100 |
return rootNode; |
|
101 |
} |
|
102 |
|
|
103 |
@Override |
|
104 |
public String toString() { |
|
105 |
actParentIndex++; |
|
106 |
String retValue = ""; |
|
107 |
|
|
108 |
if (isClass) { |
|
109 |
retValue = "class"; |
|
110 |
} else { |
|
111 |
retValue = "enum"; |
|
112 |
} |
|
113 |
|
|
114 |
retValue += " " + className; |
|
115 |
|
|
116 |
if ((actParentIndex + 1) < instances.size()) { |
|
117 |
retValue += " extends " + instances.get(actParentIndex + 1).className; |
|
118 |
} |
|
119 |
|
|
120 |
if (flags == SC_SERIALIZABLE) { |
|
121 |
retValue += " implements java.io.Serializable"; |
|
122 |
} else if (flags == SC_EXTERNALIZABLE) { |
|
123 |
retValue += " implements java.io.Externalizable"; |
|
124 |
} |
|
125 |
|
|
126 |
retValue += "\n{\n"; |
|
127 |
for (int i = 0; i < variables.size(); i++) { |
|
128 |
if (i > 0) { |
|
129 |
retValue += "\n"; |
|
130 |
} |
|
131 |
retValue += " " + variables.get(i).toString() + ";"; |
|
132 |
} |
|
133 |
retValue += "\n}\n"; |
|
134 |
|
|
135 |
if ((actParentIndex + 1) < instances.size()) { |
|
136 |
retValue += instances.get(actParentIndex + 1).toString(); |
|
137 |
} |
|
138 |
|
|
139 |
return retValue; |
|
140 |
} |
|
141 |
|
|
142 |
} |
demo_mh/Deserializer/src/deserialize/DataType.java | ||
---|---|---|
1 |
package deserialize; |
|
2 |
|
|
3 |
import java.util.HashMap; |
|
4 |
|
|
5 |
public class DataType { |
|
6 |
|
|
7 |
public final static HashMap<Character, String> primTypeCodes; |
|
8 |
public final static HashMap<Character, String> objTypeCodes; |
|
9 |
|
|
10 |
static { |
|
11 |
primTypeCodes = new HashMap<Character, String>(); |
|
12 |
primTypeCodes.put('B', "byte"); |
|
13 |
primTypeCodes.put('C', "char"); |
|
14 |
primTypeCodes.put('D', "double"); |
|
15 |
primTypeCodes.put('F', "float"); |
|
16 |
primTypeCodes.put('I', "integer"); |
|
17 |
primTypeCodes.put('J', "long"); |
|
18 |
primTypeCodes.put('S', "short"); |
|
19 |
primTypeCodes.put('Z', "boolean"); |
|
20 |
|
|
21 |
objTypeCodes = new HashMap<Character, String>(); |
|
22 |
objTypeCodes.put('[', "array"); |
|
23 |
objTypeCodes.put('L', "object"); |
|
24 |
} |
|
25 |
|
|
26 |
public static boolean isPrimaryType(char type) { |
|
27 |
return primTypeCodes.containsKey(type); |
|
28 |
} |
|
29 |
|
|
30 |
} |
demo_mh/Deserializer/src/deserialize/Deserializer.java | ||
---|---|---|
1 |
package deserialize; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
|
|
5 |
import javafx.application.Application; |
|
6 |
import javafx.geometry.Insets; |
|
7 |
import javafx.geometry.Pos; |
|
8 |
import javafx.scene.Parent; |
|
9 |
import javafx.scene.Scene; |
|
10 |
import javafx.scene.control.Button; |
|
11 |
import javafx.scene.control.Label; |
|
12 |
import javafx.scene.control.Separator; |
|
13 |
import javafx.scene.layout.HBox; |
|
14 |
import javafx.scene.layout.Pane; |
|
15 |
import javafx.scene.layout.Priority; |
|
16 |
import javafx.scene.layout.VBox; |
|
17 |
import javafx.stage.FileChooser; |
|
18 |
import javafx.stage.Stage; |
|
19 |
|
|
20 |
import serialize.Example; |
|
21 |
|
|
22 |
public class Deserializer extends Application { |
|
23 |
|
|
24 |
private Stage stage; |
|
25 |
private File inputFile; |
|
26 |
private File outputFile; |
|
27 |
|
|
28 |
// TODO delete after deserializer debugging is complete... |
|
29 |
private boolean testing; |
|
30 |
|
|
31 |
public static void main(String[] args) { |
|
32 |
launch(args); |
|
33 |
} |
|
34 |
|
|
35 |
@Override |
|
36 |
public void init() throws Exception { |
|
37 |
super.init(); |
|
38 |
testing = true; |
|
39 |
} |
|
40 |
|
|
41 |
@Override |
|
42 |
public void start(Stage stage) throws Exception { |
|
43 |
this.stage = stage; |
|
44 |
stage.setTitle("Java object universal deserializer"); |
|
45 |
stage.setScene(createScene()); |
|
46 |
stage.setMinWidth(400); |
|
47 |
stage.show(); |
|
48 |
} |
|
49 |
|
|
50 |
private Scene createScene() { |
|
51 |
return new Scene(createLayout()); |
|
52 |
} |
|
53 |
|
|
54 |
private Parent createLayout() { |
|
55 |
VBox layout = new VBox(); |
|
56 |
layout.setPadding(new Insets(10.0)); |
|
57 |
layout.setSpacing(10.0); |
|
58 |
|
|
59 |
Label forDefaultBinFile = new Label("Chcete vytvo?it defaultn? bin?rn? soubor?"); |
|
60 |
Button createBinFile = new Button("Vytvo?it"); |
|
61 |
createBinFile.setOnAction(event -> { |
|
62 |
FileChooser fCh = new FileChooser(); |
|
63 |
fCh.setInitialDirectory(new File(".")); |
|
64 |
fCh.getExtensionFilters().add(new FileChooser.ExtensionFilter("Binary Files", "*.out")); |
|
65 |
File file = fCh.showSaveDialog(stage); |
|
66 |
if (file != null) { |
|
67 |
createSerializedFile(file); |
|
68 |
} |
|
69 |
}); |
|
70 |
final Pane spacer = new Pane(); |
|
71 |
HBox.setHgrow(spacer, Priority.ALWAYS); |
|
72 |
HBox header = new HBox(); |
|
73 |
header.setAlignment(Pos.CENTER_LEFT); |
|
74 |
header.getChildren().add(forDefaultBinFile); |
|
75 |
header.getChildren().add(spacer); |
|
76 |
header.getChildren().add(createBinFile); |
|
77 |
|
|
78 |
Label forInputFile = new Label("Soubor k deserializaci:"); |
|
79 |
Label inputFile = new Label(" Je?t? nebyl vybr?n ??dn? soubor..."); |
|
80 |
inputFile.setStyle("-fx-font-style: italic;"); |
|
81 |
VBox forInput = new VBox(); |
|
82 |
forInput.getChildren().add(forInputFile); |
|
83 |
forInput.getChildren().add(inputFile); |
|
84 |
|
|
85 |
Label forOutputFile = new Label("V?stupn? soubor:"); |
|
86 |
Label outputFile = new Label(" Je?t? nebyl vybr?n ??dn? soubor..."); |
|
87 |
outputFile.setStyle("-fx-font-style: italic;"); |
|
88 |
VBox forOutput = new VBox(); |
|
89 |
forOutput.getChildren().add(forOutputFile); |
|
90 |
forOutput.getChildren().add(outputFile); |
|
91 |
|
|
92 |
Button convert = new Button("P?ev?st"); |
|
93 |
convert.setOnAction(event -> { |
|
94 |
// a.data a b.data customers test files (binary files) |
|
95 |
ToJSON thread = new ToJSON(testing ? new File("data.out") : this.inputFile, testing ? new File("results.json") : this.outputFile); |
|
96 |
thread.start(); |
|
97 |
}); |
|
98 |
convert.setDisable(!testing); |
|
99 |
Button setInputFile = new Button("Vstupn? soubor"); |
|
100 |
setInputFile.setOnAction(event -> { |
|
101 |
FileChooser fCh = new FileChooser(); |
|
102 |
fCh.setInitialDirectory(new File(".")); |
|
103 |
// The input can be a zip file or file without a specific extension -> file chooser without extension filters... |
|
104 |
// fCh.getExtensionFilters().add(new FileChooser.ExtensionFilter("Binary Files", "*.out")); |
|
105 |
File file = fCh.showOpenDialog(stage); |
|
106 |
if (file != null) { |
|
107 |
this.inputFile = file; |
|
108 |
inputFile.setText(this.inputFile == null ? "" : this.inputFile.getAbsolutePath()); |
|
109 |
inputFile.setStyle("-fx-font-weight: bold;"); |
|
110 |
convert.setDisable(this.inputFile == null || this.outputFile == null); |
|
111 |
} |
|
112 |
}); |
|
113 |
Button setOutputFile = new Button("V?stupn? soubor"); |
|
114 |
setOutputFile.setOnAction(event -> { |
|
115 |
FileChooser fCh = new FileChooser(); |
|
116 |
fCh.setInitialDirectory(new File(".")); |
|
117 |
fCh.getExtensionFilters().add(new FileChooser.ExtensionFilter("JSON Files", "*.json")); |
|
118 |
File file = fCh.showSaveDialog(stage); |
|
119 |
if (file != null) { |
|
120 |
this.outputFile = file; |
|
121 |
outputFile.setText(this.outputFile == null ? "" : this.outputFile.getAbsolutePath()); |
|
122 |
outputFile.setStyle("-fx-font-weight: bold;"); |
|
123 |
convert.setDisable(this.inputFile == null || this.outputFile == null); |
|
124 |
} |
|
125 |
}); |
|
126 |
HBox footer = new HBox(); |
|
127 |
footer.setSpacing(10.0); |
|
128 |
footer.setAlignment(Pos.CENTER_RIGHT); |
|
129 |
footer.getChildren().add(setInputFile); |
|
130 |
footer.getChildren().add(setOutputFile); |
|
131 |
footer.getChildren().add(convert); |
|
132 |
|
|
133 |
layout.getChildren().add(header); |
|
134 |
layout.getChildren().add(new Separator()); |
|
135 |
layout.getChildren().add(forInput); |
|
136 |
layout.getChildren().add(forOutput); |
|
137 |
layout.getChildren().add(footer); |
|
138 |
|
|
139 |
return layout; |
|
140 |
} |
|
141 |
|
|
142 |
private void createSerializedFile(File file) { |
|
143 |
String title = "Vytvo?en? defaultn?ho souboru"; |
|
144 |
if (Example.serialize(file)) { |
|
145 |
Report.info(title, null, "Vytvo?en? prob?hlo v po??dku."); |
|
146 |
} else { |
|
147 |
Report.error(title, null, "Vytvo?en? souboru se nepovedlo."); |
|
148 |
} |
|
149 |
} |
|
150 |
|
|
151 |
} |
demo_mh/Deserializer/src/deserialize/Grammar.java | ||
---|---|---|
1 |
package deserialize; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
4 |
import java.util.Arrays; |
|
5 |
import java.util.List; |
|
6 |
|
|
7 |
import org.codehaus.jackson.JsonNode; |
|
8 |
|
|
9 |
/** |
|
10 |
* https://docs.oracle.com/javase/7/docs/platform/serialization/spec/protocol.html |
|
11 |
*/ |
|
12 |
public class Grammar { |
|
13 |
|
|
14 |
private final static short STREAM_MAGIC = (short) 0xACED; |
|
15 |
private final static short STREAM_VERSION = 5; |
|
16 |
private final static byte TC_NULL = 0x70; |
|
17 |
private final static byte TC_REFERENCE = 0x71; |
|
18 |
private final static byte TC_CLASSDESC = 0x72; |
|
19 |
private final static byte TC_OBJECT = 0x73; |
|
20 |
private final static byte TC_STRING = 0x74; |
|
21 |
private final static byte TC_ARRAY = 0x75; |
|
22 |
private final static byte TC_CLASS = 0x76; |
|
23 |
private final static byte TC_BLOCKDATA = 0x77; |
|
24 |
private final static byte TC_ENDBLOCKDATA = 0x78; |
|
25 |
private final static byte TC_RESET = 0x79; |
|
26 |
private final static byte TC_BLOCKDATALONG = 0x7A; |
|
27 |
private final static byte TC_EXCEPTION = 0x7B; |
|
28 |
private final static byte TC_LONGSTRING = 0x7C; |
|
29 |
private final static byte TC_PROXYCLASSDESC = 0x7D; |
|
30 |
private final static byte TC_ENUM = 0x7E; |
|
31 |
private final static int baseWireHandle = (int) 0x7E0000; |
|
32 |
|
|
33 |
final static byte SC_WRITE_METHOD = 0x01; // if SC_SERIALIZABLE |
|
34 |
final static byte SC_BLOCK_DATA = 0x08; // if SC_EXTERNALIZABLE |
|
35 |
final static byte SC_SERIALIZABLE = 0x02; |
|
36 |
final static byte SC_EXTERNALIZABLE = 0x04; |
|
37 |
final static byte SC_ENUM = 0x10; |
|
38 |
|
|
39 |
private ByteReader reader; |
|
40 |
|
|
41 |
public Grammar(byte buffer[]) { |
|
42 |
reader = new ByteReader(buffer); |
|
43 |
} |
|
44 |
|
|
45 |
|
|
46 |
List<ClassDescription> classes = new ArrayList<ClassDescription>(); |
|
47 |
ClassDescription actClass = null; |
|
48 |
|
|
49 |
public JsonNode process() { |
|
50 |
System.out.println("Kontrola hlavicky souboru: " + (reader.readShort() == STREAM_MAGIC && reader.readShort() == STREAM_VERSION)); |
|
51 |
|
|
52 |
while (!reader.end()) { |
|
53 |
try { |
|
54 |
object(); |
|
55 |
} catch (Exception e) { |
|
56 |
e.printStackTrace(); |
|
57 |
break; |
|
58 |
} |
|
59 |
} |
|
60 |
|
|
61 |
return classes.get(0).getJsonNode(); |
|
62 |
// System.out.println(classes.get(0).toString()); |
|
63 |
} |
|
64 |
|
|
65 |
// FOR VALUES : |
|
66 |
// The size and types are described by the |
|
67 |
// classDesc for the current object |
|
68 |
public Object object() { |
|
69 |
Object retValue; |
|
70 |
byte b = reader.readByte(); |
|
71 |
switch (b) { |
|
72 |
case TC_OBJECT: { |
|
73 |
System.out.println("X1"); |
|
74 |
|
|
75 |
// Note. TC_OBJECT; classDesc(); classdata()[]; // data for each class |
|
76 |
// Note. classDescFlags = (byte) |
|
77 |
|
|
78 |
ClassDescription desc = (ClassDescription) object(); |
|
79 |
retValue = desc; |
|
80 |
|
Také k dispozici: Unified diff
re #7893
Poslední úprava adresářové struktury.