org.qbicc.main.ElementReachableAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qbicc-main Show documentation
Show all versions of qbicc-main Show documentation
The main entry point for Qbicc
package org.qbicc.main;
import java.util.function.Consumer;
import org.qbicc.context.CompilationContext;
import org.qbicc.facts.Condition;
import org.qbicc.facts.Facts;
import org.qbicc.facts.core.ExecutableReachabilityFacts;
import org.qbicc.type.definition.element.ExecutableElement;
/**
*
*/
final class ElementReachableAdapter implements Consumer {
private final Consumer handler;
ElementReachableAdapter(final Consumer handler) {
this.handler = handler;
}
@Override
public void accept(CompilationContext context) {
Facts.get(context).registerAction(Condition.when(ExecutableReachabilityFacts.IS_INVOKED), handler);
}
}