public final class org.apache.cassandra.cql3.ErrorCollector implements org.apache.cassandra.cql3.ErrorListener
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.apache.cassandra.cql3.ErrorCollector
super_class: java.lang.Object
{
private static final int FIRST_TOKEN_OFFSET;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 10
private static final int LAST_TOKEN_OFFSET;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 2
private final java.lang.String query;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.LinkedList<java.lang.String> errorMsgs;
descriptor: Ljava/util/LinkedList;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/LinkedList<Ljava/lang/String;>;
public void <init>(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.LinkedList
dup
invokespecial java.util.LinkedList.<init>:()V
putfield org.apache.cassandra.cql3.ErrorCollector.errorMsgs:Ljava/util/LinkedList;
2: aload 0
aload 1
putfield org.apache.cassandra.cql3.ErrorCollector.query:Ljava/lang/String;
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/cql3/ErrorCollector;
0 4 1 query Ljava/lang/String;
MethodParameters:
Name Flags
query
public void syntaxError(org.antlr.runtime.BaseRecognizer, java.lang.String[], org.antlr.runtime.RecognitionException);
descriptor: (Lorg/antlr/runtime/BaseRecognizer;[Ljava/lang/String;Lorg/antlr/runtime/RecognitionException;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=7, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
aload 3
invokevirtual org.antlr.runtime.BaseRecognizer.getErrorHeader:(Lorg/antlr/runtime/RecognitionException;)Ljava/lang/String;
astore 4
start local 4 1: aload 1
aload 3
aload 2
invokevirtual org.antlr.runtime.BaseRecognizer.getErrorMessage:(Lorg/antlr/runtime/RecognitionException;[Ljava/lang/String;)Ljava/lang/String;
astore 5
start local 5 2: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 4
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
3: bipush 32
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
4: aload 5
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
5: astore 6
start local 6 6: aload 1
instanceof org.antlr.runtime.Parser
ifeq 8
7: aload 0
aload 1
checkcast org.antlr.runtime.Parser
aload 6
invokevirtual org.apache.cassandra.cql3.ErrorCollector.appendQuerySnippet:(Lorg/antlr/runtime/Parser;Ljava/lang/StringBuilder;)V
8: StackMap locals: java.lang.String java.lang.String java.lang.StringBuilder
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.ErrorCollector.errorMsgs:Ljava/util/LinkedList;
aload 6
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.util.LinkedList.add:(Ljava/lang/Object;)Z
pop
9: return
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/apache/cassandra/cql3/ErrorCollector;
0 10 1 recognizer Lorg/antlr/runtime/BaseRecognizer;
0 10 2 tokenNames [Ljava/lang/String;
0 10 3 e Lorg/antlr/runtime/RecognitionException;
1 10 4 hdr Ljava/lang/String;
2 10 5 msg Ljava/lang/String;
6 10 6 builder Ljava/lang/StringBuilder;
MethodParameters:
Name Flags
recognizer
tokenNames
e
public void syntaxError(org.antlr.runtime.BaseRecognizer, java.lang.String);
descriptor: (Lorg/antlr/runtime/BaseRecognizer;Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.apache.cassandra.cql3.ErrorCollector.errorMsgs:Ljava/util/LinkedList;
aload 2
invokevirtual java.util.LinkedList.add:(Ljava/lang/Object;)Z
pop
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/cql3/ErrorCollector;
0 2 1 recognizer Lorg/antlr/runtime/BaseRecognizer;
0 2 2 errorMsg Ljava/lang/String;
MethodParameters:
Name Flags
recognizer
errorMsg
public void throwFirstSyntaxError();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.cql3.ErrorCollector.errorMsgs:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.isEmpty:()Z
ifne 2
1: new org.apache.cassandra.exceptions.SyntaxException
dup
aload 0
getfield org.apache.cassandra.cql3.ErrorCollector.errorMsgs:Ljava/util/LinkedList;
invokevirtual java.util.LinkedList.getFirst:()Ljava/lang/Object;
checkcast java.lang.String
invokespecial org.apache.cassandra.exceptions.SyntaxException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/cql3/ErrorCollector;
Exceptions:
throws org.apache.cassandra.exceptions.SyntaxException
private void appendQuerySnippet(org.antlr.runtime.Parser, java.lang.StringBuilder);
descriptor: (Lorg/antlr/runtime/Parser;Ljava/lang/StringBuilder;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=9, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokevirtual org.antlr.runtime.Parser.getTokenStream:()Lorg/antlr/runtime/TokenStream;
astore 3
start local 3 1: aload 3
invokeinterface org.antlr.runtime.TokenStream.index:()I
istore 4
start local 4 2: aload 3
invokeinterface org.antlr.runtime.TokenStream.size:()I
istore 5
start local 5 3: aload 3
iload 4
invokestatic org.apache.cassandra.cql3.ErrorCollector.getSnippetFirstTokenIndex:(I)I
invokeinterface org.antlr.runtime.TokenStream.get:(I)Lorg/antlr/runtime/Token;
astore 6
start local 6 4: aload 3
iload 4
iload 5
invokestatic org.apache.cassandra.cql3.ErrorCollector.getSnippetLastTokenIndex:(II)I
invokeinterface org.antlr.runtime.TokenStream.get:(I)Lorg/antlr/runtime/Token;
astore 7
start local 7 5: aload 3
iload 4
iload 5
invokestatic org.apache.cassandra.cql3.ErrorCollector.getOffendingTokenIndex:(II)I
invokeinterface org.antlr.runtime.TokenStream.get:(I)Lorg/antlr/runtime/Token;
astore 8
start local 8 6: aload 0
aload 2
aload 6
aload 7
aload 8
invokevirtual org.apache.cassandra.cql3.ErrorCollector.appendSnippet:(Ljava/lang/StringBuilder;Lorg/antlr/runtime/Token;Lorg/antlr/runtime/Token;Lorg/antlr/runtime/Token;)V
7: return
end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/apache/cassandra/cql3/ErrorCollector;
0 8 1 parser Lorg/antlr/runtime/Parser;
0 8 2 builder Ljava/lang/StringBuilder;
1 8 3 tokenStream Lorg/antlr/runtime/TokenStream;
2 8 4 index I
3 8 5 size I
4 8 6 from Lorg/antlr/runtime/Token;
5 8 7 to Lorg/antlr/runtime/Token;
6 8 8 offending Lorg/antlr/runtime/Token;
MethodParameters:
Name Flags
parser
builder
final void appendSnippet(java.lang.StringBuilder, org.antlr.runtime.Token, org.antlr.runtime.Token, org.antlr.runtime.Token);
descriptor: (Ljava/lang/StringBuilder;Lorg/antlr/runtime/Token;Lorg/antlr/runtime/Token;Lorg/antlr/runtime/Token;)V
flags: (0x0010) ACC_FINAL
Code:
stack=5, locals=12, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: iconst_3
anewarray org.antlr.runtime.Token
dup
iconst_0
aload 2
aastore
dup
iconst_1
aload 3
aastore
dup
iconst_2
aload 4
aastore
invokestatic org.apache.cassandra.cql3.ErrorCollector.areTokensValid:([Lorg/antlr/runtime/Token;)Z
ifne 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.ErrorCollector.query:Ljava/lang/String;
ldc "\n"
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
astore 5
start local 5 3: aload 2
invokeinterface org.antlr.runtime.Token.getLine:()I
iconst_1
if_icmpne 4
aload 2
invokeinterface org.antlr.runtime.Token.getCharPositionInLine:()I
ifne 4
iconst_1
goto 5
StackMap locals: java.lang.String[]
StackMap stack:
4: iconst_0
StackMap locals:
StackMap stack: int
5: istore 6
start local 6 6: aload 3
invokeinterface org.antlr.runtime.Token.getLine:()I
aload 5
arraylength
if_icmpne 9
7: aload 3
invokestatic org.apache.cassandra.cql3.ErrorCollector.getLastCharPositionInLine:(Lorg/antlr/runtime/Token;)I
aload 5
aload 5
arraylength
iconst_1
isub
aaload
invokevirtual java.lang.String.length:()I
if_icmpne 9
8: iconst_1
goto 10
StackMap locals: int
StackMap stack:
9: iconst_0
StackMap locals:
StackMap stack: int
10: istore 7
start local 7 11: aload 1
ldc " ("
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
12: iload 6
ifne 14
13: aload 1
ldc "..."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
14: StackMap locals: int
StackMap stack:
aload 5
aload 3
invokestatic org.apache.cassandra.cql3.ErrorCollector.lineIndex:(Lorg/antlr/runtime/Token;)I
aaload
astore 8
start local 8 15: aload 3
invokestatic org.apache.cassandra.cql3.ErrorCollector.getLastCharPositionInLine:(Lorg/antlr/runtime/Token;)I
istore 9
start local 9 16: aload 5
aload 3
invokestatic org.apache.cassandra.cql3.ErrorCollector.lineIndex:(Lorg/antlr/runtime/Token;)I
iload 9
aload 8
invokevirtual java.lang.String.length:()I
if_icmplt 17
aload 8
goto 18
StackMap locals: org.apache.cassandra.cql3.ErrorCollector java.lang.StringBuilder org.antlr.runtime.Token org.antlr.runtime.Token org.antlr.runtime.Token java.lang.String[] int int java.lang.String int
StackMap stack: java.lang.String[] int
17: aload 8
iconst_0
iload 9
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
StackMap locals: org.apache.cassandra.cql3.ErrorCollector java.lang.StringBuilder org.antlr.runtime.Token org.antlr.runtime.Token org.antlr.runtime.Token java.lang.String[] int int java.lang.String int
StackMap stack: java.lang.String[] int java.lang.String
18: aastore
19: aload 5
aload 4
invokestatic org.apache.cassandra.cql3.ErrorCollector.lineIndex:(Lorg/antlr/runtime/Token;)I
aload 5
aload 4
invokestatic org.apache.cassandra.cql3.ErrorCollector.lineIndex:(Lorg/antlr/runtime/Token;)I
aaload
aload 4
invokestatic org.apache.cassandra.cql3.ErrorCollector.highlightToken:(Ljava/lang/String;Lorg/antlr/runtime/Token;)Ljava/lang/String;
aastore
20: aload 5
aload 2
invokestatic org.apache.cassandra.cql3.ErrorCollector.lineIndex:(Lorg/antlr/runtime/Token;)I
aload 5
aload 2
invokestatic org.apache.cassandra.cql3.ErrorCollector.lineIndex:(Lorg/antlr/runtime/Token;)I
aaload
aload 2
invokeinterface org.antlr.runtime.Token.getCharPositionInLine:()I
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
aastore
21: aload 2
invokestatic org.apache.cassandra.cql3.ErrorCollector.lineIndex:(Lorg/antlr/runtime/Token;)I
istore 10
start local 10 22: aload 3
invokestatic org.apache.cassandra.cql3.ErrorCollector.lineIndex:(Lorg/antlr/runtime/Token;)I
istore 11
start local 11 23: goto 26
24: StackMap locals: int int
StackMap stack:
aload 1
aload 5
iload 10
aaload
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
25: iinc 10 1
StackMap locals:
StackMap stack:
26: iload 10
iload 11
if_icmple 24
end local 11 end local 10 27: iload 7
ifne 29
28: aload 1
ldc "..."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
29: StackMap locals:
StackMap stack:
aload 1
ldc ")"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
30: return
end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 31 0 this Lorg/apache/cassandra/cql3/ErrorCollector;
0 31 1 builder Ljava/lang/StringBuilder;
0 31 2 from Lorg/antlr/runtime/Token;
0 31 3 to Lorg/antlr/runtime/Token;
0 31 4 offending Lorg/antlr/runtime/Token;
3 31 5 lines [Ljava/lang/String;
6 31 6 includeQueryStart Z
11 31 7 includeQueryEnd Z
15 31 8 toLine Ljava/lang/String;
16 31 9 toEnd I
22 27 10 i I
23 27 11 m I
MethodParameters:
Name Flags
builder
from
to
offending
private static boolean areTokensValid(org.antlr.runtime.Token[]);
descriptor: ([Lorg/antlr/runtime/Token;)Z
flags: (0x008a) ACC_PRIVATE, ACC_STATIC, ACC_VARARGS
Code:
stack=2, locals=5, args_size=1
start local 0 0: aload 0
dup
astore 4
arraylength
istore 3
iconst_0
istore 2
goto 5
StackMap locals: org.antlr.runtime.Token[] top int int org.antlr.runtime.Token[]
StackMap stack:
1: aload 4
iload 2
aaload
astore 1
start local 1 2: aload 1
invokestatic org.apache.cassandra.cql3.ErrorCollector.isTokenValid:(Lorg/antlr/runtime/Token;)Z
ifne 4
3: iconst_0
ireturn
end local 1 4: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
5: iload 2
iload 3
if_icmplt 1
6: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 tokens [Lorg/antlr/runtime/Token;
2 4 1 token Lorg/antlr/runtime/Token;
MethodParameters:
Name Flags
tokens
private static boolean isTokenValid(org.antlr.runtime.Token);
descriptor: (Lorg/antlr/runtime/Token;)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokeinterface org.antlr.runtime.Token.getLine:()I
ifle 1
aload 0
invokeinterface org.antlr.runtime.Token.getCharPositionInLine:()I
iflt 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 token Lorg/antlr/runtime/Token;
MethodParameters:
Name Flags
token
private static int getOffendingTokenIndex(int, int);
descriptor: (II)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: iload 0
iload 1
iconst_1
isub
invokestatic java.lang.Math.min:(II)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 index I
0 1 1 size I
MethodParameters:
Name Flags
index
size
private static java.lang.String highlightToken(java.lang.String, org.antlr.runtime.Token);
descriptor: (Ljava/lang/String;Lorg/antlr/runtime/Token;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic org.apache.cassandra.cql3.ErrorCollector.getLastCharPositionInLine:(Lorg/antlr/runtime/Token;)I
bipush 93
invokestatic org.apache.cassandra.cql3.ErrorCollector.insertChar:(Ljava/lang/String;IC)Ljava/lang/String;
astore 2
start local 2 1: aload 2
aload 1
invokeinterface org.antlr.runtime.Token.getCharPositionInLine:()I
bipush 91
invokestatic org.apache.cassandra.cql3.ErrorCollector.insertChar:(Ljava/lang/String;IC)Ljava/lang/String;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 line Ljava/lang/String;
0 2 1 token Lorg/antlr/runtime/Token;
1 2 2 newLine Ljava/lang/String;
MethodParameters:
Name Flags
line
token
private static int getLastCharPositionInLine(org.antlr.runtime.Token);
descriptor: (Lorg/antlr/runtime/Token;)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokeinterface org.antlr.runtime.Token.getCharPositionInLine:()I
aload 0
invokestatic org.apache.cassandra.cql3.ErrorCollector.getLength:(Lorg/antlr/runtime/Token;)I
iadd
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 token Lorg/antlr/runtime/Token;
MethodParameters:
Name Flags
token
private static int getLength(org.antlr.runtime.Token);
descriptor: (Lorg/antlr/runtime/Token;)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokeinterface org.antlr.runtime.Token.getText:()Ljava/lang/String;
invokevirtual java.lang.String.length:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 token Lorg/antlr/runtime/Token;
MethodParameters:
Name Flags
token
private static java.lang.String insertChar(java.lang.String, int, char);
descriptor: (Ljava/lang/String;IC)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
iconst_0
iload 1
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
1: iload 2
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
2: aload 0
iload 1
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
3: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
4: areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 s Ljava/lang/String;
0 5 1 index I
0 5 2 c C
MethodParameters:
Name Flags
s
index
c
private static int lineIndex(org.antlr.runtime.Token);
descriptor: (Lorg/antlr/runtime/Token;)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokeinterface org.antlr.runtime.Token.getLine:()I
iconst_1
isub
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 token Lorg/antlr/runtime/Token;
MethodParameters:
Name Flags
token
private static int getSnippetLastTokenIndex(int, int);
descriptor: (II)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: iload 1
iconst_1
isub
iload 0
iconst_2
iadd
invokestatic java.lang.Math.min:(II)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 index I
0 1 1 size I
MethodParameters:
Name Flags
index
size
private static int getSnippetFirstTokenIndex(int);
descriptor: (I)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: iconst_0
iload 0
bipush 10
isub
invokestatic java.lang.Math.max:(II)I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 index I
MethodParameters:
Name Flags
index
}
SourceFile: "ErrorCollector.java"