public final void classOrInterfaceType(
boolean addImagNode
) throws RecognitionException, TokenStreamException {
returnAST = null;
ASTPair currentAST = new ASTPair();
AST classOrInterfaceType_AST = null;
Token i1 = null;
AST i1_AST = null;
Token d = null;
AST d_AST = null;
Token i2 = null;
AST i2_AST = null;
AST ta_AST = null;
Token first = LT(1);
i1 = LT(1);
i1_AST = astFactory.create(i1);
astFactory.makeASTRoot(currentAST, i1_AST);
match(IDENT);
{
if ((LA(1)==LT) && (_tokenSet_38.member(LA(2)))) {
typeArguments();
astFactory.addASTChild(currentAST, returnAST);
}
else if ((LA(1)==LT) && (LA(2)==GT)) {
typeArgumentsDiamond();
astFactory.addASTChild(currentAST, returnAST);
}
else if ((_tokenSet_40.member(LA(1)))) {
}
else {
throw new NoViableAltException(LT(1), getFilename());
}
}
{
_loop47:
do {
if ((LA(1)==DOT) && (LA(2)==IDENT)) {
d = LT(1);
d_AST = astFactory.create(d);
match(DOT);
i2 = LT(1);
i2_AST = astFactory.create(i2);
match(IDENT);
{
switch ( LA(1)) {
case LT:
{
typeArguments();
ta_AST = (AST)returnAST;
break;
}
case EOF:
case FINAL:
case ABSTRACT:
case UNUSED_GOTO:
case UNUSED_CONST:
case UNUSED_DO:
case STRICTFP:
case LITERAL_package:
case LITERAL_import:
case LITERAL_static:
case LITERAL_def:
case LBRACK:
case RBRACK:
case IDENT:
case STRING_LITERAL:
case DOT:
case LPAREN:
case LITERAL_class:
case LITERAL_interface:
case LITERAL_enum:
case AT:
case QUESTION:
case LITERAL_extends:
case LITERAL_super:
case GT:
case COMMA:
case SR:
case BSR:
case LITERAL_void:
case LITERAL_boolean:
case LITERAL_byte:
case LITERAL_char:
case LITERAL_short:
case LITERAL_int:
case LITERAL_float:
case LITERAL_long:
case LITERAL_double:
case LITERAL_as:
case LITERAL_private:
case LITERAL_public:
case LITERAL_protected:
case LITERAL_transient:
case LITERAL_native:
case LITERAL_threadsafe:
case LITERAL_synchronized:
case LITERAL_volatile:
case RPAREN:
case ASSIGN:
case BAND:
case LCURLY:
case RCURLY:
case SEMI:
case LITERAL_default:
case LITERAL_throws:
case LITERAL_implements:
case LITERAL_this:
case TRIPLE_DOT:
case CLOSABLE_BLOCK_OP:
case COLON:
case LITERAL_if:
case LITERAL_else:
case LITERAL_while:
case LITERAL_switch:
case LITERAL_for:
case LITERAL_in:
case LITERAL_return:
case LITERAL_break:
case LITERAL_continue:
case LITERAL_throw:
case LITERAL_assert:
case PLUS:
case MINUS:
case LITERAL_case:
case LITERAL_try:
case LITERAL_finally:
case LITERAL_catch:
case LITERAL_false:
case LITERAL_instanceof:
case LITERAL_new:
case LITERAL_null:
case LITERAL_true:
case PLUS_ASSIGN:
case MINUS_ASSIGN:
case STAR_ASSIGN:
case DIV_ASSIGN:
case MOD_ASSIGN:
case SR_ASSIGN:
case BSR_ASSIGN:
case SL_ASSIGN:
case BAND_ASSIGN:
case BXOR_ASSIGN:
case BOR_ASSIGN:
case STAR_STAR_ASSIGN:
case ELVIS_OPERATOR:
case LOR:
case LAND:
case BOR:
case BXOR:
case REGEX_FIND:
case REGEX_MATCH:
case NOT_EQUAL:
case EQUAL:
case IDENTICAL:
case NOT_IDENTICAL:
case COMPARE_TO:
case INC:
case DEC:
case BNOT:
case LNOT:
case STRING_CTOR_START:
case NUM_INT:
case NUM_FLOAT:
case NUM_LONG:
case NUM_DOUBLE:
case NUM_BIG_INT:
case NUM_BIG_DECIMAL:
case NLS:
{
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState.guessing==0 ) {
i1_AST = (AST)astFactory.make( (new ASTArray(4)).add(create(DOT,".",first,LT(1))).add(i1_AST).add(i2_AST).add(ta_AST));
}
}
else {
break _loop47;
}
} while (true);
}
if ( inputState.guessing==0 ) {
classOrInterfaceType_AST = (AST)currentAST.root;
classOrInterfaceType_AST = i1_AST;
if ( addImagNode ) {
classOrInterfaceType_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(classOrInterfaceType_AST));
}
currentAST.root = classOrInterfaceType_AST;
currentAST.child = classOrInterfaceType_AST!=null &&classOrInterfaceType_AST.getFirstChild()!=null ?
classOrInterfaceType_AST.getFirstChild() : classOrInterfaceType_AST;
currentAST.advanceChildToEnd();
}
classOrInterfaceType_AST = (AST)currentAST.root;
returnAST = classOrInterfaceType_AST;
}