+ Check location of annotation on language elements. + By default, Check enforce to locate annotations immediately + after documentation block and before target element, annotation should be located on separate line from target element. +
++ Example: +
+| name | +description | +type | +default value | +
|---|---|---|---|
| allowSamelineMultipleAnnotations | +To allow annotation to be located on the same line as target element. | +boolean | +false |
+
| allowSamelineSingleParameterlessAnnotation | +To allow single prameterless annotation to be located on the same line as target element. | +boolean | +true |
+
| allowSamelineParameterizedAnnotation | +To allow parameterized annotation to be located on the same line as target element. | +boolean | +false |
+
| tokens | +tokens to check | +subset of tokens + CLASS_DEF, + INTERFACE_DEF, + ENUM_DEF, + METHOD_DEF, + CTOR_DEF, + VARIABLE_DEF, + PARAMETER_DEF, + ANNOTATION_DEF, + TYPECAST, + LITERAL_THROWS, + IMPLEMENTS_CLAUSE, + TYPE_ARGUMENT, + LITERAL_NEW, + DOT, + ANNOTATION_FIELD_DEF. + | ++ CLASS_DEF, + INTERFACE_DEF, + ENUM_DEF, + METHOD_DEF, + CTOR_DEF, + VARIABLE_DEF. + | +
+ Example to allow single parameterless annotation on the same line +
++ Use following configuration: +
++ Example to allow multiple parameterized annotations on the same line +
++ Use following configuration: +
++ Example to allow multiple parameterless annotations on the same line +
++ Use following configuration: +
+com.puppycrawl.tools.checkstyle.checks.annotation
+This check controls the style with the usage of annotations. @@ -469,153 +617,5 @@
- Check location of annotation on language elements. - By default, Check enforce to locate annotations immediately - after documentation block and before target element, annotation should be located on separate line from target element. -
-- Example: -
-| name | -description | -type | -default value | -
|---|---|---|---|
| allowSamelineMultipleAnnotations | -To allow annotation to be located on the same line as target element. | -boolean | -false |
-
| allowSamelineSingleParameterlessAnnotation | -To allow single prameterless annotation to be located on the same line as target element. | -boolean | -true |
-
| allowSamelineParameterizedAnnotation | -To allow parameterized annotation to be located on the same line as target element. | -boolean | -false |
-
| tokens | -tokens to check | -subset of tokens - CLASS_DEF, - INTERFACE_DEF, - ENUM_DEF, - METHOD_DEF, - CTOR_DEF, - VARIABLE_DEF, - PARAMETER_DEF, - ANNOTATION_DEF, - TYPECAST, - LITERAL_THROWS, - IMPLEMENTS_CLAUSE, - TYPE_ARGUMENT, - LITERAL_NEW, - DOT, - ANNOTATION_FIELD_DEF. - | -- CLASS_DEF, - INTERFACE_DEF, - ENUM_DEF, - METHOD_DEF, - CTOR_DEF, - VARIABLE_DEF. - | -
- Example to allow single parameterless annotation on the same line -
-- Use following configuration: -
-- Example to allow multiple parameterized annotations on the same line -
-- Use following configuration: -
-- Example to allow multiple parameterless annotations on the same line -
-- Use following configuration: -
-com.puppycrawl.tools.checkstyle.checks.annotation
-