Link Here
|
47 |
// Options |
47 |
// Options |
48 |
public boolean checkDocComment = false; |
48 |
public boolean checkDocComment = false; |
49 |
public boolean reportProblems; |
49 |
public boolean reportProblems; |
50 |
protected long sourceLevel; |
50 |
protected long complianceLevel; |
51 |
|
51 |
|
52 |
// Results |
52 |
// Results |
53 |
protected long inheritedPositions; |
53 |
protected long inheritedPositions; |
Link Here
|
82 |
protected long[] identifierPositionStack; |
82 |
protected long[] identifierPositionStack; |
83 |
|
83 |
|
84 |
// Ast stack |
84 |
// Ast stack |
85 |
protected static int AstStackIncrement = 10; |
85 |
protected final static int AST_STACK_INCREMENT = 10; |
86 |
protected int astPtr; |
86 |
protected int astPtr; |
87 |
protected Object[] astStack; |
87 |
protected Object[] astStack; |
88 |
protected int astLengthPtr; |
88 |
protected int astLengthPtr; |
Link Here
|
99 |
this.reportProblems = sourceParser != null; |
99 |
this.reportProblems = sourceParser != null; |
100 |
if (sourceParser != null) { |
100 |
if (sourceParser != null) { |
101 |
this.checkDocComment = this.sourceParser.options.docCommentSupport; |
101 |
this.checkDocComment = this.sourceParser.options.docCommentSupport; |
102 |
this.sourceLevel = this.sourceParser.options.sourceLevel; |
102 |
this.complianceLevel = this.sourceParser.options.complianceLevel; |
103 |
} |
103 |
} |
104 |
} |
104 |
} |
105 |
|
105 |
|
Link Here
|
710 |
boolean hasMultiLines = this.scanner.currentPosition > (this.lineEnd+1); |
710 |
boolean hasMultiLines = this.scanner.currentPosition > (this.lineEnd+1); |
711 |
boolean isTypeParam = false; |
711 |
boolean isTypeParam = false; |
712 |
boolean valid = true, empty = true; |
712 |
boolean valid = true, empty = true; |
713 |
boolean mayBeGeneric = this.sourceLevel >= ClassFileConstants.JDK1_5; |
713 |
boolean mayBeGeneric = this.complianceLevel >= ClassFileConstants.JDK1_5; |
714 |
int token = -1; |
714 |
int token = -1; |
715 |
nextToken: while (true) { |
715 |
nextToken: while (true) { |
716 |
this.currentTokenType = -1; |
716 |
this.currentTokenType = -1; |
Link Here
|
1225 |
if (++this.astPtr >= stackLength) { |
1225 |
if (++this.astPtr >= stackLength) { |
1226 |
System.arraycopy( |
1226 |
System.arraycopy( |
1227 |
this.astStack, 0, |
1227 |
this.astStack, 0, |
1228 |
this.astStack = new Object[stackLength + AstStackIncrement], 0, |
1228 |
this.astStack = new Object[stackLength + AST_STACK_INCREMENT], 0, |
1229 |
stackLength); |
1229 |
stackLength); |
1230 |
this.astPtr = stackLength; |
1230 |
this.astPtr = stackLength; |
1231 |
} |
1231 |
} |
Link Here
|
1236 |
if (++this.astLengthPtr >= stackLength) { |
1236 |
if (++this.astLengthPtr >= stackLength) { |
1237 |
System.arraycopy( |
1237 |
System.arraycopy( |
1238 |
this.astLengthStack, 0, |
1238 |
this.astLengthStack, 0, |
1239 |
this.astLengthStack = new int[stackLength + AstStackIncrement], 0, |
1239 |
this.astLengthStack = new int[stackLength + AST_STACK_INCREMENT], 0, |
1240 |
stackLength); |
1240 |
stackLength); |
1241 |
} |
1241 |
} |
1242 |
this.astLengthStack[this.astLengthPtr] = 1; |
1242 |
this.astLengthStack[this.astLengthPtr] = 1; |