Interface DirectivesContainer<T extends DirectivesContainer>
- All Superinterfaces:
Node<T>, Serializable
- All Known Subinterfaces:
ImplementingTypeDefinition<T>, TypeDefinition<T>
- All Known Implementing Classes:
EnumTypeDefinition, EnumTypeExtensionDefinition, EnumValueDefinition, Field, FieldDefinition, FragmentDefinition, FragmentSpread, InlineFragment, InputObjectTypeDefinition, InputObjectTypeExtensionDefinition, InputValueDefinition, InterfaceTypeDefinition, InterfaceTypeExtensionDefinition, ObjectTypeDefinition, ObjectTypeExtensionDefinition, OperationDefinition, ScalarTypeDefinition, ScalarTypeExtensionDefinition, SchemaDefinition, SchemaExtensionDefinition, UnionTypeDefinition, UnionTypeExtensionDefinition, VariableDefinition
Represents a language node that can contain Directives. Directives can be repeatable and (by default) non repeatable.
There are access methods here that get the two different types.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionThis will return a list of all the directives that have been put onNodeas a flat list, which may contain repeatable and non repeatable directives.getDirectives(String directiveName) Returns all of the directives with the provided name, including repeatable and non repeatable directives.This will return a Map of the all directives that are associated with aNode, including both repeatable and non repeatable directives.default booleanhasDirective(String directiveName) This returns true if the AST node contains one or more directives by the specified nameMethods inherited from interface Node
accept, deepCopy, getAdditionalData, getChildren, getComments, getIgnoredChars, getNamedChildren, getSourceLocation, isEqualTo, withNewChildren
-
Method Details
-
getDirectives
-
getDirectivesByName
-
getDirectives
Returns all of the directives with the provided name, including repeatable and non repeatable directives.- Parameters:
directiveName- the name of the directives to retrieve- Returns:
- the directives or empty list if there is not one with that name
-
hasDirective
This returns true if the AST node contains one or more directives by the specified name- Parameters:
directiveName- the name ot check- Returns:
- true if the AST node contains one or more directives by the specified name
-