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

com.llamalad7.mixinextras.expression.impl.flow.ComputedFlowValue Maven / Gradle / Ivy

package com.llamalad7.mixinextras.expression.impl.flow;

import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AbstractInsnNode;

import java.util.function.Function;

public class ComputedFlowValue extends FlowValue {
    private final int size;
    private final Function computer;

    public ComputedFlowValue(int size, Function computer, AbstractInsnNode insn, FlowValue... parents) {
        super(null, insn, parents);
        this.size = size;
        this.computer = computer;
    }

    @Override
    public int getSize() {
        return size;
    }

    @Override
    public Type getType() {
        return computer.apply(parents);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy