=UTF-8
7 |
--------------------------------------------------------------------------------
/config-validation-processor-core/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.builder.cleanOutputFolder=clean
3 | org.eclipse.jdt.core.builder.duplicateResourceTask=warning
4 | org.eclipse.jdt.core.builder.invalidClasspath=abort
5 | org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
6 | org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch,Makefile,Root,Repository,Entries,CVS
7 | org.eclipse.jdt.core.circularClasspath=error
8 | org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
9 | org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
10 | org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error
11 | org.eclipse.jdt.core.codeComplete.argumentPrefixes=
12 | org.eclipse.jdt.core.codeComplete.argumentSuffixes=
13 | org.eclipse.jdt.core.codeComplete.fieldPrefixes=
14 | org.eclipse.jdt.core.codeComplete.fieldSuffixes=
15 | org.eclipse.jdt.core.codeComplete.localPrefixes=
16 | org.eclipse.jdt.core.codeComplete.localSuffixes=
17 | org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
18 | org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
19 | org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
20 | org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
21 | org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
22 | org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
23 | org.eclipse.jdt.core.compiler.annotation.nonnullisdefault=disabled
24 | org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
25 | org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
26 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
27 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
28 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
29 | org.eclipse.jdt.core.compiler.compliance=1.8
30 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
31 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
32 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
33 | org.eclipse.jdt.core.compiler.doc.comment.support=enabled
34 | org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
35 | org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
36 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
37 | org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
38 | org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
39 | org.eclipse.jdt.core.compiler.problem.deadCode=warning
40 | org.eclipse.jdt.core.compiler.problem.deprecation=warning
41 | org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
42 | org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
43 | org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
44 | org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
45 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
46 | org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
47 | org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
48 | org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
49 | org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
50 | org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
51 | org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
52 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
53 | org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
54 | org.eclipse.jdt.core.compiler.problem.includeFieldsInNullAnalysis=disabled
55 | org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
56 | org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
57 | org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
58 | org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
59 | org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
60 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
61 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
62 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
63 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
64 | org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
65 | org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
66 | org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
67 | org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
68 | org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
69 | org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
70 | org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
71 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
72 | org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
73 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
74 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
75 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
76 | org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
77 | org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
78 | org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
79 | org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
80 | org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
81 | org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
82 | org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
83 | org.eclipse.jdt.core.compiler.problem.nullReference=warning
84 | org.eclipse.jdt.core.compiler.problem.nullSpecInsufficientInfo=warning
85 | org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
86 | org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
87 | org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
88 | org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
89 | org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
90 | org.eclipse.jdt.core.compiler.problem.potentialNullSpecViolation=error
91 | org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
92 | org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
93 | org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
94 | org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
95 | org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
96 | org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
97 | org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
98 | org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
99 | org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
100 | org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
101 | org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
102 | org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
103 | org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
104 | org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
105 | org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
106 | org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
107 | org.eclipse.jdt.core.compiler.problem.unclosedCloseable=ignore
108 | org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
109 | org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
110 | org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
111 | org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
112 | org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
113 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
114 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
115 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
116 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
117 | org.eclipse.jdt.core.compiler.problem.unusedImport=warning
118 | org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
119 | org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
120 | org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
121 | org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
122 | org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled
123 | org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
124 | org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
125 | org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
126 | org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
127 | org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
128 | org.eclipse.jdt.core.compiler.source=1.8
129 | org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
130 | org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW
131 | org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,REVIEW,NOTE
132 | org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
133 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
134 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
135 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
136 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
137 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
138 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
139 | org.eclipse.jdt.core.formatter.alignment_for_assignment=0
140 | org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
141 | org.eclipse.jdt.core.formatter.alignment_for_compact_if=52
142 | org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=48
143 | org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
144 | org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
145 | org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
146 | org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
147 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=80
148 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=80
149 | org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
150 | org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=80
151 | org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
152 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
153 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
154 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
155 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
156 | org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
157 | org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
158 | org.eclipse.jdt.core.formatter.blank_lines_after_package=1
159 | org.eclipse.jdt.core.formatter.blank_lines_before_field=0
160 | org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1
161 | org.eclipse.jdt.core.formatter.blank_lines_before_imports=0
162 | org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
163 | org.eclipse.jdt.core.formatter.blank_lines_before_method=1
164 | org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
165 | org.eclipse.jdt.core.formatter.blank_lines_before_package=0
166 | org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
167 | org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
168 | org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
169 | org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
170 | org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
171 | org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
172 | org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
173 | org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
174 | org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
175 | org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
176 | org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
177 | org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
178 | org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
179 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines=true
180 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
181 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
182 | org.eclipse.jdt.core.formatter.comment.format_block_comments=true
183 | org.eclipse.jdt.core.formatter.comment.format_comments=true
184 | org.eclipse.jdt.core.formatter.comment.format_header=false
185 | org.eclipse.jdt.core.formatter.comment.format_html=true
186 | org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
187 | org.eclipse.jdt.core.formatter.comment.format_line_comments=true
188 | org.eclipse.jdt.core.formatter.comment.format_source_code=true
189 | org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
190 | org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
191 | org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
192 | org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
193 | org.eclipse.jdt.core.formatter.comment.line_length=118
194 | org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
195 | org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
196 | org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
197 | org.eclipse.jdt.core.formatter.compact_else_if=true
198 | org.eclipse.jdt.core.formatter.continuation_indentation=2
199 | org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
200 | org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
201 | org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
202 | org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
203 | org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
204 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
205 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
206 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
207 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
208 | org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
209 | org.eclipse.jdt.core.formatter.indent_empty_lines=false
210 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
211 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
212 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
213 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
214 | org.eclipse.jdt.core.formatter.indentation.size=8
215 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
216 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
217 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
218 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
219 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert
220 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
221 | org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
222 | org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
223 | org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
224 | org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
225 | org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
226 | org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
227 | org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
228 | org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
229 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
230 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
231 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
232 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
233 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
234 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
235 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
236 | org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
237 | org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
238 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
239 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
240 | org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
241 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
242 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
243 | org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
244 | org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
245 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
246 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
247 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
248 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
249 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
250 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
251 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
252 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
253 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
254 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
255 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
256 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
257 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
258 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
259 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
260 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
261 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
262 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
263 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
264 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
265 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
266 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
267 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
268 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
269 | org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
270 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
271 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
272 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
273 | org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
274 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
275 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
276 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
277 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
278 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
279 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
280 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
281 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
282 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
283 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
284 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
285 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
286 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
287 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
288 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
289 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
290 | org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
291 | org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
292 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
293 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
294 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
295 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
296 | org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
297 | org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
298 | org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
299 | org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
300 | org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
301 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
302 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
303 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
304 | org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
305 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
306 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
307 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
308 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
309 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
310 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
311 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
312 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
313 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
314 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
315 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
316 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
317 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
318 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
319 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
320 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
321 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
322 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
323 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
324 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
325 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
326 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
327 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
328 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
329 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
330 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
331 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
332 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
333 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
334 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
335 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
336 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
337 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
338 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
339 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
340 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
341 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
342 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
343 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
344 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
345 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
346 | org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
347 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
348 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
349 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
350 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
351 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
352 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=do not insert
353 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
354 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
355 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
356 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
357 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
358 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
359 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
360 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
361 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
362 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
363 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
364 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
365 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
366 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
367 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
368 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
369 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
370 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
371 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
372 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
373 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
374 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
375 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
376 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
377 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
378 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
379 | org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
380 | org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
381 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
382 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
383 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
384 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
385 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
386 | org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
387 | org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
388 | org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
389 | org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
390 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
391 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
392 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
393 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
394 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
395 | org.eclipse.jdt.core.formatter.join_lines_in_comments=true
396 | org.eclipse.jdt.core.formatter.join_wrapped_lines=true
397 | org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
398 | org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true
399 | org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
400 | org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
401 | org.eclipse.jdt.core.formatter.lineSplit=118
402 | org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
403 | org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
404 | org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
405 | org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=2
406 | org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
407 | org.eclipse.jdt.core.formatter.tabulation.char=space
408 | org.eclipse.jdt.core.formatter.tabulation.size=2
409 | org.eclipse.jdt.core.formatter.use_on_off_tags=false
410 | org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
411 | org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
412 | org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
413 | org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
414 | org.eclipse.jdt.core.incompatibleJDKLevel=ignore
415 | org.eclipse.jdt.core.incompleteClasspath=error
416 |
--------------------------------------------------------------------------------
/config-validation-processor-core/.settings/org.eclipse.jdt.launching.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
3 |
--------------------------------------------------------------------------------
/config-validation-processor-core/.settings/org.eclipse.jdt.ui.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
3 | formatter_profile=_NCA-Formatter-Rules
4 | formatter_settings_version=12
5 | internal.default.compliance=user
6 | org.eclipse.jdt.ui.exception.name=e
7 | org.eclipse.jdt.ui.gettersetter.use.is=true
8 | org.eclipse.jdt.ui.ignorelowercasenames=true
9 | org.eclipse.jdt.ui.importorder=java;javax;junit;org;com;ch;;\#;
10 | org.eclipse.jdt.ui.javadoc=false
11 | org.eclipse.jdt.ui.keywordthis=false
12 | org.eclipse.jdt.ui.ondemandthreshold=99
13 | org.eclipse.jdt.ui.overrideannotation=true
14 | org.eclipse.jdt.ui.staticondemandthreshold=99
15 | org.eclipse.jdt.ui.text.custom_code_templates=/**\n * @return Returns the ${bare_field_name}.\n *//**\n * @param ${param} The ${bare_field_name} to set.\n *//** Comment for <code>${field}</code>. *//** {@inheritDoc} */${package_declaration}\n\n${typecomment}\n${type_declaration}// ${todo} Auto-generated catch block/**\n * ${tags}\n *//**\n * \n *//**\n * ${tags}\n *//**\n * ${tags}\n * ${see_to_target}\n */// ${todo} Auto-generated method stub\n${body_statement}${body_statement}\n// ${todo} Auto-generated constructor stubreturn ${field};${field} \= ${param};
16 | sp_cleanup.add_default_serial_version_id=true
17 | sp_cleanup.add_generated_serial_version_id=false
18 | sp_cleanup.add_missing_annotations=true
19 | sp_cleanup.add_missing_deprecated_annotations=true
20 | sp_cleanup.add_missing_methods=false
21 | sp_cleanup.add_missing_nls_tags=false
22 | sp_cleanup.add_missing_override_annotations=true
23 | sp_cleanup.add_missing_override_annotations_interface_methods=true
24 | sp_cleanup.add_serial_version_id=false
25 | sp_cleanup.always_use_blocks=true
26 | sp_cleanup.always_use_parentheses_in_expressions=false
27 | sp_cleanup.always_use_this_for_non_static_field_access=true
28 | sp_cleanup.always_use_this_for_non_static_method_access=false
29 | sp_cleanup.convert_to_enhanced_for_loop=false
30 | sp_cleanup.correct_indentation=false
31 | sp_cleanup.format_source_code=false
32 | sp_cleanup.format_source_code_changes_only=false
33 | sp_cleanup.make_local_variable_final=false
34 | sp_cleanup.make_parameters_final=false
35 | sp_cleanup.make_private_fields_final=true
36 | sp_cleanup.make_type_abstract_if_missing_method=false
37 | sp_cleanup.make_variable_declarations_final=false
38 | sp_cleanup.never_use_blocks=false
39 | sp_cleanup.never_use_parentheses_in_expressions=true
40 | sp_cleanup.on_save_use_additional_actions=true
41 | sp_cleanup.organize_imports=true
42 | sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
43 | sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
44 | sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
45 | sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
46 | sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
47 | sp_cleanup.remove_private_constructors=true
48 | sp_cleanup.remove_trailing_whitespaces=true
49 | sp_cleanup.remove_trailing_whitespaces_all=true
50 | sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
51 | sp_cleanup.remove_unnecessary_casts=true
52 | sp_cleanup.remove_unnecessary_nls_tags=false
53 | sp_cleanup.remove_unused_imports=true
54 | sp_cleanup.remove_unused_local_variables=false
55 | sp_cleanup.remove_unused_private_fields=true
56 | sp_cleanup.remove_unused_private_members=false
57 | sp_cleanup.remove_unused_private_methods=true
58 | sp_cleanup.remove_unused_private_types=true
59 | sp_cleanup.sort_members=false
60 | sp_cleanup.sort_members_all=false
61 | sp_cleanup.use_blocks=false
62 | sp_cleanup.use_blocks_only_for_return_and_throw=false
63 | sp_cleanup.use_parentheses_in_expressions=false
64 | sp_cleanup.use_this_for_non_static_field_access=true
65 | sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false
66 | sp_cleanup.use_this_for_non_static_method_access=false
67 | sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
68 |
--------------------------------------------------------------------------------
/config-validation-processor-core/.settings/org.eclipse.m2e.core.prefs:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/config-validation-processor-core/.settings/org.eclipse.wst.sse.core.prefs:
--------------------------------------------------------------------------------
1 | #Sat Jan 29 21:29:11 CET 2011
2 | eclipse.preferences.version=1
3 | task-tags/enabled=true
4 | task-tags/taskPriorities=1,2,1,0
5 | task-tags/taskTags=TODO,FIXME,REVIEW,NOTE
6 | task-tags/use-project-settings=true
7 |
--------------------------------------------------------------------------------
/config-validation-processor-core/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 |
5 | com.github.pellaton.config-validation-processor
6 | config-validation-processor
7 | 3.0.9-SNAPSHOT
8 |
9 |
10 | config-validation-processor-core
11 |
12 | Spring Configuration Validation Processor Core
13 | A Java 6 annotation processor to validate Spring @Configuration classes
14 |
15 |
16 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/main/java/com/github/pellaton/springconfigvalidation/SpringConfigurationMessage.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package com.github.pellaton.springconfigvalidation;
19 |
20 | import javax.tools.Diagnostic.Kind;
21 |
22 | /**
23 | * Enum containing all the diagnostic messages that the {@link SpringConfigurationValidationProcessor} emits.
24 | *
25 | * @author Michael Pellaton
26 | *
27 | * @see SpringConfigurationValidationProcessor
28 | * @see javax.tools.Diagnostic
29 | */
30 | public enum SpringConfigurationMessage {
31 |
32 | // errors on @Configuration classes
33 | NESTED_CLASS_NOT_STATIC(Kind.ERROR,
34 | "Invalid bean definition class: Nested @Configuration classes must be static."),
35 | CLASS_FINAL(Kind.ERROR,
36 | "Invalid bean definition class: @Configuration classes must not be final."),
37 | MISSING_NO_ARG_CONSTRUCTOR(Kind.ERROR,
38 | "Invalid bean definition class: @Configuration classes must have a visible no-arg constructor."),
39 | AUTOWIRED_CONSTRUCTOR(Kind.ERROR,
40 | "Invalid bean definition class: @Configuration class constructors must not be @Autowired."),
41 |
42 | // errors on @Bean methods
43 | BEAN_METHOD_FINAL(Kind.ERROR,
44 | "Invalid factory method: @Bean methods must not be final."),
45 | BEAN_METHOD_RETURNS_VOID(Kind.ERROR,
46 | "Invalid factory method: @Bean methods must have a non-void return type."),
47 | BEAN_METHOD_PRIVATE(Kind.ERROR, "Invalid factory method: @Bean methods must not be private."),
48 |
49 | // warnings on @Bean methods
50 | STATIC_BEAN_METHOD(Kind.WARNING,
51 | "Only @Bean methods returning a BeanFactoryPostProcessor should be static."),
52 | BFPP_BEAN_METHOD_NOT_STATIC(Kind.WARNING,
53 | "@Bean methods returning a BeanFactoryPostProcessor should be static."),
54 | BEAN_METHOD_NOT_IN_CONFIGURATION(Kind.WARNING,
55 | "Invalid factory method: @Bean methods should be declared in classes annotated with @Configuration.");
56 |
57 |
58 | private final Kind kind;
59 | private final String message;
60 |
61 |
62 | private SpringConfigurationMessage(Kind kind, String message) {
63 | this.kind = kind;
64 | this.message = message;
65 | }
66 |
67 |
68 | /**
69 | * Gets the diagnostic kind of this message.
70 | *
71 | * @return the diagnostic kind of this message
72 | * @see Kind
73 | */
74 | public Kind getKind() {
75 | return this.kind;
76 | }
77 |
78 | /**
79 | * Gets the message to be displayed.
80 | *
81 | * @return the message to be displayed
82 | */
83 | public String getMessage() {
84 | return this.message;
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/main/java/com/github/pellaton/springconfigvalidation/SpringConfigurationValidationProcessor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package com.github.pellaton.springconfigvalidation;
19 |
20 | import java.util.List;
21 | import java.util.Set;
22 |
23 | import javax.annotation.processing.AbstractProcessor;
24 | import javax.annotation.processing.Messager;
25 | import javax.annotation.processing.ProcessingEnvironment;
26 | import javax.annotation.processing.RoundEnvironment;
27 | import javax.lang.model.element.AnnotationMirror;
28 | import javax.lang.model.element.Element;
29 | import javax.lang.model.element.ElementKind;
30 | import javax.lang.model.element.ExecutableElement;
31 | import javax.lang.model.element.Modifier;
32 | import javax.lang.model.element.TypeElement;
33 | import javax.lang.model.type.DeclaredType;
34 | import javax.lang.model.type.TypeKind;
35 | import javax.lang.model.util.ElementFilter;
36 | import javax.lang.model.util.Elements;
37 | import javax.lang.model.util.Types;
38 |
39 | /**
40 | * Java 6 annotation processor that processes classes annotated with {@code @Configuration}. This processor is meant for
41 | * source validation during compilation only and does not write any output besides compiler messages. The following list
42 | * mentions all checks performed:
43 | *
44 | *
45 | * Class Checks
46 | * [x] Error: Invalid bean definition class: @Configuration classes must not be final.
47 | * [x] Error: Invalid bean definition class: @Configuration classes must have a visible no-arg constructor.
48 | * [x] Error: Invalid bean definition class: @Configuration class constructors must not be @Autowired.
49 | * [x] Error: Invalid bean definition class: Nested @Configuration classes must be static.
50 | * [ ] Error: Invalid bean definition class: @Configuration classes must not be local.
51 | *
52 | * Method Checks
53 | * [x] Error: Invalid factory method: @Bean methods must not be private.
54 | * [x] Error: Invalid factory method: @Bean methods must not be final.
55 | * [x] Error: Invalid factory method: @Bean methods must have a non-void return type.
56 | * [x] Warn: Invalid factory method: @Bean methods should be declared in classes annotated with @Configuration.
57 | * [x] Warn: @Bean methods returning a BeanFactoryPostProcessor should be static.
58 | * [x] Warn: Only @Bean methods returning a BeanFactoryPostProcessor should be static.
59 | *
60 | *
61 | * @author Michael Pellaton
62 | *
63 | * @see Spring Frameowrk Reference: Java-based container configuration
64 | * @see Spring API Documentation: Configuration
65 | * @see Spring API Documentation: Bean
66 | */
67 | public abstract class SpringConfigurationValidationProcessor extends AbstractProcessor {
68 |
69 | private TypeElement autowiredTypeElement;
70 | private TypeElement beanTypeElement;
71 | private TypeElement bfppTypeElement;
72 | private TypeElement configurationTypeElement;
73 |
74 | private Messager messager;
75 | private Types typeUtils;
76 | private Elements elementUtils;
77 |
78 |
79 | /**
80 | * No-argument constructor.
81 | */
82 | public SpringConfigurationValidationProcessor() {
83 | super();
84 | }
85 |
86 |
87 | @Override
88 | public synchronized void init(ProcessingEnvironment processingEnv) {
89 | super.init(processingEnv);
90 |
91 | this.messager = processingEnv.getMessager();
92 | this.typeUtils = processingEnv.getTypeUtils();
93 | this.elementUtils = processingEnv.getElementUtils();
94 |
95 | this.autowiredTypeElement = this.elementUtils.getTypeElement(
96 | "org.springframework.beans.factory.annotation.Autowired");
97 | this.beanTypeElement = this.elementUtils.getTypeElement(
98 | "org.springframework.context.annotation.Bean");
99 | this.bfppTypeElement = this.elementUtils.getTypeElement(
100 | "org.springframework.beans.factory.config.BeanFactoryPostProcessor");
101 | this.configurationTypeElement = this.elementUtils.getTypeElement(
102 | "org.springframework.context.annotation.Configuration");
103 | }
104 |
105 | @Override
106 | public boolean process(Set extends TypeElement> annotations, RoundEnvironment roundEnv) {
107 | if (!roundEnv.errorRaised() && !roundEnv.processingOver()) {
108 | processRound(annotations, roundEnv);
109 | }
110 | return false;
111 | }
112 |
113 | private void processRound(Set extends TypeElement> annotations, RoundEnvironment roundEnv) {
114 | for (TypeElement annotation : annotations) {
115 | for (Element element : roundEnv.getElementsAnnotatedWith(annotation)) {
116 | processElement(element);
117 | }
118 | }
119 | }
120 |
121 | private void processElement(Element element) {
122 | for (AnnotationMirror annotation : element.getAnnotationMirrors()) {
123 | Element annotationTypeElement = annotation.getAnnotationType().asElement();
124 |
125 | if (annotationTypeElement.equals(this.configurationTypeElement)) {
126 | List extends Element> enclosedElements = element.getEnclosedElements();
127 | processClass(element, ElementFilter.constructorsIn(enclosedElements));
128 |
129 | } else if (annotationTypeElement.equals(this.beanTypeElement)) {
130 | processBeanMethod((ExecutableElement) element);
131 | }
132 | }
133 | }
134 |
135 | private void processClass(Element element, List constructors) {
136 | processClassVisibility(element);
137 | processConstructors(element, constructors);
138 | processStaticClass(element);
139 | }
140 |
141 | private void processStaticClass(Element element) {
142 | if (isNestedClass(element) && !isStaticMethod(element)) {
143 | printMessage(SpringConfigurationMessage.NESTED_CLASS_NOT_STATIC, element);
144 | }
145 | }
146 |
147 | private boolean isNestedClass(Element element) {
148 | return element.getEnclosingElement().getKind().equals(ElementKind.CLASS);
149 | }
150 |
151 | private void processClassVisibility(Element element) {
152 | if (element.getModifiers().contains(Modifier.FINAL)) {
153 | printMessage(SpringConfigurationMessage.CLASS_FINAL, element);
154 | }
155 | }
156 |
157 | private void processConstructors(Element element, List constructors) {
158 | boolean hasVisibleNoArgConsctructor = false;
159 | for (ExecutableElement constructor : constructors) {
160 | if (isVisibleElement(constructor) && hasNoParameter(constructor)) {
161 | hasVisibleNoArgConsctructor = true;
162 | }
163 | processAutowiredConstructor(constructor);
164 | }
165 | if (!hasVisibleNoArgConsctructor) {
166 | printMessage(SpringConfigurationMessage.MISSING_NO_ARG_CONSTRUCTOR, element);
167 | }
168 | }
169 |
170 | private void processAutowiredConstructor(ExecutableElement constructor) {
171 | List extends AnnotationMirror> annotations = constructor.getAnnotationMirrors();
172 | for (AnnotationMirror annotationMirror : annotations) {
173 |
174 | Element annotationTypeElement = annotationMirror.getAnnotationType().asElement();
175 | if (annotationTypeElement.equals(this.autowiredTypeElement)) {
176 | printMessage(SpringConfigurationMessage.AUTOWIRED_CONSTRUCTOR, constructor, annotationMirror);
177 | }
178 | }
179 | }
180 |
181 | private boolean hasNoParameter(ExecutableElement constructor) {
182 | return constructor.getParameters().isEmpty();
183 | }
184 |
185 | private boolean isVisibleElement(ExecutableElement constructor) {
186 | return !constructor.getModifiers().contains(Modifier.PRIVATE);
187 | }
188 |
189 | private void processBeanMethod(ExecutableElement methodElement) {
190 | processForScope(methodElement);
191 | processForFinal(methodElement);
192 | processForReturnType(methodElement);
193 | processForBFPP(methodElement);
194 | processForConfigurationClass(methodElement);
195 | }
196 |
197 | private void processForFinal(ExecutableElement methodElement) {
198 | if (isFinalMethod(methodElement)) {
199 | printMessage(SpringConfigurationMessage.BEAN_METHOD_FINAL, methodElement);
200 | }
201 | }
202 |
203 | private void processForReturnType(ExecutableElement methodElement) {
204 | if (methodElement.getReturnType().getKind() == TypeKind.VOID) {
205 | printMessage(SpringConfigurationMessage.BEAN_METHOD_RETURNS_VOID, methodElement);
206 | }
207 | }
208 |
209 | private void processForBFPP(ExecutableElement methodElement) {
210 | boolean implementsBFPP = this.typeUtils.isAssignable(methodElement.getReturnType(), this.bfppTypeElement.asType());
211 | boolean isStaticMethod = isStaticMethod(methodElement);
212 | if (isStaticMethod) {
213 | if (!implementsBFPP) {
214 | printMessage(SpringConfigurationMessage.STATIC_BEAN_METHOD, methodElement);
215 | }
216 | } else {
217 | if (implementsBFPP) {
218 | printMessage(SpringConfigurationMessage.BFPP_BEAN_METHOD_NOT_STATIC, methodElement);
219 | }
220 | }
221 | }
222 |
223 | private void processForConfigurationClass(ExecutableElement methodElement) {
224 | if (!isInConfigurationClass(methodElement)) {
225 | printMessage(SpringConfigurationMessage.BEAN_METHOD_NOT_IN_CONFIGURATION, methodElement);
226 | }
227 | }
228 |
229 | private void processForScope(Element methodElement) {
230 | if (isPrivateMethod(methodElement)) {
231 | printMessage(SpringConfigurationMessage.BEAN_METHOD_PRIVATE, methodElement);
232 | }
233 | }
234 |
235 | private boolean isPrivateMethod(Element methodElement) {
236 | return methodElement.getModifiers().contains(Modifier.PRIVATE);
237 | }
238 |
239 | private boolean isFinalMethod(Element methodElement) {
240 | return methodElement.getModifiers().contains(Modifier.FINAL);
241 | }
242 |
243 | private boolean isStaticMethod(Element methodElement) {
244 | return methodElement.getModifiers().contains(Modifier.STATIC);
245 | }
246 |
247 | private boolean isInConfigurationClass(ExecutableElement methodElement) {
248 | Element enclosingElement = methodElement.getEnclosingElement();
249 |
250 | List extends AnnotationMirror> annotationMirrors = enclosingElement.getAnnotationMirrors();
251 | for (AnnotationMirror annotationMirror : annotationMirrors) {
252 | DeclaredType annotationType = annotationMirror.getAnnotationType();
253 |
254 | if (this.configurationTypeElement.equals(annotationType.asElement())) {
255 | return true;
256 | }
257 | }
258 |
259 | return false;
260 | }
261 |
262 | private void printMessage(SpringConfigurationMessage message, Element element, AnnotationMirror annotationMirror) {
263 | this.messager.printMessage(message.getKind(), message.getMessage(), element, annotationMirror);
264 | }
265 |
266 | private void printMessage(SpringConfigurationMessage message, Element element) {
267 | printMessage(message, element, null);
268 | }
269 | }
270 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/java/com/github/pellaton/springconfigvalidation/SpringConfigurationValidationProcessorTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package com.github.pellaton.springconfigvalidation;
19 |
20 | import java.io.IOException;
21 | import java.util.List;
22 |
23 | import javax.tools.Diagnostic;
24 | import javax.tools.JavaFileObject;
25 |
26 | import org.junit.Test;
27 |
28 | import com.github.pellaton.springconfigvalidation.util.AnnotationProcessorTestCompiler;
29 | import com.github.pellaton.springconfigvalidation.util.DiagnosticsAssert;
30 |
31 | /**
32 | * Tests for {@link SpringConfigurationValidationProcessor}.
33 | *
34 | * @author Michael Pellaton
35 | *
36 | * @see SpringConfigurationValidationProcessor
37 | */
38 | public class SpringConfigurationValidationProcessorTest {
39 |
40 | /**
41 | * Tests with a valid configuration class on which the processor should not emit any messages.
42 | */
43 | @Test
44 | public void validClass() throws IOException {
45 | compileAndAssertNoMessage("/com/github/pellaton/springconfigvalidation/ValidTestConfiguration");
46 | }
47 |
48 | /**
49 | * Tests the processor's detection of a final configuration class.
50 | */
51 | @Test
52 | public void finalClass() throws IOException {
53 | compileAndAssert("FinalClassTestConfiguration", SpringConfigurationMessage.CLASS_FINAL, 29);
54 | }
55 |
56 | /**
57 | * Tests the processor's detection of a constructor using @Autowired.
58 | */
59 | @Test
60 | public void autowiredConstructor() throws IOException {
61 | compileAndAssert("AutowiredConstructorConfiguration", SpringConfigurationMessage.AUTOWIRED_CONSTRUCTOR, 32);
62 | }
63 |
64 | /**
65 | * Tests the processor's detection of a missing no-argument constructor (the class has an accessible constructor
66 | * that takes arguments).
67 | */
68 | @Test
69 | public void missingNoArgConstructor() throws IOException {
70 | compileAndAssert("MissingNoArgConstructorConfiguration", SpringConfigurationMessage.MISSING_NO_ARG_CONSTRUCTOR, 29);
71 | }
72 |
73 | /**
74 | * Tests the processor's detection of a missing no-argument constructor (the class has a inaccessible no-argument
75 | * constructor).
76 | */
77 | @Test
78 | public void inaccessibleNoArgConstructor2() throws IOException {
79 | compileAndAssert("InaccessibleNoArgConstructorConfiguration", SpringConfigurationMessage.MISSING_NO_ARG_CONSTRUCTOR,
80 | 29);
81 | }
82 |
83 | /**
84 | * Tests the processor's detection of non-{@code static} nested @Configuration classes.
85 | */
86 | @Test
87 | public void nestedClassNotStatic() throws IOException {
88 | compileAndAssert("NestedClassNotStaticTestConfiguration", SpringConfigurationMessage.NESTED_CLASS_NOT_STATIC, 32);
89 | }
90 |
91 | /**
92 | * Tests the processor's detection of a {@code private} bean factory method.
93 | */
94 | @Test
95 | public void privateBeanMethod() throws IOException {
96 | compileAndAssert("PrivateBeanMethodTestConfiguration", SpringConfigurationMessage.BEAN_METHOD_PRIVATE, 33);
97 | }
98 |
99 | /**
100 | * Tests the processor's detection of a bean factory method returning {@code void}.
101 | */
102 | @Test
103 | public void voidBeanMethod() throws IOException {
104 | compileAndAssert("VoidBeanMethodTestConfiguration", SpringConfigurationMessage.BEAN_METHOD_RETURNS_VOID, 33);
105 | }
106 |
107 | /**
108 | * Tests the processor's detection of a {@code final} bean factory method.
109 | */
110 | @Test
111 | public void finalBeanMethod() throws IOException {
112 | compileAndAssert("FinalBeanMethodTestConfiguration", SpringConfigurationMessage.BEAN_METHOD_FINAL, 33);
113 | }
114 |
115 | /**
116 | * Tests the processor's handling of a bean factory method having multiple valid annotations.
117 | */
118 | @Test
119 | public void multiAnnotationBeanMethod() throws IOException {
120 | compileAndAssertNoMessage("/com/github/pellaton/springconfigvalidation/MultiAnnotationBeanMethodTestConfiguration");
121 | }
122 |
123 | /**
124 | * Tests the processor's detection of a non-{@code static} bean factory method returning a
125 | * {@link org.springframework.beans.factory.config.BeanFactoryPostProcessor}.
126 | */
127 | @Test
128 | public void bfppNotStaticBeanMethod() throws IOException {
129 | compileAndAssert("BFPPBeanMethodTestConfiguration", SpringConfigurationMessage.BFPP_BEAN_METHOD_NOT_STATIC, 35);
130 | }
131 |
132 | /**
133 | * Tests the processor's detection of a {@code static} bean factory method not returning a
134 | * {@link org.springframework.beans.factory.config.BeanFactoryPostProcessor}.
135 | */
136 | @Test
137 | public void staticBeanMethod() throws IOException {
138 | compileAndAssert("StaticBeanMethodTestConfiguration", SpringConfigurationMessage.STATIC_BEAN_METHOD, 33);
139 | }
140 |
141 | @Test
142 | public void beanMethodNotInConfigurationClass() throws IOException {
143 | compileAndAssert("BeanMethodNotInConfigurationTestConfiguration",
144 | SpringConfigurationMessage.BEAN_METHOD_NOT_IN_CONFIGURATION, 32);
145 | }
146 |
147 | private void compileAndAssert(String configurationClass, SpringConfigurationMessage expectedMessage,
148 | long expectedLineNumber) throws IOException {
149 | List> diagnostics = AnnotationProcessorTestCompiler.compileClass(
150 | "/com/github/pellaton/springconfigvalidation/" + configurationClass, new TestSpringConfigurationValidationProcessor());
151 | DiagnosticsAssert.assertContainsSingleMessage(expectedMessage, expectedLineNumber, diagnostics);
152 | }
153 |
154 | private void compileAndAssertNoMessage(String configurationClass) throws IOException {
155 | List> diagnostics =
156 | AnnotationProcessorTestCompiler.compileClass(configurationClass,
157 | new TestSpringConfigurationValidationProcessor());
158 | DiagnosticsAssert.assertNoCompilerMessage(diagnostics);
159 | }
160 | }
161 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/java/com/github/pellaton/springconfigvalidation/TestSpringConfigurationValidationProcessor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package com.github.pellaton.springconfigvalidation;
19 |
20 | import javax.annotation.processing.SupportedAnnotationTypes;
21 | import javax.annotation.processing.SupportedSourceVersion;
22 | import javax.lang.model.SourceVersion;
23 |
24 | /**
25 | * Test variant of {@link SpringConfigurationValidationProcessor}.
26 | */
27 | @SupportedAnnotationTypes({"org.springframework.context.annotation.Configuration", "org.springframework.context.annotation.Bean"})
28 | @SupportedSourceVersion(SourceVersion.RELEASE_11)
29 | public class TestSpringConfigurationValidationProcessor extends SpringConfigurationValidationProcessor {
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/java/com/github/pellaton/springconfigvalidation/util/AnnotationProcessorTestCompiler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package com.github.pellaton.springconfigvalidation.util;
19 |
20 | import java.io.IOException;
21 | import java.util.Arrays;
22 | import java.util.Collections;
23 | import java.util.List;
24 | import java.util.Locale;
25 |
26 | import javax.annotation.processing.Processor;
27 | import javax.tools.Diagnostic;
28 | import javax.tools.DiagnosticCollector;
29 | import javax.tools.JavaCompiler;
30 | import javax.tools.JavaCompiler.CompilationTask;
31 | import javax.tools.JavaFileObject;
32 | import javax.tools.StandardJavaFileManager;
33 | import javax.tools.ToolProvider;
34 |
35 | import org.springframework.core.io.ClassPathResource;
36 |
37 | /**
38 | * Utility class that compiles a Java class using the {@link Compiler} and an annotation {@link Processor}. This class
39 | * is intended to be used for tests of annotation processors.
40 | *
41 | * @author Michael Pellaton
42 | */
43 | public final class AnnotationProcessorTestCompiler {
44 |
45 | private static final JavaCompiler COMPILER = ToolProvider.getSystemJavaCompiler();
46 | private static final Iterable COMPILER_OPTIONS = Collections.singletonList("-proc:only");
47 |
48 |
49 | /**
50 | * Avoid instantiation.
51 | */
52 | private AnnotationProcessorTestCompiler() {
53 | throw new AssertionError("Not instantiable.");
54 | }
55 |
56 |
57 | /**
58 | * Processes the java class specified. This implementation only parses and processes the java classes and does not
59 | * fully compile them - i.e. it does not write class files back to the disk. Basically, {@code javac} is called with
60 | * {@code -proc:only}.
61 | *
62 | * @param classToCompile the Java class to compile
63 | * @param processor the annotation {@link Processor} to use during compilation
64 | * @return a list of {@link Diagnostic} messages emitted during the compilation
65 | */
66 | public static List> compileClass(String classToCompile, Processor processor)
67 | throws IOException {
68 |
69 | DiagnosticCollector collector = new DiagnosticCollector();
70 |
71 | StandardJavaFileManager fileManager = null;
72 | try {
73 | fileManager = getFileManager(collector);
74 | Iterable extends JavaFileObject> compilationUnits = getCompilationUnitOfClass(fileManager, classToCompile);
75 |
76 | CompilationTask task = COMPILER.getTask(null, fileManager, collector, COMPILER_OPTIONS, null, compilationUnits);
77 | task.setProcessors(Arrays.asList(processor));
78 | task.call();
79 |
80 | return collector.getDiagnostics();
81 | } finally {
82 | if (fileManager != null) {
83 | fileManager.close();
84 | }
85 | }
86 | }
87 |
88 | private static StandardJavaFileManager getFileManager(DiagnosticCollector diagnosticCollector) {
89 | return COMPILER.getStandardFileManager(diagnosticCollector, Locale.getDefault(), null);
90 | }
91 |
92 | private static Iterable extends JavaFileObject> getCompilationUnitOfClass(StandardJavaFileManager fileManager,
93 | String classToCompile) throws IOException {
94 | ClassPathResource resource = new ClassPathResource(classToCompile + ".java");
95 | return fileManager.getJavaFileObjectsFromFiles(Collections.singletonList(resource.getFile()));
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/java/com/github/pellaton/springconfigvalidation/util/DiagnosticsAssert.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package com.github.pellaton.springconfigvalidation.util;
19 |
20 | import java.util.List;
21 | import java.util.Locale;
22 |
23 | import javax.tools.Diagnostic;
24 | import javax.tools.JavaFileObject;
25 |
26 | import junit.framework.AssertionFailedError;
27 |
28 | import com.github.pellaton.springconfigvalidation.SpringConfigurationMessage;
29 |
30 | /**
31 | * Set of assert methods used on the {@link Diagnostic}s emitted by the Java {@link Compiler}.
32 | *
33 | * @author Michael Pellaton
34 | */
35 | public final class DiagnosticsAssert {
36 |
37 | /**
38 | * Avoid instantiation.
39 | */
40 | private DiagnosticsAssert() {
41 | throw new AssertionError("Not instantiable.");
42 | }
43 |
44 |
45 | /**
46 | * Asserts that the list of {@link Diagnostic}s passed is null or empty (meaning the compiler has not emitted any
47 | * messages).
48 | *
49 | * @param diagnostics the diagnostics to assert
50 | */
51 | public static void assertNoCompilerMessage(List> diagnostics) {
52 | if (diagnostics != null && !diagnostics.isEmpty()) {
53 | throw new AssertionFailedError();
54 | }
55 | }
56 |
57 | /**
58 | * Asserts that the diagnostics passed contain exactly the single expected message on the expected line.
59 | *
60 | * @param expectedMessage the expected message
61 | * @param expectedLineNumber the expected line number
62 | * @param diagnostics the diagnostics to assert
63 | */
64 | public static void assertContainsSingleMessage(SpringConfigurationMessage expectedMessage, long expectedLineNumber,
65 | List> diagnostics) {
66 |
67 | if (diagnostics.size() != 1) {
68 | throw new AssertionFailedError("Number of diagnostic messages expected <1> but was <" + diagnostics.size() + ">");
69 | }
70 |
71 | Diagnostic extends JavaFileObject> diagnostic = diagnostics.get(0);
72 | if (!(expectedMessage.getKind() == diagnostic.getKind()
73 | && expectedLineNumber == diagnostic.getLineNumber()
74 | && expectedMessage.getMessage().equals(diagnostic.getMessage(Locale.getDefault())))) {
75 | throw new AssertionFailedError("Diagnostic message expected <" + expectedMessage.getKind() + ","
76 | + expectedMessage.getMessage() + ", on line " + expectedLineNumber + "> but was <" + diagnostic.getKind()
77 | + "," + diagnostic.getMessage(Locale.getDefault()) + ", on line " + diagnostic.getLineNumber() + ">");
78 | }
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/AutowiredConstructorConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package ch.contrails.springconfigvalidation;
19 |
20 | import org.springframework.beans.factory.annotation.Autowired;
21 | import org.springframework.context.annotation.Configuration;
22 |
23 | /**
24 | * Invalid {@code @Configuration} class having a {@code @Autowired} constructor.
25 | *
26 | * @author Michael Pellaton
27 | * @see SpringConfigurationValidationProcessor
28 | */
29 | @Configuration
30 | public class AutowiredConstructorConfiguration {
31 |
32 | @Autowired
33 | public AutowiredConstructorConfiguration(String string) {
34 | }
35 |
36 | public AutowiredConstructorConfiguration() {
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/BFPPBeanMethodTestConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package ch.contrails.springconfigvalidation;
19 |
20 | import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
21 | import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
22 | import org.springframework.context.annotation.Bean;
23 | import org.springframework.context.annotation.Configuration;
24 |
25 | /**
26 | * Invalid {@code @Configuration} class having a non-{@code static} method returning a {@link BeanFactoryPostProcessor}.
27 | *
28 | * @author Michael Pellaton
29 | * @see SpringConfigurationValidationProcessor
30 | */
31 | @Configuration
32 | public class BFPPBeanMethodTestConfiguration {
33 |
34 | @Bean
35 | public BeanFactoryPostProcessor propertyPlaceholder() {
36 | return new PropertyPlaceholderConfigurer();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/BeanMethodNotInConfigurationTestConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2013 Stefan Ferstl
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Stefan Ferstl
16 | * *****************************************************************************************************************
17 | */
18 | package com.github.pellaton.springconfigvalidation;
19 |
20 | import org.springframework.context.annotation.Bean;
21 | import org.springframework.context.annotation.Configuration;
22 |
23 | /**
24 | * Invalid configuration class not annotated with {@code @Configuration}.
25 | *
26 | * @author Stefan Ferstl
27 | * @see SpringConfigurationValidationProcessor
28 | */
29 | public class BeanMethodNotInConfigurationTestConfiguration {
30 |
31 | @Bean
32 | public String someString() {
33 | return "HELLO JUNIT";
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/FinalBeanMethodTestConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package ch.contrails.springconfigvalidation;
19 |
20 | import org.springframework.context.annotation.Bean;
21 | import org.springframework.context.annotation.Configuration;
22 |
23 | /**
24 | * Invalid {@code @Configuration} class having a {@code final @Bean} method.
25 | *
26 | * @author Michael Pellaton
27 | * @see SpringConfigurationValidationProcessor
28 | */
29 | @Configuration
30 | public class FinalBeanMethodTestConfiguration {
31 |
32 | @Bean
33 | public final String someString() {
34 | return "";
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/FinalClassTestConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package ch.contrails.springconfigvalidation;
19 |
20 | import org.springframework.context.annotation.Configuration;
21 |
22 | /**
23 | * Invalid {@code final @Configuration} class.
24 | *
25 | * @author Michael Pellaton
26 | * @see SpringConfigurationValidationProcessor
27 | */
28 | @Configuration
29 | public final class FinalClassTestConfiguration {
30 | }
31 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/InaccessibleNoArgConstructorConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package ch.contrails.springconfigvalidation;
19 |
20 | import org.springframework.context.annotation.Configuration;
21 |
22 | /**
23 | * Invalid {@code @Configuration} class not having an accessible no-argument constructor.
24 | *
25 | * @author Michael Pellaton
26 | * @see SpringConfigurationValidationProcessor
27 | */
28 | @Configuration
29 | public class InaccessibleNoArgConstructorConfiguration {
30 |
31 | private InaccessibleNoArgConstructorConfiguration() {
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/MissingNoArgConstructorConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package ch.contrails.springconfigvalidation;
19 |
20 | import org.springframework.context.annotation.Configuration;
21 |
22 | /**
23 | * Invalid {@code @Configuration} class not having an accessible no-argument constructor.
24 | *
25 | * @author Michael Pellaton
26 | * @see SpringConfigurationValidationProcessor
27 | */
28 | @Configuration
29 | public class MissingNoArgConstructorConfiguration {
30 |
31 | public MissingNoArgConstructorConfiguration(String string) {
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/MultiAnnotationBeanMethodTestConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package ch.contrails.springconfigvalidation;
19 |
20 | import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
21 | import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
22 | import org.springframework.context.annotation.Bean;
23 | import org.springframework.context.annotation.Configuration;
24 | import org.springframework.context.annotation.Primary;
25 |
26 | /**
27 | * Valid {@code @Configuration} class having a @Bean metho that bears other annotations besides the @Bean annotation.
28 | *
29 | * @author Michael Pellaton
30 | * @see SpringConfigurationValidationProcessor
31 | */
32 | @Configuration
33 | public abstract class MultiAnnotationBeanMethodTestConfiguration {
34 |
35 | @Bean
36 | @Primary
37 | public String someString() {
38 | return "HELLO JUNIT";
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/NestedClassNotStaticTestConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package ch.contrails.springconfigvalidation;
19 |
20 | import org.springframework.context.annotation.Configuration;
21 |
22 | /**
23 | * Invalid {@code @Configuration} class having a non- {@code static} nested {@code @Configuration} class.
24 | *
25 | * @author Michael Pellaton
26 | * @see SpringConfigurationValidationProcessor
27 | */
28 | @Configuration
29 | public class NestedClassNotStaticTestConfiguration {
30 |
31 | @Configuration
32 | class NestedConfiguration {
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/PrivateBeanMethodTestConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package ch.contrails.springconfigvalidation;
19 |
20 | import org.springframework.context.annotation.Bean;
21 | import org.springframework.context.annotation.Configuration;
22 |
23 | /**
24 | * Invalid {@code @Configuration} class having a {@code private} bean factory method.
25 | *
26 | * @author Michael Pellaton
27 | * @see SpringConfigurationValidationProcessor
28 | */
29 | @Configuration
30 | public class PrivateBeanMethodTestConfiguration {
31 |
32 | @Bean
33 | private String someString() {
34 | return "";
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/StaticBeanMethodTestConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package ch.contrails.springconfigvalidation;
19 |
20 | import org.springframework.context.annotation.Bean;
21 | import org.springframework.context.annotation.Configuration;
22 |
23 | /**
24 | * Invalid {@code @Configuration} class having a {@code final} bean factory method.
25 | *
26 | * @author Michael Pellaton
27 | * @see SpringConfigurationValidationProcessor
28 | */
29 | @Configuration
30 | public class StaticBeanMethodTestConfiguration {
31 |
32 | @Bean
33 | public static String someString() {
34 | return "";
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/ValidTestConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package ch.contrails.springconfigvalidation;
19 |
20 | import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
21 | import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
22 | import org.springframework.context.annotation.Bean;
23 | import org.springframework.context.annotation.Configuration;
24 |
25 | /**
26 | * This is a valid {@code @Configuration} class that is not supposed to emit any compiler warnings.
27 | *
28 | * @author Michael Pellaton
29 | */
30 | @Configuration
31 | public abstract class ValidTestConfiguration {
32 |
33 | /**
34 | * Accessible no-arg constructor.
35 | */
36 | ValidTestConfiguration() {
37 | }
38 |
39 | /**
40 | * Some constructor taking an argument.
41 | */
42 | ValidTestConfiguration(String argument) {
43 | }
44 |
45 |
46 | @Bean
47 | public String someString() {
48 | return "HELLO JUNIT";
49 | }
50 |
51 | protected abstract String protectedAbstractString();
52 |
53 | abstract String defaultAbstractString();
54 |
55 |
56 | @Configuration
57 | static class NestedClass {
58 |
59 | @Bean
60 | public static BeanFactoryPostProcessor propertyPlaceholder() {
61 | return new PropertyPlaceholderConfigurer();
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/config-validation-processor-core/src/test/resources/com/github/pellaton/springconfigvalidation/VoidBeanMethodTestConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package ch.contrails.springconfigvalidation;
19 |
20 | import org.springframework.context.annotation.Bean;
21 | import org.springframework.context.annotation.Configuration;
22 |
23 | /**
24 | * Invalid {@code @Configuration} class having a bean factory method returning {@code void}.
25 | *
26 | * @author Michael Pellaton
27 | * @see SpringConfigurationValidationProcessor
28 | */
29 | @Configuration
30 | public class VoidBeanMethodTestConfiguration {
31 |
32 | @Bean
33 | public void whatever() {
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/config-validation-processor-java11/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding//src/main/java=UTF-8
3 | encoding//src/main/resources=UTF-8
4 | encoding/=UTF-8
5 |
--------------------------------------------------------------------------------
/config-validation-processor-java11/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3 | org.eclipse.jdt.core.compiler.compliance=1.6
4 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
5 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
6 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
7 | org.eclipse.jdt.core.compiler.release=disabled
8 | org.eclipse.jdt.core.compiler.source=1.6
9 |
--------------------------------------------------------------------------------
/config-validation-processor-java11/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 |
5 | com.github.pellaton.config-validation-processor
6 | config-validation-processor
7 | 3.0.9-SNAPSHOT
8 |
9 |
10 | config-validation-processor-java11
11 |
12 | Spring Configuration Validation Processor for Java 11 Runtimes
13 | A Java 11 annotation processor to validate Spring @Configuration classes
14 |
15 |
16 |
17 | com.github.pellaton.config-validation-processor
18 | config-validation-processor-core
19 | ${project.version}
20 | provided
21 |
22 |
23 |
24 |
25 |
26 |
27 | org.apache.maven.plugins
28 | maven-dependency-plugin
29 | 3.1.2
30 |
31 |
32 | unpack-dependencies
33 | process-sources
34 |
35 | unpack-dependencies
36 |
37 |
38 | config-validation-processor-core
39 | **/*.class
40 | **/*.properties
41 | ${project.build.directory}/classes
42 | false
43 | true
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
54 |
55 | org.eclipse.m2e
56 | lifecycle-mapping
57 | 1.0.0
58 |
59 |
60 |
61 |
62 |
63 | org.apache.maven.plugins
64 | maven-dependency-plugin
65 | [2.4,)
66 |
67 | unpack-dependencies
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/config-validation-processor-java11/src/main/java/com/github/pellaton/springconfigvalidation/SpringConfigurationValidationProcessorJava11.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2014 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package com.github.pellaton.springconfigvalidation;
19 |
20 | import javax.annotation.processing.SupportedAnnotationTypes;
21 | import javax.annotation.processing.SupportedSourceVersion;
22 | import javax.lang.model.SourceVersion;
23 |
24 | /**
25 | * {@link SpringConfigurationValidationProcessor} for Java 11 runtimes.
26 | *
27 | * @author Michael Pellaton
28 | *
29 | * @see SpringConfigurationValidationProcessor
30 | */
31 | @SupportedAnnotationTypes({"org.springframework.context.annotation.Configuration", "org.springframework.context.annotation.Bean"})
32 | @SupportedSourceVersion(SourceVersion.RELEASE_11)
33 | public class SpringConfigurationValidationProcessorJava11 extends SpringConfigurationValidationProcessor {
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/config-validation-processor-java11/src/main/resources/META-INF/services/javax.annotation.processing.Processor:
--------------------------------------------------------------------------------
1 | com.github.pellaton.springconfigvalidation.SpringConfigurationValidationProcessorJava11
2 |
--------------------------------------------------------------------------------
/config-validation-processor-java6/.checkstyle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
--------------------------------------------------------------------------------
/config-validation-processor-java6/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/config-validation-processor-java6/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | config-validation-processor-java6
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.m2e.core.maven2Builder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.m2e.core.maven2Nature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/config-validation-processor-java6/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding//src/main/java=UTF-8
3 | encoding//src/main/resources=UTF-8
4 | encoding/=UTF-8
5 |
--------------------------------------------------------------------------------
/config-validation-processor-java6/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3 | org.eclipse.jdt.core.compiler.compliance=1.6
4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
5 | org.eclipse.jdt.core.compiler.source=1.6
6 |
--------------------------------------------------------------------------------
/config-validation-processor-java6/.settings/org.eclipse.m2e.core.prefs:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/config-validation-processor-java6/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 |
5 | com.github.pellaton.config-validation-processor
6 | config-validation-processor
7 | 3.0.9-SNAPSHOT
8 |
9 |
10 | config-validation-processor-java6
11 |
12 | Spring Configuration Validation Processor for Java 6 Runtimes
13 | A Java 6 annotation processor to validate Spring @Configuration classes
14 |
15 |
16 |
17 | com.github.pellaton.config-validation-processor
18 | config-validation-processor-core
19 | ${project.version}
20 | provided
21 |
22 |
23 |
24 |
25 |
26 |
27 | org.apache.maven.plugins
28 | maven-dependency-plugin
29 | 2.4
30 |
31 |
32 | unpack-dependencies
33 | process-sources
34 |
35 | unpack-dependencies
36 |
37 |
38 | config-validation-processor-core
39 | **/*.class
40 | **/*.properties
41 | ${project.build.directory}/classes
42 | false
43 | true
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
54 |
55 | org.eclipse.m2e
56 | lifecycle-mapping
57 | 1.0.0
58 |
59 |
60 |
61 |
62 |
63 | org.apache.maven.plugins
64 | maven-dependency-plugin
65 | [2.4,)
66 |
67 | unpack-dependencies
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/config-validation-processor-java6/src/main/java/com/github/pellaton/springconfigvalidation/SpringConfigurationValidationProcessorJava6.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package com.github.pellaton.springconfigvalidation;
19 |
20 | import javax.annotation.processing.SupportedAnnotationTypes;
21 | import javax.annotation.processing.SupportedSourceVersion;
22 | import javax.lang.model.SourceVersion;
23 |
24 |
25 | /**
26 | * {@link SpringConfigurationValidationProcessor} for Java 6 runtimes.
27 | *
28 | * @author Michael Pellaton
29 | *
30 | * @see SpringConfigurationValidationProcessor
31 | */
32 | @SupportedAnnotationTypes({
33 | "org.springframework.context.annotation.Configuration", "org.springframework.context.annotation.Bean"})
34 | @SupportedSourceVersion(SourceVersion.RELEASE_6)
35 | public class SpringConfigurationValidationProcessorJava6 extends SpringConfigurationValidationProcessor {
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/config-validation-processor-java6/src/main/resources/META-INF/services/javax.annotation.processing.Processor:
--------------------------------------------------------------------------------
1 | com.github.pellaton.springconfigvalidation.SpringConfigurationValidationProcessorJava6
--------------------------------------------------------------------------------
/config-validation-processor-java7/.checkstyle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
--------------------------------------------------------------------------------
/config-validation-processor-java7/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/config-validation-processor-java7/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | config-validation-processor-java7
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.m2e.core.maven2Builder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.m2e.core.maven2Nature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/config-validation-processor-java7/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding//src/main/java=UTF-8
3 | encoding//src/main/resources=UTF-8
4 | encoding/=UTF-8
5 |
--------------------------------------------------------------------------------
/config-validation-processor-java7/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3 | org.eclipse.jdt.core.compiler.compliance=1.6
4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
5 | org.eclipse.jdt.core.compiler.source=1.6
6 |
--------------------------------------------------------------------------------
/config-validation-processor-java7/.settings/org.eclipse.m2e.core.prefs:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/config-validation-processor-java7/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 |
5 | com.github.pellaton.config-validation-processor
6 | config-validation-processor
7 | 3.0.9-SNAPSHOT
8 |
9 |
10 | config-validation-processor-java7
11 |
12 | Spring Configuration Validation Processor for Java 7 Runtimes
13 | A Java 7 annotation processor to validate Spring @Configuration classes
14 |
15 |
16 |
17 | com.github.pellaton.config-validation-processor
18 | config-validation-processor-core
19 | ${project.version}
20 | provided
21 |
22 |
23 |
24 |
25 |
26 |
27 | org.apache.maven.plugins
28 | maven-dependency-plugin
29 | 2.4
30 |
31 |
32 | unpack-dependencies
33 | process-sources
34 |
35 | unpack-dependencies
36 |
37 |
38 | config-validation-processor-core
39 | **/*.class
40 | **/*.properties
41 | ${project.build.directory}/classes
42 | false
43 | true
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
54 |
55 | org.eclipse.m2e
56 | lifecycle-mapping
57 | 1.0.0
58 |
59 |
60 |
61 |
62 |
63 | org.apache.maven.plugins
64 | maven-dependency-plugin
65 | [2.4,)
66 |
67 | unpack-dependencies
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/config-validation-processor-java7/src/main/java/com/github/pellaton/springconfigvalidation/SpringConfigurationValidationProcessorJava7.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2012 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package com.github.pellaton.springconfigvalidation;
19 |
20 | import javax.annotation.processing.SupportedAnnotationTypes;
21 | import javax.annotation.processing.SupportedSourceVersion;
22 | import javax.lang.model.SourceVersion;
23 |
24 | /**
25 | * {@link SpringConfigurationValidationProcessor} for Java 7 runtimes.
26 | *
27 | * @author Michael Pellaton
28 | *
29 | * @see SpringConfigurationValidationProcessor
30 | */
31 | @SupportedAnnotationTypes({
32 | "org.springframework.context.annotation.Configuration", "org.springframework.context.annotation.Bean"})
33 | @SupportedSourceVersion(SourceVersion.RELEASE_7)
34 | public class SpringConfigurationValidationProcessorJava7 extends SpringConfigurationValidationProcessor {
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/config-validation-processor-java7/src/main/resources/META-INF/services/javax.annotation.processing.Processor:
--------------------------------------------------------------------------------
1 | com.github.pellaton.springconfigvalidation.SpringConfigurationValidationProcessorJava7
--------------------------------------------------------------------------------
/config-validation-processor-java8/.checkstyle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
--------------------------------------------------------------------------------
/config-validation-processor-java8/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | config-validation-processor-java7
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.m2e.core.maven2Builder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.m2e.core.maven2Nature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/config-validation-processor-java8/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding//src/main/java=UTF-8
3 | encoding//src/main/resources=UTF-8
4 | encoding/=UTF-8
5 |
--------------------------------------------------------------------------------
/config-validation-processor-java8/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3 | org.eclipse.jdt.core.compiler.compliance=1.6
4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
5 | org.eclipse.jdt.core.compiler.source=1.6
6 |
--------------------------------------------------------------------------------
/config-validation-processor-java8/.settings/org.eclipse.m2e.core.prefs:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/config-validation-processor-java8/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 |
5 | com.github.pellaton.config-validation-processor
6 | config-validation-processor
7 | 3.0.9-SNAPSHOT
8 |
9 |
10 | config-validation-processor-java8
11 |
12 | Spring Configuration Validation Processor for Java 8 Runtimes
13 | A Java 8 annotation processor to validate Spring @Configuration classes
14 |
15 |
16 |
17 | com.github.pellaton.config-validation-processor
18 | config-validation-processor-core
19 | ${project.version}
20 | provided
21 |
22 |
23 |
24 |
25 |
26 |
27 | org.apache.maven.plugins
28 | maven-dependency-plugin
29 | 2.4
30 |
31 |
32 | unpack-dependencies
33 | process-sources
34 |
35 | unpack-dependencies
36 |
37 |
38 | config-validation-processor-core
39 | **/*.class
40 | **/*.properties
41 | ${project.build.directory}/classes
42 | false
43 | true
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
54 |
55 | org.eclipse.m2e
56 | lifecycle-mapping
57 | 1.0.0
58 |
59 |
60 |
61 |
62 |
63 | org.apache.maven.plugins
64 | maven-dependency-plugin
65 | [2.4,)
66 |
67 | unpack-dependencies
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/config-validation-processor-java8/src/main/java/com/github/pellaton/springconfigvalidation/SpringConfigurationValidationProcessorJava8.java:
--------------------------------------------------------------------------------
1 | /*
2 | * *****************************************************************************************************************
3 | * Copyright 2014 Michael Pellaton
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
12 | * the specific language governing permissions and limitations under the License.
13 | *
14 | * Contributors:
15 | * Michael Pellaton
16 | * *****************************************************************************************************************
17 | */
18 | package com.github.pellaton.springconfigvalidation;
19 |
20 | import javax.annotation.processing.SupportedAnnotationTypes;
21 | import javax.annotation.processing.SupportedSourceVersion;
22 | import javax.lang.model.SourceVersion;
23 |
24 | /**
25 | * {@link SpringConfigurationValidationProcessor} for Java 8 runtimes.
26 | *
27 | * @author Michael Pellaton
28 | *
29 | * @see SpringConfigurationValidationProcessor
30 | */
31 | @SupportedAnnotationTypes({
32 | "org.springframework.context.annotation.Configuration", "org.springframework.context.annotation.Bean"})
33 | @SupportedSourceVersion(SourceVersion.RELEASE_8)
34 | public class SpringConfigurationValidationProcessorJava8 extends SpringConfigurationValidationProcessor {
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/config-validation-processor-java8/src/main/resources/META-INF/services/javax.annotation.processing.Processor:
--------------------------------------------------------------------------------
1 | com.github.pellaton.springconfigvalidation.SpringConfigurationValidationProcessorJava8
2 |
--------------------------------------------------------------------------------
/img/annotationprocessing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pellaton/spring-configuration-validation-processor/f97cb14f1b52aef3ef2830ccd4646e5e2276c7e9/img/annotationprocessing.png
--------------------------------------------------------------------------------
/img/factorypath.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pellaton/spring-configuration-validation-processor/f97cb14f1b52aef3ef2830ccd4646e5e2276c7e9/img/factorypath.png
--------------------------------------------------------------------------------
/img/intellijidea.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pellaton/spring-configuration-validation-processor/f97cb14f1b52aef3ef2830ccd4646e5e2276c7e9/img/intellijidea.png
--------------------------------------------------------------------------------
/img/netbeans.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pellaton/spring-configuration-validation-processor/f97cb14f1b52aef3ef2830ccd4646e5e2276c7e9/img/netbeans.png
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 | com.github.pellaton.config-validation-processor
5 | config-validation-processor
6 | pom
7 |
8 | 3.0.9-SNAPSHOT
9 | Spring Configuration Validation Processor
10 | A Java 6 annotation processor to validate Spring @Configuration classes
11 | https://github.com/pellaton/spring-configuration-validation-processor
12 | 2012
13 |
14 |
15 |
16 | Apache License 2.0
17 | http://www.apache.org/licenses/LICENSE-2.0.txt
18 | repo
19 |
20 |
21 |
22 |
23 | scm:git:https://github.com/pellaton/spring-configuration-validation-processor.git
24 | scm:git:git@github.com:pellaton/spring-configuration-validation-processor.git
25 | ${project.url}
26 | HEAD
27 |
28 |
29 |
30 |
31 | pellaton
32 | Michael Pellaton
33 | michael.pellaton@gmail.com
34 | www.pellaton.li
35 | +1
36 |
37 | developer
38 |
39 |
40 |
41 |
42 |
43 | 1.3
44 | 1.6
45 | 4.13.1
46 | 1.10.19
47 | UTF-8
48 | UTF-8
49 | 5.3.2
50 |
51 |
52 |
53 | config-validation-processor-core
54 | config-validation-processor-java6
55 | config-validation-processor-java7
56 | config-validation-processor-java8
57 | config-validation-processor-java11
58 |
59 |
60 |
61 |
62 |
63 | org.springframework
64 | spring-context
65 | ${spring.framwork.version}
66 |
67 |
68 |
69 |
70 | junit
71 | junit
72 | ${junit.version}
73 | test
74 |
75 |
76 | org.hamcrest
77 | hamcrest-core
78 |
79 |
80 |
81 |
82 | org.hamcrest
83 | hamcrest-all
84 | ${hamcrest.version}
85 | test
86 |
87 |
88 | org.mockito
89 | mockito-all
90 | ${mockito.version}
91 | test
92 |
93 |
94 | org.springframework
95 | spring-test
96 | ${spring.framwork.version}
97 | test
98 |
99 |
100 |
101 |
102 |
103 | ossrh
104 | https://oss.sonatype.org/content/repositories/snapshots
105 |
106 |
107 | ossrh
108 | https://oss.sonatype.org/service/local/staging/deploy/maven2/
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | maven-clean-plugin
117 | 3.1.0
118 |
119 |
120 | maven-compiler-plugin
121 | 3.8.1
122 |
123 |
124 | maven-gpg-plugin
125 | 1.6
126 |
127 |
128 | maven-javadoc-plugin
129 | 3.2.0
130 |
131 |
132 | maven-release-plugin
133 | 2.5.3
134 |
135 |
136 | maven-resources-plugin
137 | 3.2.0
138 |
139 |
140 | maven-scm-plugin
141 | 1.11.2
142 |
143 |
144 | maven-source-plugin
145 | 3.2.0
146 |
147 |
148 | maven-surefire-plugin
149 | 2.22.2
150 |
151 |
152 |
153 |
154 |
155 |
156 | org.apache.maven.plugins
157 | maven-compiler-plugin
158 |
159 | ${java.version}
160 | ${java.version}
161 | UTF-8
162 |
163 |
164 | -proc:none
165 |
166 |
167 |
168 |
169 | maven-source-plugin
170 |
171 |
172 | attach-sources
173 |
174 | jar-no-fork
175 |
176 |
177 |
178 |
179 |
180 |
181 | maven-javadoc-plugin
182 |
183 | ${java.version}
184 | true
185 |
186 |
187 |
188 | attach-javadocs
189 | package
190 |
191 | jar
192 |
193 |
194 |
195 |
196 |
197 |
198 | org.apache.maven.plugins
199 | maven-release-plugin
200 |
201 | true
202 | false
203 | deploy-to-sonatype-oss
204 | deploy
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 | deploy-to-sonatype-oss
213 |
214 |
215 |
216 | org.apache.maven.plugins
217 | maven-gpg-plugin
218 |
219 |
220 | sign-artifacts
221 | verify
222 |
223 | sign
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
--------------------------------------------------------------------------------