Class CompositeConverter

java.lang.Object
org.asnlab.asndt.runtime.conv.AsnConverter
org.asnlab.asndt.runtime.conv.CompositeConverter
Direct Known Subclasses:
AbstractCompositeConverter, ChoiceValue.ChoiceValueConverter.ChoiceValueConverterConverter, CompositeConverter.CompositeConverterConverter, CompositeValue.CompositeValueConverter, EnumeratedValue.EnumeratedValueConverter

public abstract class CompositeConverter extends AsnConverter
The CompositeConverter can convert composite value. This class is intent to be extended.
  • Field Details

    • componentConverters

      protected AsnConverter[] componentConverters
      The component converters
  • Constructor Details

    • CompositeConverter

      public CompositeConverter()
    • CompositeConverter

      public CompositeConverter(AsnConverter[] componentConverters)
  • Method Details

    • setComponentConverters

      public void setComponentConverters(AsnConverter[] componentConverters)
      Sets this CompositeConverter's component converters
      Parameters:
      componentConverters - The component converters
    • getComponentsSize

      public int getComponentsSize()
    • getComponentConverter

      public AsnConverter getComponentConverter(int index)
      Returns this CompositeConverter's component converters.
      Parameters:
      index - The index of component
      Returns:
      The component converters of this CompositeConverter
    • createObject

      public abstract Object createObject()
      Create an empty composite value object.
      Returns:
      The new composite value object
    • getComponentObject

      public abstract Object getComponentObject(Object object, int index)
      Given the composite value object, and the component index, return the component value object.
      Parameters:
      object - The composite value object
      index - The component index
      Returns:
      The component value object
    • setComponentObject

      public abstract void setComponentObject(Object object, int index, Object componentObject)
      Set the component value object of the composite value object
      Parameters:
      object - The composite value object
      index - The component index
      componentObject - The component value object