super(adapters);
}
@Override
public PrimitiveType adapt(PrimitiveTypeContext context) {
PrimitiveType primitiveType = createNode(context);
TerminalNode node = getChild(context, TerminalNode.class);
if (node != null) {
switch (node.getSymbol().getType()) {
case JavaParser.BOOLEAN:
primitiveType.setType(Type.BOOLEAN);
break;
case JavaParser.BYTE:
primitiveType.setType(Type.BYTE);
break;
case JavaParser.CHAR:
primitiveType.setType(Type.CHAR);
break;
case JavaParser.DOUBLE:
primitiveType.setType(Type.DOUBLE);
break;
case JavaParser.FLOAT:
primitiveType.setType(Type.FLOAT);
break;
case JavaParser.INT:
primitiveType.setType(Type.INT);
break;
case JavaParser.LONG:
primitiveType.setType(Type.LONG);
break;
case JavaParser.SHORT:
primitiveType.setType(Type.SHORT);
break;
default:
}
}
return primitiveType;