| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -34,20 +34,16 @@ public interface DirectivesContainer<T extends DirectivesContainer> extends Node | |
| * | ||
| * @return a map of all directives by directive name | ||
| */ | ||
| default Map<String, List<Directive>> getDirectivesByName() { | ||
| return ImmutableMap.copyOf(allDirectivesByName(getDirectives())); | ||
|
Comment thread
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThis was terribly memory inefficient
Sorry, something went wrong.
xuorig reacted with laugh emoji
All reactions
|
||
| } | ||
| Map<String, List<Directive>> getDirectivesByName(); | ||
|
|
||
| /** | ||
| * Returns all of the directives with the provided name, including repeatable and non repeatable directives. | ||
| * Returns all the directives with the provided name, including repeatable and non repeatable directives. | ||
| * | ||
| * @param directiveName the name of the directives to retrieve | ||
| * | ||
| * @return the directives or empty list if there is not one with that name | ||
| */ | ||
| default List<Directive> getDirectives(String directiveName) { | ||
| return getDirectivesByName().getOrDefault(directiveName, emptyList()); | ||
|
Comment thread
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThis was terribly memory inefficient
Sorry, something went wrong.
All reactions
|
||
| } | ||
| List<Directive> getDirectives(String directiveName); | ||
|
|
||
| /** | ||
| * This returns true if the AST node contains one or more directives by the specified name | ||
| Expand All | @@ -56,7 +52,5 @@ default List<Directive> getDirectives(String directiveName) { | |
| * | ||
| * @return true if the AST node contains one or more directives by the specified name | ||
| */ | ||
| default boolean hasDirective(String directiveName) { | ||
| return !getDirectives(directiveName).isEmpty(); | ||
|
Comment thread
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThis was terribly memory inefficient
Sorry, something went wrong.
All reactions
|
||
| } | ||
| boolean hasDirective(String directiveName); | ||
| } | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityWe no longer have default methods - but rather a memory efficient DirectivesHolder helper
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.