Class ParameterModel
java.lang.Object
io.smallrye.graphql.client.model.helper.ParameterModel
- All Implemented Interfaces:
NamedElement
Represents a model for a method parameter in GraphQL, providing information about the parameter's name,
type, and associated 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 names of nested parameters if the parameter is a nested parameter.Gets the raw (original) name of the NamedElement.Gets the GraphQL input type name for the parameter.booleanChecks if the NamedElement has associated directives.booleanChecks if the parameter is a nested parameter.booleanChecks if the parameter is a root parameter (neither header nor nested parameter).booleanChecks if the parameter is a value parameter, either a root or nested parameter.static ParameterModelof(org.jboss.jandex.MethodParameterInfo parameter) Creates and returns a newParameterModelinstance based on the provided JandexMethodParameterInfo.
-
Method Details
-
of
Creates and returns a newParameterModelinstance based on the provided JandexMethodParameterInfo.- Parameters:
parameter- The JandexMethodParameterInforepresenting the GraphQL method parameter.- Returns:
- A new
ParameterModelinstance.
-
isValueParameter
public boolean isValueParameter()Checks if the parameter is a value parameter, either a root or nested parameter.- Returns:
trueif the parameter is a value parameter, otherwisefalse.
-
isRootParameter
public boolean isRootParameter()Checks if the parameter is a root parameter (neither header nor nested parameter).- Returns:
trueif the parameter is a root parameter, otherwisefalse.
-
isNestedParameter
public boolean isNestedParameter()Checks if the parameter is a nested parameter.- Returns:
trueif the parameter is a nested parameter, otherwisefalse.
-
getNestedParameterNames
Gets the names of nested parameters if the parameter is a nested parameter.- Returns:
- A stream of nested parameter names.
-
getName
Description copied from interface:NamedElementGets the name of the NamedElement, considering anyNameannotation if present.- Specified by:
getNamein interfaceNamedElement- Returns:
- The field name.
-
getRawName
Description copied from interface:NamedElementGets the raw (original) name of the NamedElement.- Specified by:
getRawNamein interfaceNamedElement- Returns:
- The raw field name.
-
getDirectiveLocation
Description copied from interface:NamedElementGets the location of directives associated with this NamedElement.- Specified by:
getDirectiveLocationin interfaceNamedElement- Returns:
- The directive location
-
graphQlInputTypeName
Gets the GraphQL input type name for the parameter.- Returns:
- The GraphQL input type name.
-
hasDirectives
public boolean hasDirectives()Description copied from interface:NamedElementChecks if the NamedElement has associated directives.- Specified by:
hasDirectivesin interfaceNamedElement- Returns:
trueif the NamedElement has directives, otherwisefalse.
-
getDirectives
Description copied from interface:NamedElementGets the list of directives associated with the NamedElement.- Specified by:
getDirectivesin interfaceNamedElement- Returns:
- The list of
DirectiveInstanceobjects.
-