Say, I am creating an object using the builder pattern as follows:
CfnResolverProps props = CfnResolverProps.builder()
.apiId(“TestApiId”)
.typeName("Query")
.fieldName(“list”)
.dataSourceName(“SomeName”)
.build()
So, here, is it a good idea to make static constants variables for all the TestApiId, Query, list, SomeName? Or with builder pattern, it does not matter? For me, here, it doesn’t matter much because, here it is already readable code as builderPattern tells the name of the fields explicitly. What are the guidelines people use to use constants in Java?
submitted by /u/hatella
[link] [comments]