Package graphql
Class InvalidSyntaxError
- java.lang.Object
-
- graphql.InvalidSyntaxError
-
- All Implemented Interfaces:
GraphQLError,java.io.Serializable
public class InvalidSyntaxError extends java.lang.Object implements GraphQLError
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface graphql.GraphQLError
GraphQLError.Builder<B extends GraphQLError.Builder<B>>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<SourceLocation>locationsprivate java.lang.Stringmessageprivate java.lang.StringoffendingTokenprivate java.lang.StringsourcePreview
-
Constructor Summary
Constructors Constructor Description InvalidSyntaxError(SourceLocation sourceLocation, java.lang.String msg)InvalidSyntaxError(java.util.List<SourceLocation> sourceLocations, java.lang.String msg)InvalidSyntaxError(java.util.List<SourceLocation> sourceLocations, java.lang.String msg, java.lang.String sourcePreview, java.lang.String offendingToken)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)ErrorTypegetErrorType()java.util.List<SourceLocation>getLocations()java.lang.StringgetMessage()java.lang.StringgetOffendingToken()java.lang.StringgetSourcePreview()inthashCode()java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface graphql.GraphQLError
getExtensions, getPath, toSpecification
-
-
-
-
Field Detail
-
message
private final java.lang.String message
-
sourcePreview
private final java.lang.String sourcePreview
-
offendingToken
private final java.lang.String offendingToken
-
locations
private final java.util.List<SourceLocation> locations
-
-
Constructor Detail
-
InvalidSyntaxError
public InvalidSyntaxError(SourceLocation sourceLocation, java.lang.String msg)
-
InvalidSyntaxError
public InvalidSyntaxError(java.util.List<SourceLocation> sourceLocations, java.lang.String msg)
-
InvalidSyntaxError
public InvalidSyntaxError(java.util.List<SourceLocation> sourceLocations, java.lang.String msg, java.lang.String sourcePreview, java.lang.String offendingToken)
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
- Specified by:
getMessagein interfaceGraphQLError- Returns:
- a description of the error intended for the developer as a guide to understand and correct the error
-
getLocations
public java.util.List<SourceLocation> getLocations()
- Specified by:
getLocationsin interfaceGraphQLError- Returns:
- the location(s) within the GraphQL document at which the error occurred. Each
SourceLocationdescribes the beginning of an associated syntax element
-
getSourcePreview
public java.lang.String getSourcePreview()
-
getOffendingToken
public java.lang.String getOffendingToken()
-
getErrorType
public ErrorType getErrorType()
- Specified by:
getErrorTypein interfaceGraphQLError- Returns:
- an object classifying this error
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-