com.github.bloodshura.ignitium.ntv.struct.ForeignStructField Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ignitium-native Show documentation
Show all versions of ignitium-native Show documentation
An API for working with native system APIs, with a higher-level interface.
The newest version!
package com.github.bloodshura.ignitium.ntv.struct;
import javax.annotation.Nonnull;
import java.util.function.Supplier;
public class ForeignStructField extends StructField {
private final Supplier generator;
public ForeignStructField(@Nonnull MappedStruct struct, int offset, int size, @Nonnull Supplier generator) {
super(struct, offset, size);
this.generator = generator;
}
@Nonnull
@Override
protected E read() {
E instance = generator.get();
instance.map(getStruct().getSource(), getOffset());
return instance;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy