MCPcopy Index your code
hub / github.com/graphql-java/graphql-java / Person

Class Person

src/test/groovy/graphql/GarfieldSchema.java:71–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 public static class Person implements Named {
72 private final String name;
73 private List<Dog> dogs;
74 private List<Cat> cats;
75 private List<Named> friends;
76
77 public Person(String name) {
78 this(name, Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
79 }
80
81 public Person(String name, List<Cat> cats, List<Dog> dogs, List<Named> friends) {
82 this.name = name;
83 this.dogs = dogs;
84 this.cats = cats;
85 this.friends = friends;
86 }
87
88 public List<Object> getPets() {
89 List<Object> pets = new ArrayList<>();
90 pets.addAll(cats);
91 pets.addAll(dogs);
92 return pets;
93 }
94
95 @Override
96 public String getName() {
97 return name;
98 }
99
100 public List<Named> getFriends() {
101 return friends;
102 }
103 }
104
105 public static Cat garfield = new Cat("Garfield", false);
106 public static Dog odie = new Dog("Odie", true);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…