Removed unnecessary casts, added type arguments
@@ -73,12 +73,12 @@ public class ParseGen extends CodeGenerator implements JavaCCParserConstants {
genCodeLine("/* " + getIdString(tn, cu_name + ".java") + " */");
boolean implementsExists = false;
- final boolean extendsExists = false;
+ //final boolean extendsExists = false;
if (cu_to_insertion_point_1.size() != 0) {
Object firstToken = cu_to_insertion_point_1.get(0);
printTokenSetup((Token) firstToken);
- ccol = 1;
+ this.ccol = 1;
for (final Iterator<Token> it = cu_to_insertion_point_1.iterator(); it.hasNext();) {
t = it.next();
if (t.kind == IMPLEMENTS) {
@@ -98,7 +98,7 @@ public class ParseGen extends CodeGenerator implements JavaCCParserConstants {
}
genCode(cu_name + "Constants ");
if (cu_to_insertion_point_2.size() != 0) {
- printTokenSetup((Token) (cu_to_insertion_point_2.get(0)));
+ printTokenSetup((cu_to_insertion_point_2.get(0)));
for (final Iterator<Token> it = cu_to_insertion_point_2.iterator(); it.hasNext();) {
printToken(it.next());
}
@@ -164,7 +164,7 @@ public class ParseGen extends CodeGenerator implements JavaCCParserConstants {
for (int i = 0; i < tokenMaskSize; i++) {
genCodeLine(" private static void jj_la1_init_" + i + "() {");
genCode(" jj_la1_" + i + " = new int[] {");
- for (final Iterator it = maskVals.iterator(); it.hasNext();) {
+ for (final Iterator<?> it = maskVals.iterator(); it.hasNext();) {
final int[] tokenMask = (int[]) (it.next());
genCode("0x" + Integer.toHexString(tokenMask[i]) + ",");
}
@@ -964,9 +964,9 @@ public class ParseGen extends CodeGenerator implements JavaCCParserConstants {
}
if (cu_from_insertion_point_2.size() != 0) {
- printTokenSetup((Token) (cu_from_insertion_point_2.get(0)));
- ccol = 1;
- for (final Iterator it = cu_from_insertion_point_2.iterator(); it.hasNext();) {
+ printTokenSetup((cu_from_insertion_point_2.get(0)));
+ this.ccol = 1;
+ for (final Iterator<?> it = cu_from_insertion_point_2.iterator(); it.hasNext();) {
t = (Token) it.next();
printToken(t);
}
