如何在preon中使用数组建模数组

时间:2011-09-07 09:06:22

标签: java preon

我在这里遇到问题我尝试了几件事情,我可能无法将它初始化为初始化。

@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.class, SingleByteInteger.class, FourByteInteger.class, KeyValueObject.class, VariableLengthFormat.class})
    private SerializedData[] elements;

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

}

My ArrayObject具有Seri​​alizedData列表,可以容纳ArrayObject(循环依赖)。我尝试使用@LazyLoading,但这没有帮助。

0 个答案:

没有答案