44 lines
708 B
Plaintext
44 lines
708 B
Plaintext
For optimal code readability, annotation arguments should be specified in the same order that they were declared in the annotation definition.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,java]
|
|
----
|
|
@interface Pet {
|
|
String name();
|
|
String surname();
|
|
}
|
|
|
|
@Pet(surname ="", name="") // Noncompliant
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
[source,java]
|
|
----
|
|
@interface Pet {
|
|
String name();
|
|
String surname();
|
|
}
|
|
|
|
@Pet(name ="", surname="") // Compliant
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|