@PublicApi public interface DirectivesContainer<T extends DirectivesContainer> extends Node<T>
There are access methods here that get the two different types.
Modifier and Type | Method and Description |
---|---|
java.util.List<Directive> |
getDirectives()
This will return a list of all the directives that have been put on
Node as a flat list, which may contain repeatable
and non repeatable directives. |
default java.util.List<Directive> |
getDirectives(java.lang.String directiveName)
Returns all of the directives with the provided name, including repeatable and non repeatable directives.
|
default java.util.Map<java.lang.String,java.util.List<Directive>> |
getDirectivesByName()
This will return a Map of the all directives that are associated with a
Node , including both repeatable and non repeatable directives. |
default boolean |
hasDirective(java.lang.String directiveName)
This returns true if the AST node contains one or more directives by the specified name
|
accept, deepCopy, getAdditionalData, getChildren, getComments, getIgnoredChars, getNamedChildren, getSourceLocation, isEqualTo, withNewChildren
java.util.List<Directive> getDirectives()
Node
as a flat list, which may contain repeatable
and non repeatable directives.default java.util.Map<java.lang.String,java.util.List<Directive>> getDirectivesByName()
Node
, including both repeatable and non repeatable directives.default java.util.List<Directive> getDirectives(java.lang.String directiveName)
directiveName
- the name of the directives to retrievedefault boolean hasDirective(java.lang.String directiveName)
directiveName
- the name ot check