开发者

How can I model a Array with Arrays in preon

开发者 https://www.devze.com 2023-04-02 21:07 出处:网络
I have a problem here with problem I tried several things I just can\'t get it to init probably. @TypePrefix(value = \"4\", size = 8)

I have a problem here with problem I tried several things I just can't get it to init probably.

@TypePrefix(value = "4", size = 8)
public class ArrayObject extends SerializedData {

    @BoundBuffer(match = {(byte) 0x00, (byte) 0x01})
    private byte[] magic;
    @BoundNumber(byteOrder = ByteOrder.BigEndian, size = "7")
    private byte value;
    @BoundNumber(byteOrder = ByteOrder.BigEndian, size = "1")
    private int signed;

    @BoundList(size = "value", types = {ArrayObject.class, ByteString.cl开发者_如何学编程ass, SingleByteInteger.class, FourByteInteger.class, KeyValueObject.class, VariableLengthFormat.class})
    private SerializedData[] elements;

    public SerializedData[] getElements() {
        return elements;
    }

}

My ArrayObject has List of SerializedData which can hold a ArrayObject (circular dependency). I tried using @LazyLoading but this doesn't help.

0

精彩评论

暂无评论...
验证码 换一张
取 消