blob: 200d3647641e69ae692a5a52f43c2d35faf432c0 [file] [log] [blame]
// Copyright (c) 2022, 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.experimental.startup.profile;
import com.android.tools.r8.graph.DexReference;
import com.android.tools.r8.profile.AbstractProfileRule;
import com.android.tools.r8.utils.ThrowingConsumer;
import java.io.IOException;
import java.util.function.Function;
public abstract class StartupProfileRule
implements AbstractProfileRule, Comparable<StartupProfileRule> {
public abstract <E1 extends Exception, E2 extends Exception> void accept(
ThrowingConsumer<StartupProfileClassRule, E1> classConsumer,
ThrowingConsumer<StartupProfileMethodRule, E2> methodConsumer)
throws E1, E2;
public abstract <T> T apply(
Function<StartupProfileClassRule, T> classFunction,
Function<StartupProfileMethodRule, T> methodFunction);
@Override
public final int compareTo(StartupProfileRule rule) {
return getReference().compareTo(rule.getReference());
}
public abstract DexReference getReference();
public abstract void write(Appendable appendable) throws IOException;
}