clementbera | 372c590 | 2019-05-22 09:52:35 +0200 | [diff] [blame] | 1 | // Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file |
| 2 | // for details. All rights reserved. Use of this source code is governed by a |
| 3 | // BSD-style license that can be found in the LICENSE file. |
| 4 | |
| 5 | package com.android.tools.r8.errors; |
| 6 | |
Ian Zerny | 587a90f | 2020-05-15 14:49:58 +0200 | [diff] [blame] | 7 | import com.android.tools.r8.Keep; |
clementbera | 372c590 | 2019-05-22 09:52:35 +0200 | [diff] [blame] | 8 | import com.android.tools.r8.origin.Origin; |
| 9 | import com.android.tools.r8.position.Position; |
| 10 | |
Ian Zerny | 587a90f | 2020-05-15 14:49:58 +0200 | [diff] [blame] | 11 | @Keep |
clementbera | 372c590 | 2019-05-22 09:52:35 +0200 | [diff] [blame] | 12 | public class NestDesugarDiagnostic implements DesugarDiagnostic { |
| 13 | |
| 14 | private final Origin origin; |
| 15 | private final Position position; |
| 16 | private final String message; |
| 17 | |
| 18 | public NestDesugarDiagnostic(Origin origin, Position position, String message) { |
| 19 | this.origin = origin; |
| 20 | this.position = position; |
| 21 | this.message = message; |
| 22 | } |
| 23 | |
| 24 | @Override |
| 25 | public Origin getOrigin() { |
| 26 | return origin; |
| 27 | } |
| 28 | |
| 29 | @Override |
| 30 | public Position getPosition() { |
| 31 | return position; |
| 32 | } |
| 33 | |
| 34 | @Override |
| 35 | public String getDiagnosticMessage() { |
| 36 | return message; |
| 37 | } |
| 38 | } |