Skip to content

Commit 6bfc3ef

Browse files
authored
Use Javadoc snippets (#6091)
* Use Javadoc snippets * fixed example setters
1 parent f7bb172 commit 6bfc3ef

File tree

7 files changed

+27
-35
lines changed

7 files changed

+27
-35
lines changed

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/mapper/annotations/DynamoDbAttribute.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
*
2929
* <p>
3030
* Example using {@link DynamoDbAttribute}:
31-
* <pre>
32-
* {@code
31+
* {@snippet :
3332
* @DynamoDbBean
3433
* public class Bean {
3534
* private String internalKey;
@@ -40,11 +39,10 @@
4039
* }
4140
*
4241
* public void setInternalKey(String internalKey) {
43-
* return this.internalKey = internalKey;}
42+
* this.internalKey = internalKey;
4443
* }
4544
* }
4645
* }
47-
* </pre>
4846
*/
4947
@Target({ElementType.METHOD})
5048
@Retention(RetentionPolicy.RUNTIME)

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/mapper/annotations/DynamoDbBean.java

+8-7
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@
4747
* </ul>
4848
*
4949
* Example using attribute converter providers with one custom provider and the default provider:
50-
* <pre>
51-
* {@code
50+
*
51+
* {@snippet :
5252
* (converterProviders = {CustomAttributeConverter.class, DefaultAttributeConverterProvider.class});
5353
* }
54-
* </pre>
54+
*
5555
* <p>
5656
* Example using {@link DynamoDbBean}:
57-
* <pre>
58-
* {@code
57+
*
58+
* {@snippet :
5959
* @DynamoDbBean
6060
* public class Customer {
6161
* private String id;
@@ -73,12 +73,13 @@
7373
* public Instant getCreatedOn() {
7474
* return this.createdOn;
7575
* }
76+
*
7677
* public void setCreatedOn(Instant createdOn) {
7778
* this.createdOn = createdOn;
78-
* }
79+
* }
7980
* }
8081
* }
81-
* </pre>
82+
*
8283
*/
8384
@Target({ElementType.TYPE})
8485
@Retention(RetentionPolicy.RUNTIME)

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/mapper/annotations/DynamoDbIgnore.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
/**
2525
* Opts this attribute out of participating in the table schema. It will be completely ignored by the mapper.
2626
* <p>
27-
* Example using {@link DynamoDbAttribute}:
28-
* <pre>
29-
* {@code
27+
* Example using {@link DynamoDbIgnore}:
28+
*
29+
* {@snippet :
3030
* @DynamoDbBean
3131
* public class Bean {
3232
* private String internalKey;
@@ -37,11 +37,10 @@
3737
* }
3838
*
3939
* public void setInternalKey(String internalKey) {
40-
* return this.internalKey = internalKey;}
40+
* this.internalKey = internalKey;
4141
* }
4242
* }
4343
* }
44-
* </pre>
4544
*/
4645
@Target({ElementType.METHOD})
4746
@Retention(RetentionPolicy.RUNTIME)

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/mapper/annotations/DynamoDbIgnoreNulls.java

+5-6
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
*
3030
* <p>
3131
* Example using {@link DynamoDbIgnoreNulls}:
32-
* <pre>
33-
* <code>
34-
* &#64;DynamoDbBean
32+
*
33+
* {@snippet :
34+
* @DynamoDbBean
3535
* public class NestedBean {
3636
* private AbstractBean innerBean1;
3737
* private AbstractBean innerBean2;
3838
*
39-
* &#64;DynamoDbIgnoreNulls
39+
* @DynamoDbIgnoreNulls
4040
* public AbstractBean getInnerBean1() {
4141
* return innerBean1;
4242
* }
@@ -67,8 +67,7 @@
6767
*
6868
* // innerBean2 w/o @DynamoDbIgnoreNulls has a NULL attribute.
6969
* assertThat(nestedBean.getInnerBean2(), hasEntry("attribute", nullAttributeValue()));
70-
* </code>
71-
* </pre>
70+
* }
7271
*/
7372
@SdkPublicApi
7473
@Target({ElementType.METHOD})

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/mapper/annotations/DynamoDbImmutable.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,14 @@
4747
* </ul>
4848
*
4949
* Example using attribute converter providers with one custom provider and the default provider:
50-
* <pre>
51-
* {@code
50+
*
51+
* {@snippet :
5252
* (converterProviders = {CustomAttributeConverter.class, DefaultAttributeConverterProvider.class});
5353
* }
54-
* </pre>
5554
*
5655
* <p>
5756
* Example using {@link DynamoDbImmutable}:
58-
* <pre>
59-
* {@code
57+
* {@snippet :
6058
* @DynamoDbImmutable(builder = Customer.Builder.class)
6159
* public class Customer {
6260
* private final String accountId;
@@ -104,7 +102,6 @@
104102
* }
105103
* }
106104
* }
107-
* </pre>
108105
*/
109106
@Target({ElementType.TYPE})
110107
@Retention(RetentionPolicy.RUNTIME)

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/mapper/annotations/DynamoDbPartitionKey.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
*
2929
* <p>
3030
* Example using {@link DynamoDbPartitionKey}:
31-
* <pre>
32-
* {@code
31+
* {@snippet :
3332
* @DynamoDbBean
3433
* public class Customer {
3534
* private String id;
@@ -47,12 +46,12 @@
4746
* public Instant getCreatedOn() {
4847
* return this.createdOn;
4948
* }
49+
*
5050
* public void setCreatedOn(Instant createdOn) {
5151
* this.createdOn = createdOn;
5252
* }
5353
* }
5454
* }
55-
* </pre>
5655
*/
5756
@SdkPublicApi
5857
@Target({ElementType.METHOD})

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/mapper/annotations/DynamoDbSortKey.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@
2525
/**
2626
* Denotes this attribute as being the optional primary sort key of the DynamoDb table. This attribute must map to a
2727
* DynamoDb scalar type (string, number or binary) to be valid.
28-
*
28+
* <p>
2929
* Example using {@link DynamoDbSortKey}:
30-
* <pre>
31-
* {@code
30+
* {@snippet :
3231
* @DynamoDbBean
3332
* public class Customer {
3433
* private String accountId;
@@ -52,7 +51,7 @@
5251
* }
5352
* }
5453
* }
55-
* </pre>
54+
*
5655
*/
5756
@SdkPublicApi
5857
@Target({ElementType.METHOD})

0 commit comments

Comments
 (0)