Package org.codehaus.preon.annotation

Examples of org.codehaus.preon.annotation.BoundList.offset()


                // This means we need to keep on reading elements until we get
                // an 'EOF' or a DecodingException. In case of a
                // DecodingException, the pointer is expected to be moved back
                // to the first position.
                return (Codec<T>) new DynamicListCodec(codec);
            } else if (settings.offset().length() != 0) {
                // So the size is known. If the offset attribute has been set,
                // it means we can calculate the position of the individual
                // elements based on the index of that element.
                Expression<Integer, Resolver> size = getSizeExpression(
                        settings, context);
View Full Code Here


                Expression<Integer, Resolver> size = getSizeExpression(
                        settings, context);
                Expression<Integer, Resolver> offsets = null;
                CodecDescriptorHolder holder = new CodecDescriptorHolder();
                offsets = Expressions.createInteger(new IndexedResolverContext(
                        context, holder), settings.offset());
                Codec<T> result = (Codec<T>) new OffsetListCodec(offsets, size,
                        codec);
                // TODO:
                holder.setDescriptor(result.getCodecDescriptor());
                return result;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.