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

org.qbicc.plugin.layout.LayoutInfo Maven / Gradle / Ivy

There is a newer version: 0.77.0
Show newest version
package org.qbicc.plugin.layout;

import org.qbicc.type.CompoundType;
import org.qbicc.type.definition.element.FieldElement;

import java.util.BitSet;
import java.util.Collections;
import java.util.Map;

public final class LayoutInfo {
    private final BitSet allocated;
    private final CompoundType compoundType;
    private final Map fieldToMember;

    LayoutInfo(final BitSet allocated, final CompoundType compoundType, final Map fieldToMember) {
        this.allocated = allocated;
        this.compoundType = compoundType;
        this.fieldToMember = fieldToMember;
    }

    public BitSet getAllocatedBits() {
        return (BitSet) allocated.clone();
    }

    public CompoundType getCompoundType() {
        return compoundType;
    }

    public Map getFieldsMap() { return Collections.unmodifiableMap(fieldToMember); }

    public CompoundType.Member getMember(FieldElement element) {
        return fieldToMember.get(element);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy