Class AbstractColumn
- java.lang.Object
-
- com.github.skjolber.stcsv.databinder.AbstractColumn
-
- Direct Known Subclasses:
NoLineBreakQuotedColumn,PlainColumn,PlainFixedColumn,QuotedColumn
public abstract class AbstractColumn extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static intcurrentArrayIndexprotected static intcurrentOffsetIndexprotected intindexprotected Class<?>intermediateprotected static intintermediateIndexprotected Stringnameprotected static intobjectIndexprotected booleanoptionalprotected AbstractCsvMapper<?>parentprotected ValueProjectionprojectionprotected static intrangeIndexprotected static intstartIndexprotected booleantrimLeadingWhitespacesprotected booleantrimTrailingWhitespaces
-
Constructor Summary
Constructors Constructor Description AbstractColumn(String name, int index, boolean optional, boolean trimTrailingWhitespaces, boolean trimLeadingWhitespaces)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddoDecrementWhileAtWhitespace(org.objectweb.asm.MethodVisitor mv, int variableIndex)protected voiddoIncrementWhileNotEqualToDivider(org.objectweb.asm.MethodVisitor mv, int divider)intgetIndex()StringgetName()ValueProjectiongetProjection()protected org.objectweb.asm.LabelifAtChar(org.objectweb.asm.MethodVisitor mv, int character)protected org.objectweb.asm.LabelifLargerThanStart(org.objectweb.asm.MethodVisitor mv, int endIndex)protected org.objectweb.asm.LabelifNotAtChar(org.objectweb.asm.MethodVisitor mv, int character)protected abstract voidinline(org.objectweb.asm.MethodVisitor mv, String subClassInternalName, int divider, int increment, boolean fillable)Inline column handlingbooleanisBiConsumer()booleanisTriConsumer()protected org.objectweb.asm.LabeljumpToLabelForChar(org.objectweb.asm.MethodVisitor mv, int character, int code)voidlast(org.objectweb.asm.MethodVisitor mv, String subClassInternalName, boolean carriageReturn, boolean inline)voidmiddle(org.objectweb.asm.MethodVisitor mv, String subClassInternalName, boolean inline)protected voidsaveOffsetInRange(org.objectweb.asm.MethodVisitor mv)protected voidsaveOffsetInStart(org.objectweb.asm.MethodVisitor mv)voidsetParent(AbstractCsvMapper<?> parent)voidsetProjection(ValueProjection projection)protected voidthrowMappingException(org.objectweb.asm.MethodVisitor mv)protected voidtrimTrailingWhitespace(org.objectweb.asm.MethodVisitor mv, boolean inclusive)protected voidtrimWhitespace(org.objectweb.asm.MethodVisitor mv, String subClassInternalName, int index)protected voidwriteValue(org.objectweb.asm.MethodVisitor mv, String subClassInternalName, boolean inclusive)
-
-
-
Field Detail
-
name
protected final String name
-
index
protected final int index
-
optional
protected final boolean optional
-
trimTrailingWhitespaces
protected final boolean trimTrailingWhitespaces
-
trimLeadingWhitespaces
protected final boolean trimLeadingWhitespaces
-
parent
protected AbstractCsvMapper<?> parent
-
currentOffsetIndex
protected static final int currentOffsetIndex
- See Also:
- Constant Field Values
-
currentArrayIndex
protected static final int currentArrayIndex
- See Also:
- Constant Field Values
-
objectIndex
protected static final int objectIndex
- See Also:
- Constant Field Values
-
startIndex
protected static final int startIndex
- See Also:
- Constant Field Values
-
rangeIndex
protected static final int rangeIndex
- See Also:
- Constant Field Values
-
intermediateIndex
protected static final int intermediateIndex
- See Also:
- Constant Field Values
-
intermediate
protected Class<?> intermediate
-
projection
protected ValueProjection projection
-
-
Constructor Detail
-
AbstractColumn
public AbstractColumn(String name, int index, boolean optional, boolean trimTrailingWhitespaces, boolean trimLeadingWhitespaces)
-
-
Method Detail
-
middle
public void middle(org.objectweb.asm.MethodVisitor mv, String subClassInternalName, boolean inline)
-
last
public void last(org.objectweb.asm.MethodVisitor mv, String subClassInternalName, boolean carriageReturn, boolean inline)
-
inline
protected abstract void inline(org.objectweb.asm.MethodVisitor mv, String subClassInternalName, int divider, int increment, boolean fillable)Inline column handling- Parameters:
mv- method visitorsubClassInternalName- target parser classdivider- divider characterincrement- increment after last characterfillable- if true then a fill operation must be successful
-
getName
public String getName()
-
setParent
public void setParent(AbstractCsvMapper<?> parent)
-
getIndex
public int getIndex()
-
isBiConsumer
public boolean isBiConsumer()
-
isTriConsumer
public boolean isTriConsumer()
-
ifNotAtChar
protected org.objectweb.asm.Label ifNotAtChar(org.objectweb.asm.MethodVisitor mv, int character)
-
ifAtChar
protected org.objectweb.asm.Label ifAtChar(org.objectweb.asm.MethodVisitor mv, int character)
-
jumpToLabelForChar
protected org.objectweb.asm.Label jumpToLabelForChar(org.objectweb.asm.MethodVisitor mv, int character, int code)
-
throwMappingException
protected void throwMappingException(org.objectweb.asm.MethodVisitor mv)
-
doIncrementWhileNotEqualToDivider
protected void doIncrementWhileNotEqualToDivider(org.objectweb.asm.MethodVisitor mv, int divider)
-
doDecrementWhileAtWhitespace
protected void doDecrementWhileAtWhitespace(org.objectweb.asm.MethodVisitor mv, int variableIndex)
-
trimTrailingWhitespace
protected void trimTrailingWhitespace(org.objectweb.asm.MethodVisitor mv, boolean inclusive)
-
saveOffsetInStart
protected void saveOffsetInStart(org.objectweb.asm.MethodVisitor mv)
-
saveOffsetInRange
protected void saveOffsetInRange(org.objectweb.asm.MethodVisitor mv)
-
writeValue
protected void writeValue(org.objectweb.asm.MethodVisitor mv, String subClassInternalName, boolean inclusive)
-
ifLargerThanStart
protected org.objectweb.asm.Label ifLargerThanStart(org.objectweb.asm.MethodVisitor mv, int endIndex)
-
trimWhitespace
protected void trimWhitespace(org.objectweb.asm.MethodVisitor mv, String subClassInternalName, int index)
-
getProjection
public ValueProjection getProjection()
-
setProjection
public void setProjection(ValueProjection projection)
-
-