Source:
public Type getType() { if (wrappedNode instanceof Parameter) { Parameter parameter = (Parameter) wrappedNode; if (getParentNode(wrappedNode) instanceof LambdaExpr) { int pos = getParamPos(parameter); Type lambdaType = JavaParserFacade.get(typeSolver).getType(getParentNode(wrappedNode)); throw new UnsupportedOperationException(wrappedNode.getClass().getCanonicalName()); } else { Type rawType = null; if (parameter.getType() instanceof com.github.javaparser.ast.type.PrimitiveType) { rawType = PrimitiveType.byName(((com.github.javaparser.ast.type.PrimitiveType) parameter.getType()).getType().name()); } else { rawType = JavaParserFacade.get(typeSolver).convertToUsage(parameter.getType(), wrappedNode); } if (parameter.isVarArgs()) { return new ArrayType(rawType); } else { return rawType; } } } else if (wrappedNode instanceof VariableDeclarator) { VariableDeclarator variableDeclarator = (VariableDeclarator) wrappedNode; if (getParentNode(wrappedNode) instanceof VariableDeclarationExpr) { VariableDeclarationExpr variableDeclarationExpr = (VariableDeclarationExpr) getParentNode(variableDeclarator); Type type = JavaParserFacade.get(typeSolver).convert(variableDeclarationExpr.getElementType(), JavaParserFactory.getContext(wrappedNode, typeSolver)); for (int i=0;i<variableDeclarationExpr.getArrayBracketPairsAfterElementType().size();i++) { type = new ArrayType(type); } return type; } else if (getParentNode(wrappedNode) instanceof FieldDeclaration) { FieldDeclaration fieldDeclaration = (FieldDeclaration) getParentNode(variableDeclarator); return JavaParserFacade.get(typeSolver).convert(fieldDeclaration.getElementType(), JavaParserFactory.getContext(wrappedNode, typeSolver)); } else { throw new UnsupportedOperationException(getParentNode(wrappedNode).getClass().getCanonicalName()); } } else { throw new UnsupportedOperationException(wrappedNode.getClass().getCanonicalName()); } }

Target:
public Type getType() { if (wrappedNode instanceof Parameter) { Parameter parameter = (Parameter) wrappedNode; if (getParentNode(wrappedNode) instanceof LambdaExpr) { int pos = getParamPos(parameter); Type lambdaType = JavaParserFacade.get(typeSolver).getType(getParentNode(wrappedNode)); throw new UnsupportedOperationException(wrappedNode.getClass().getCanonicalName()); } else { Type rawType = null; if (parameter.getType() instanceof com.github.javaparser.ast.type.PrimitiveType) { rawType = PrimitiveType.byName(((com.github.javaparser.ast.type.PrimitiveType) parameter.getType()).getType().name()); } else { rawType = JavaParserFacade.get(typeSolver).convertToUsage(parameter.getType(), wrappedNode); } if (parameter.isVarArgs()) { return new ArrayType(rawType); } else { return rawType; } } } else if (wrappedNode instanceof VariableDeclarator) { VariableDeclarator variableDeclarator = (VariableDeclarator) wrappedNode; if (getParentNode(wrappedNode) instanceof VariableDeclarationExpr) { Type type = JavaParserFacade.get(typeSolver).convert(variableDeclarator.getType(), JavaParserFactory.getContext(wrappedNode, typeSolver)); return type; } else if (getParentNode(wrappedNode) instanceof FieldDeclaration) { return JavaParserFacade.get(typeSolver).convert(variableDeclarator.getType(), JavaParserFactory.getContext(wrappedNode, typeSolver)); } else { throw new UnsupportedOperationException(getParentNode(wrappedNode).getClass().getCanonicalName()); } } else { throw new UnsupportedOperationException(wrappedNode.getClass().getCanonicalName()); } }