Christoffer Quist Adamsen | 4887702 | 2021-02-15 14:30:31 +0100 | [diff] [blame] | 1 | // Copyright (c) 2021, 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.graph; |
| 6 | |
Christoffer Quist Adamsen | 306f0b3 | 2021-02-15 16:08:22 +0100 | [diff] [blame] | 7 | import com.android.tools.r8.references.ClassReference; |
Christoffer Quist Adamsen | 4887702 | 2021-02-15 14:30:31 +0100 | [diff] [blame] | 8 | import java.util.function.Consumer; |
| 9 | |
| 10 | public interface ClassDefinition extends Definition { |
| 11 | |
| 12 | Iterable<DexType> allImmediateSupertypes(); |
| 13 | |
| 14 | void forEachClassField(Consumer<? super DexClassAndField> consumer); |
| 15 | |
| 16 | void forEachClassMethod(Consumer<? super DexClassAndMethod> consumer); |
| 17 | |
| 18 | MethodCollection getMethodCollection(); |
| 19 | |
Christoffer Quist Adamsen | 306f0b3 | 2021-02-15 16:08:22 +0100 | [diff] [blame] | 20 | ClassReference getClassReference(); |
| 21 | |
Christoffer Quist Adamsen | 4887702 | 2021-02-15 14:30:31 +0100 | [diff] [blame] | 22 | DexType getType(); |
| 23 | |
Christoffer Quist Adamsen | 840e63d | 2021-03-04 15:27:10 +0100 | [diff] [blame] | 24 | boolean isInterface(); |
| 25 | |
Christoffer Quist Adamsen | 306f0b3 | 2021-02-15 16:08:22 +0100 | [diff] [blame] | 26 | @Override |
| 27 | default boolean isClass() { |
| 28 | return true; |
| 29 | } |
| 30 | |
Christoffer Quist Adamsen | 4887702 | 2021-02-15 14:30:31 +0100 | [diff] [blame] | 31 | boolean isClasspathClass(); |
| 32 | |
| 33 | DexClasspathClass asClasspathClass(); |
| 34 | |
| 35 | boolean isLibraryClass(); |
| 36 | |
| 37 | DexLibraryClass asLibraryClass(); |
Christoffer Quist Adamsen | 4887702 | 2021-02-15 14:30:31 +0100 | [diff] [blame] | 38 | } |