From d2fa9e00f878e289bf5edb43e811a7a15d3a0618 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Mon, 30 Oct 2017 18:08:40 +0100 Subject: [PATCH] Fix bug #60 --- src/de/dhbwstuttgart/bytecode/BytecodeGen.java | 2 +- .../parser/SyntaxTreeGenerator/TypeGenerator.java | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/de/dhbwstuttgart/bytecode/BytecodeGen.java b/src/de/dhbwstuttgart/bytecode/BytecodeGen.java index c21ee60b..425582ad 100644 --- a/src/de/dhbwstuttgart/bytecode/BytecodeGen.java +++ b/src/de/dhbwstuttgart/bytecode/BytecodeGen.java @@ -353,7 +353,7 @@ public class BytecodeGen implements ASTVisitor { @Override public void visit(ExpressionReceiver expressionReceiver) { // TODO Auto-generated method stub - + } } diff --git a/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/TypeGenerator.java b/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/TypeGenerator.java index ed0f06af..c60ae322 100644 --- a/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/TypeGenerator.java +++ b/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/TypeGenerator.java @@ -105,7 +105,16 @@ public class TypeGenerator { } public static RefTypeOrTPHOrWildcardOrGeneric convert(Java8Parser.ReferenceTypeContext referenceTypeContext, JavaClassRegistry reg, GenericsRegistry generics) { - return convertTypeName(referenceTypeContext.getText(), referenceTypeContext.getStart(), reg, generics); + if(referenceTypeContext.classOrInterfaceType() != null){ + if(referenceTypeContext.classOrInterfaceType().classType_lfno_classOrInterfaceType()!= null){ + Java8Parser.ClassType_lfno_classOrInterfaceTypeContext ctx = referenceTypeContext.classOrInterfaceType().classType_lfno_classOrInterfaceType(); + return convertTypeName(ctx.Identifier().toString(), ctx.typeArguments(),referenceTypeContext.getStart(), reg, generics); + }else{ + throw new NotImplementedException(); + } + }else{ + throw new NotImplementedException(); + } } public static RefTypeOrTPHOrWildcardOrGeneric convertTypeName(String name, Token offset, JavaClassRegistry reg, GenericsRegistry generics){