FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
graphql-java/src/main/java/graphql/language/Directive.java at master · feifeiq/graphql-java · GitHub
feifeiq
/
graphql-java
Public
forked from
graphql-java/graphql-java
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
graphql-java
/
src
/
main
/
java
/
graphql
/
language
/
Directive.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
65 lines (48 loc) · 1.53 KB
Breadcrumbs
graphql-java
/
src
/
main
/
java
/
graphql
/
language
/
Directive.java
Copy path
File metadata and controls
65 lines (48 loc) · 1.53 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package
graphql
.
language
;
import
java
.
util
.
ArrayList
;
import
java
.
util
.
Collections
;
import
java
.
util
.
List
;
import
java
.
util
.
Map
;
import
static
graphql
.
language
.
NodeUtil
.
argumentsByName
;
public
class
Directive
extends
AbstractNode
{
private
final
String
name
;
private
final
List
<
Argument
>
arguments
=
new
ArrayList
<>();
public
Directive
(
String
name
) {
this
(
name
,
Collections
.
emptyList
());
}
public
Directive
(
String
name
,
List
<
Argument
>
arguments
) {
this
.
name
=
name
;
this
.
arguments
.
addAll
(
arguments
);
}
public
List
<
Argument
>
getArguments
() {
return
arguments
;
}
public
Map
<
String
,
Argument
>
getArgumentsByName
() {
// the spec says that args MUST be unique within context
return
argumentsByName
(
arguments
);
}
public
Argument
getArgument
(
String
argumentName
) {
return
getArgumentsByName
().
get
(
argumentName
);
}
public
String
getName
() {
return
name
;
}
@
Override
public
List
<
Node
>
getChildren
() {
return
new
ArrayList
<>(
arguments
);
}
@
Override
public
boolean
isEqualTo
(
Node
o
) {
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
() !=
o
.
getClass
())
return
false
;
Directive
directive
= (
Directive
)
o
;
return
!(
name
!=
null
? !
name
.
equals
(
directive
.
name
) :
directive
.
name
!=
null
);
}
@
Override
public
String
toString
() {
return
"Directive{"
+
"name='"
+
name
+
'\''
+
", arguments="
+
arguments
+
'}'
;
}
}
Back
|
FazBrowse Home
|
New Git URL