blob: c55ad6fe0053d4f860b25b67b6b8b5a05a8925d4 [file] [log] [blame]
// Copyright (c) 2020, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.graph;
import com.android.tools.r8.origin.Origin;
public interface ProgramDefinition {
DexProgramClass getContextClass();
AccessFlags<?> getAccessFlags();
DexType getContextType();
DexDefinition getDefinition();
DexReference getReference();
Origin getOrigin();
default boolean isProgramClass() {
return false;
}
default DexProgramClass asProgramClass() {
return null;
}
default boolean isProgramField() {
return false;
}
default ProgramField asProgramField() {
return null;
}
default boolean isProgramMember() {
return false;
}
default ProgramMember<?, ?> asProgramMember() {
return null;
}
default boolean isProgramMethod() {
return false;
}
default ProgramMethod asProgramMethod() {
return null;
}
}