protected int computeElemSize(Object container, Object[] objectValue, FSTClazzInfo.FSTFieldInfo fi) { if ( container instanceof FSTArrayElementSizeCalculator) { int res = ((FSTArrayElementSizeCalculator) container).getElementSize(fi.getField(),this); if ( res >= 0 ) return res; } Templated annotation = fi.getField().getAnnotation(Templated.class); if ( annotation != null ) { Object template = objectValue[0]; return align(calcStructSize((FSTStruct) template),SIZE_ALIGN); } int elemSiz = 0; for (int j = 0; j < objectValue.length; j++) { Object o = objectValue[j]; if ( o != null ) elemSiz=Math.max( elemSiz, calcStructSize((FSTStruct) o) ); } return align(elemSiz,SIZE_ALIGN); }
boolean hasClzId = false; if ( onHeapStruct instanceof FSTArrayElementSizeCalculator ) { Class elemClz = ((FSTArrayElementSizeCalculator)onHeapStruct).getElementType(en.fi.getField(),this); if ( elemClz != null ) { int clid = getClzId(elemClz);
boolean hasClzId = false; if ( onHeapStruct instanceof FSTArrayElementSizeCalculator ) { Class elemClz = ((FSTArrayElementSizeCalculator)onHeapStruct).getElementType(en.fi.getField(),this); if ( elemClz != null ) { int clid = getClzId(elemClz);
protected int computeElemSize(Object container, Object[] objectValue, FSTClazzInfo.FSTFieldInfo fi) { if ( container instanceof FSTArrayElementSizeCalculator) { int res = ((FSTArrayElementSizeCalculator) container).getElementSize(fi.getField(),this); if ( res >= 0 ) return res; } Templated annotation = fi.getField().getAnnotation(Templated.class); if ( annotation != null ) { Object template = objectValue[0]; return align(calcStructSize((FSTStruct) template),SIZE_ALIGN); } int elemSiz = 0; for (int j = 0; j < objectValue.length; j++) { Object o = objectValue[j]; if ( o != null ) elemSiz=Math.max( elemSiz, calcStructSize((FSTStruct) o) ); } return align(elemSiz,SIZE_ALIGN); }