public static class EvaluationVisitor.VectorVariableHolder extends ClassGenerator.HoldingContainer
TODO: This is not especially elegant. But the code that declares the
holder/reader does not know about the parameter(s) that will use it,
and the normal
HoldingContainer can hold only one variable,
not a broader context. This version holds more context. Perhaps this
idea should be generalized.
|Constructor and Description|
|Modifier and Type||Method and Description|
Specialized hack for the UNION type to obtain a
f, getHolder, getIsSet, getMajorType, getMinorType, getValue, isConstant, isOptional, isReader, isRepeated, isSingularRepeated, setConstant, toString
public com.sun.codemodel.JVar generateUnionReader()
FieldReaderdirectly from the value vector, bypassing the
UnionHoldercreated from that vector. Handles setting the reader position only once in an eval block rather than on each reference. There may be multiple functions that need the reader. To ensure we create only one common reader, we "go back in time" to add the reader at the point after we declared the
Copyright © 1970 The Apache Software Foundation. All rights reserved.