blob: a1767c393f0c8a7cbc7a74fa7981105fee996094 [file] [log] [blame]
// Copyright (c) 2016, 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;
public abstract class DexMember<D extends DexEncodedMember<D, R>, R extends DexMember<D, R>>
extends DexReference implements PresortedComparable<R> {
public final DexType holder;
public final DexString name;
public DexMember(DexType holder, DexString name) {
assert holder != null;
this.holder = holder;
assert name != null;
this.name = name;
}
public abstract DexEncodedMember<?, ?> lookupOnClass(DexClass clazz);
public abstract ProgramMember<?, ?> lookupOnProgramClass(DexProgramClass clazz);
public abstract boolean match(R entry);
public abstract boolean match(D entry);
@Override
public boolean isDexMember() {
return true;
}
@Override
public DexMember<D, R> asDexMember() {
return this;
}
}