Skip to content

Commit 1f7ca4a

Browse files
author
gursajan
committed
removed description and getDescription from child classes
1 parent ac2ca0c commit 1f7ca4a

11 files changed

Lines changed: 1 addition & 63 deletions

src/main/java/graphql/language/AbstractDescribedNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@PublicApi
99
public abstract class AbstractDescribedNode<T extends Node> extends AbstractNode<T> implements DescribedNode<T> {
1010

11-
private Description description;
11+
protected Description description;
1212

1313
public AbstractDescribedNode(SourceLocation sourceLocation, List<Comment> comments, IgnoredChars ignoredChars, Map<String, String> additionalData, Description description) {
1414
super(sourceLocation, comments, ignoredChars, additionalData);

src/main/java/graphql/language/DirectiveDefinition.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
@PublicApi
2020
public class DirectiveDefinition extends AbstractDescribedNode<DirectiveDefinition> implements SDLDefinition<DirectiveDefinition>, NamedNode<DirectiveDefinition> {
2121
private final String name;
22-
private final Description description;
2322
private final List<InputValueDefinition> inputValueDefinitions;
2423
private final List<DirectiveLocation> directiveLocations;
2524

@@ -37,7 +36,6 @@ protected DirectiveDefinition(String name,
3736
Map<String, String> additionalData) {
3837
super(sourceLocation, comments, ignoredChars, additionalData, description);
3938
this.name = name;
40-
this.description = description;
4139
this.inputValueDefinitions = inputValueDefinitions;
4240
this.directiveLocations = directiveLocations;
4341
}
@@ -56,10 +54,6 @@ public String getName() {
5654
return name;
5755
}
5856

59-
public Description getDescription() {
60-
return description;
61-
}
62-
6357
public List<InputValueDefinition> getInputValueDefinitions() {
6458
return new ArrayList<>(inputValueDefinitions);
6559
}

src/main/java/graphql/language/EnumTypeDefinition.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
@PublicApi
1919
public class EnumTypeDefinition extends AbstractDescribedNode<EnumTypeDefinition> implements TypeDefinition<EnumTypeDefinition>, DirectivesContainer<EnumTypeDefinition>, NamedNode<EnumTypeDefinition> {
2020
private final String name;
21-
private final Description description;
2221
private final List<EnumValueDefinition> enumValueDefinitions;
2322
private final List<Directive> directives;
2423

@@ -35,7 +34,6 @@ protected EnumTypeDefinition(String name,
3534
IgnoredChars ignoredChars, Map<String, String> additionalData) {
3635
super(sourceLocation, comments, ignoredChars, additionalData, description);
3736
this.name = name;
38-
this.description = description;
3937
this.directives = (null == directives) ? new ArrayList<>() : directives;
4038
this.enumValueDefinitions = enumValueDefinitions;
4139
}
@@ -63,10 +61,6 @@ public String getName() {
6361
return name;
6462
}
6563

66-
public Description getDescription() {
67-
return description;
68-
}
69-
7064
@Override
7165
public List<Node> getChildren() {
7266
List<Node> result = new ArrayList<>();

src/main/java/graphql/language/EnumValueDefinition.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
@PublicApi
2020
public class EnumValueDefinition extends AbstractDescribedNode<EnumValueDefinition> implements DirectivesContainer<EnumValueDefinition>, NamedNode<EnumValueDefinition> {
2121
private final String name;
22-
private final Description description;
2322
private final List<Directive> directives;
2423

2524
public static final String CHILD_DIRECTIVES = "directives";
@@ -33,7 +32,6 @@ protected EnumValueDefinition(String name,
3332
IgnoredChars ignoredChars, Map<String, String> additionalData) {
3433
super(sourceLocation, comments, ignoredChars, additionalData, description);
3534
this.name = name;
36-
this.description = description;
3735
this.directives = (null == directives) ? new ArrayList<>() : directives;
3836
}
3937

@@ -61,10 +59,6 @@ public String getName() {
6159
return name;
6260
}
6361

64-
public Description getDescription() {
65-
return description;
66-
}
67-
6862
@Override
6963
public List<Directive> getDirectives() {
7064
return new ArrayList<>(directives);

src/main/java/graphql/language/FieldDefinition.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
public class FieldDefinition extends AbstractDescribedNode<FieldDefinition> implements DirectivesContainer<FieldDefinition>, NamedNode<FieldDefinition> {
2121
private final String name;
2222
private final Type type;
23-
private final Description description;
2423
private final List<InputValueDefinition> inputValueDefinitions;
2524
private final List<Directive> directives;
2625

@@ -39,7 +38,6 @@ protected FieldDefinition(String name,
3938
IgnoredChars ignoredChars,
4039
Map<String, String> additionalData) {
4140
super(sourceLocation, comments, ignoredChars, additionalData, description);
42-
this.description = description;
4341
this.name = name;
4442
this.type = type;
4543
this.inputValueDefinitions = inputValueDefinitions;
@@ -60,10 +58,6 @@ public String getName() {
6058
return name;
6159
}
6260

63-
public Description getDescription() {
64-
return description;
65-
}
66-
6761
public List<InputValueDefinition> getInputValueDefinitions() {
6862
return new ArrayList<>(inputValueDefinitions);
6963
}

src/main/java/graphql/language/InputObjectTypeDefinition.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
public class InputObjectTypeDefinition extends AbstractDescribedNode<InputObjectTypeDefinition> implements TypeDefinition<InputObjectTypeDefinition>, DirectivesContainer<InputObjectTypeDefinition>, NamedNode<InputObjectTypeDefinition> {
2020

2121
private final String name;
22-
private final Description description;
2322
private final List<Directive> directives;
2423
private final List<InputValueDefinition> inputValueDefinitions;
2524

@@ -37,7 +36,6 @@ protected InputObjectTypeDefinition(String name,
3736
Map<String, String> additionalData) {
3837
super(sourceLocation, comments, ignoredChars, additionalData, description);
3938
this.name = name;
40-
this.description = description;
4139
this.directives = directives;
4240
this.inputValueDefinitions = inputValueDefinitions;
4341
}
@@ -56,10 +54,6 @@ public String getName() {
5654
return name;
5755
}
5856

59-
public Description getDescription() {
60-
return description;
61-
}
62-
6357
@Override
6458
public List<Node> getChildren() {
6559
List<Node> result = new ArrayList<>();

src/main/java/graphql/language/InputValueDefinition.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public class InputValueDefinition extends AbstractDescribedNode<InputValueDefini
2121
private final String name;
2222
private final Type type;
2323
private final Value defaultValue;
24-
private final Description description;
2524
private final List<Directive> directives;
2625

2726
public static final String CHILD_TYPE = "type";
@@ -43,8 +42,6 @@ protected InputValueDefinition(String name,
4342
this.type = type;
4443
this.defaultValue = defaultValue;
4544
this.directives = directives;
46-
this.description = description;
47-
4845
}
4946

5047
/**
@@ -83,10 +80,6 @@ public String getName() {
8380
return name;
8481
}
8582

86-
public Description getDescription() {
87-
return description;
88-
}
89-
9083
public Value getDefaultValue() {
9184
return defaultValue;
9285
}

src/main/java/graphql/language/InterfaceTypeDefinition.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
public class InterfaceTypeDefinition extends AbstractDescribedNode<InterfaceTypeDefinition> implements TypeDefinition<InterfaceTypeDefinition>, DirectivesContainer<InterfaceTypeDefinition>, NamedNode<InterfaceTypeDefinition> {
2121

2222
private final String name;
23-
private final Description description;
2423
private final List<FieldDefinition> definitions;
2524
private final List<Directive> directives;
2625

@@ -40,7 +39,6 @@ protected InterfaceTypeDefinition(String name,
4039
this.name = name;
4140
this.definitions = definitions;
4241
this.directives = directives;
43-
this.description = description;
4442
}
4543

4644
/**
@@ -66,10 +64,6 @@ public String getName() {
6664
return name;
6765
}
6866

69-
public Description getDescription() {
70-
return description;
71-
}
72-
7367
@Override
7468
public List<Node> getChildren() {
7569
List<Node> result = new ArrayList<>();

src/main/java/graphql/language/ObjectTypeDefinition.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
@PublicApi
2020
public class ObjectTypeDefinition extends AbstractDescribedNode<ObjectTypeDefinition> implements TypeDefinition<ObjectTypeDefinition>, DirectivesContainer<ObjectTypeDefinition>, NamedNode<ObjectTypeDefinition> {
2121
private final String name;
22-
private final Description description;
2322
private final List<Type> implementz;
2423
private final List<Directive> directives;
2524
private final List<FieldDefinition> fieldDefinitions;
@@ -43,7 +42,6 @@ protected ObjectTypeDefinition(String name,
4342
this.implementz = implementz;
4443
this.directives = directives;
4544
this.fieldDefinitions = fieldDefinitions;
46-
this.description = description;
4745
}
4846

4947
/**
@@ -73,10 +71,6 @@ public String getName() {
7371
return name;
7472
}
7573

76-
public Description getDescription() {
77-
return description;
78-
}
79-
8074
@Override
8175
public List<Node> getChildren() {
8276
List<Node> result = new ArrayList<>();

src/main/java/graphql/language/ScalarTypeDefinition.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
public class ScalarTypeDefinition extends AbstractDescribedNode<ScalarTypeDefinition> implements TypeDefinition<ScalarTypeDefinition>, DirectivesContainer<ScalarTypeDefinition>, NamedNode<ScalarTypeDefinition> {
2121

2222
private final String name;
23-
private final Description description;
2423
private final List<Directive> directives;
2524

2625
public static final String CHILD_DIRECTIVES = "directives";
@@ -36,7 +35,6 @@ protected ScalarTypeDefinition(String name,
3635
super(sourceLocation, comments, ignoredChars, additionalData, description);
3736
this.name = name;
3837
this.directives = directives;
39-
this.description = description;
4038
}
4139

4240
/**
@@ -58,11 +56,6 @@ public String getName() {
5856
return name;
5957
}
6058

61-
62-
public Description getDescription() {
63-
return description;
64-
}
65-
6659
@Override
6760
public List<Node> getChildren() {
6861
return new ArrayList<>(directives);

0 commit comments

Comments
 (0)