Interface NamedElement
-
- All Known Implementing Classes:
FieldModel,OperationModel,ParameterModel
public interface NamedElementAn interface for elements that have a name and may be associated with GraphQL directives.- Author:
- mskacelik
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetDirectiveLocation()Gets the location of directives associated with this NamedElement.List<DirectiveInstance>getDirectives()Gets the list of directives associated with the NamedElement.StringgetName()Gets the name of the NamedElement, considering anyNameannotation if present.StringgetRawName()Gets the raw (original) name of the NamedElement.booleanhasDirectives()Checks if the NamedElement has associated directives.
-
-
-
Method Detail
-
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.
-
-