Interface NamedElement
- All Known Implementing Classes:
FieldModel,OperationModel,ParameterModel
public interface NamedElement
An interface for elements that have a name and may be associated with GraphQL directives.
- Author:
- mskacelik
-
Method Summary
Modifier and TypeMethodDescriptionGets the location of directives associated with this NamedElement.Gets the list of directives associated with the NamedElement.getName()Gets the name of the NamedElement, considering anyNameannotation if present.Gets the raw (original) name of the NamedElement.booleanChecks if the NamedElement has associated directives.
-
Method Details
-
getName
String getName()Gets the name of the NamedElement, considering anyNameannotation if present.- Returns:
- The field name.
-
getRawName
String getRawName()Gets the raw (original) name of the NamedElement.- Returns:
- The raw field name.
-
getDirectiveLocation
String getDirectiveLocation()Gets the location of directives associated with this NamedElement.- Returns:
- The directive location
-
hasDirectives
boolean hasDirectives()Checks if the NamedElement has associated directives.- Returns:
trueif the NamedElement has directives, otherwisefalse.
-
getDirectives
List<DirectiveInstance> getDirectives()Gets the list of directives associated with the NamedElement.- Returns:
- The list of
DirectiveInstanceobjects.
-