1717@ PublicApi
1818public class Field extends AbstractNode <Field > implements Selection <Field >, SelectionSetContainer <Field >, DirectivesContainer <Field > {
1919
20- private final String name ;
21- private final String alias ;
22- private final List <Argument > arguments ;
23- private final List <Directive > directives ;
24- private final SelectionSet selectionSet ;
20+ private String name ;
21+ private String alias ;
22+ private List <Argument > arguments ;
23+ private List <Directive > directives ;
24+ private SelectionSet selectionSet ;
2525
2626 @ Internal
2727 protected Field (String name ,
28- String alias ,
29- List <Argument > arguments ,
30- List <Directive > directives ,
31- SelectionSet selectionSet ,
32- SourceLocation sourceLocation ,
33- List <Comment > comments ) {
28+ String alias ,
29+ List <Argument > arguments ,
30+ List <Directive > directives ,
31+ SelectionSet selectionSet ,
32+ SourceLocation sourceLocation ,
33+ List <Comment > comments ) {
3434 super (sourceLocation , comments );
3535 this .name = name ;
3636 this .alias = alias ;
@@ -49,7 +49,6 @@ public Field(String name) {
4949
5050 /**
5151 * alternative to using a Builder for convenience
52- *
5352 */
5453 public Field (String name , List <Argument > arguments ) {
5554 this (name , null , arguments , new ArrayList <>(), null , null , new ArrayList <>());
@@ -74,7 +73,9 @@ public List<Node> getChildren() {
7473 List <Node > result = new ArrayList <>();
7574 result .addAll (arguments );
7675 result .addAll (directives );
77- if (selectionSet != null ) result .add (selectionSet );
76+ if (selectionSet != null ) {
77+ result .add (selectionSet );
78+ }
7879 return result ;
7980 }
8081
@@ -89,7 +90,15 @@ public String getAlias() {
8990 }
9091
9192 public List <Argument > getArguments () {
92- return new ArrayList <>(arguments );
93+ return arguments ;
94+ }
95+
96+ public void setArguments (List <Argument > arguments ) {
97+ this .arguments = arguments ;
98+ }
99+
100+ public void setDirectives (List <Directive > directives ) {
101+ this .directives = directives ;
93102 }
94103
95104 @ Override
@@ -102,10 +111,26 @@ public SelectionSet getSelectionSet() {
102111 return selectionSet ;
103112 }
104113
114+ public void setName (String name ) {
115+ this .name = name ;
116+ }
117+
118+ public void setAlias (String alias ) {
119+ this .alias = alias ;
120+ }
121+
122+ public void setSelectionSet (SelectionSet selectionSet ) {
123+ this .selectionSet = selectionSet ;
124+ }
125+
105126 @ Override
106127 public boolean isEqualTo (Node o ) {
107- if (this == o ) return true ;
108- if (o == null || getClass () != o .getClass ()) return false ;
128+ if (this == o ) {
129+ return true ;
130+ }
131+ if (o == null || getClass () != o .getClass ()) {
132+ return false ;
133+ }
109134
110135 Field that = (Field ) o ;
111136
0 commit comments