All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.qbicc.main.ElementReachableAdapter Maven / Gradle / Ivy

There is a newer version: 0.77.0
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy