org.qbicc.plugin.layout.LayoutInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qbicc-plugin-layout Show documentation
Show all versions of qbicc-plugin-layout Show documentation
Support for object field layouts
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