Class Adapter.Array<T>

All Implemented Interfaces:
Adapter.ArrayProto<T[]>, SlotTester.Visible
Enclosing class:
Adapter<T,U>

public abstract static class Adapter.Array<T> extends Adapter.As<T,Void>
Abstract supertype of array adapters.

Instantiating an array adapter requires supplying an array contract and a compatible adapter for the element type, to be stored in the corresponding final fields here, which are declared with raw types. The several accessible constructors enforce the various compatible parameterizations for the two arguments.

  • Field Details

    • m_contract

      protected final Adapter.Contract.Array m_contract
      The Contract.Array that this array adapter will use, together with the supplied element-type adapter.

      Declared here as the raw type. The accessible constructors enforce the compatibility requirements between this and the supplied element adapter.

    • m_elementAdapter

      protected final Adapter m_elementAdapter
      The Adapter that this array adapter will use for the array's element type, together with the supplied contract.

      Declared here as the raw type. The accessible constructors enforce the compatibility requirements between this and the supplied contract.

  • Constructor Details

    • Array

      protected Array(Adapter.Contract.Array<T,E,Adapter.As<E,?>> using, Adapter.As<E,?> adapter, Type witness, Adapter.Configuration c)
      Constructor for a leaf array Adapter that is based on a Contract.Array and a reference-returning Adapter for the element type.
      Parameters:
      using - the array Contract that will be used to produce the value returned
      adapter - an Adapter producing a representation of the array's element type
      witness - if not null, the top type the resulting adapter will produce, if a Type object can specify that more precisely than the default typing rules.
      c - Configuration instance generated for this class
    • Array

      protected Array(Adapter.Contract.Array<T,Long,Adapter.AsLong<?>> using, Adapter.AsLong<?> adapter, Type witness, Adapter.Configuration c)
      Constructor for a leaf array Adapter that is based on a Contract.Array and a long-returning Adapter for the element type.
      Parameters:
      using - the array Contract that will be used to produce the value returned
      adapter - an Adapter producing a representation of the array's element type
      witness - if not null, the top type the resulting adapter will produce, if a Type object can specify that more precisely than the default typing rules.
      c - Configuration instance generated for this class
    • Array

      protected Array(Adapter.Contract.Array<T,Double,Adapter.AsDouble<?>> using, Adapter.AsDouble<?> adapter, Type witness, Adapter.Configuration c)
      Constructor for a leaf array Adapter that is based on a Contract.Array and a double-returning Adapter for the element type.
      Parameters:
      using - the array Contract that will be used to produce the value returned
      adapter - an Adapter producing a representation of the array's element type
      witness - if not null, the top type the resulting adapter will produce, if a Type object can specify that more precisely than the default typing rules.
      c - Configuration instance generated for this class
    • Array

      protected Array(Adapter.Contract.Array<T,Integer,Adapter.AsInt<?>> using, Adapter.AsInt<?> adapter, Type witness, Adapter.Configuration c)
      Constructor for a leaf array Adapter that is based on a Contract.Array and an int-returning Adapter for the element type.
      Parameters:
      using - the array Contract that will be used to produce the value returned
      adapter - an Adapter producing a representation of the array's element type
      witness - if not null, the top type the resulting adapter will produce, if a Type object can specify that more precisely than the default typing rules.
      c - Configuration instance generated for this class
    • Array

      protected Array(Adapter.Contract.Array<T,Float,Adapter.AsFloat<?>> using, Adapter.AsFloat<?> adapter, Type witness, Adapter.Configuration c)
      Constructor for a leaf array Adapter that is based on a Contract.Array and a float-returning Adapter for the element type.
      Parameters:
      using - the array Contract that will be used to produce the value returned
      adapter - an Adapter producing a representation of the array's element type
      witness - if not null, the top type the resulting adapter will produce, if a Type object can specify that more precisely than the default typing rules.
      c - Configuration instance generated for this class
    • Array

      protected Array(Adapter.Contract.Array<T,Short,Adapter.AsShort<?>> using, Adapter.AsShort<?> adapter, Type witness, Adapter.Configuration c)
      Constructor for a leaf array Adapter that is based on a Contract.Array and a short-returning Adapter for the element type.
      Parameters:
      using - the array Contract that will be used to produce the value returned
      adapter - an Adapter producing a representation of the array's element type
      witness - if not null, the top type the resulting adapter will produce, if a Type object can specify that more precisely than the default typing rules.
      c - Configuration instance generated for this class
    • Array

      protected Array(Adapter.Contract.Array<T,Character,Adapter.AsChar<?>> using, Adapter.AsChar<?> adapter, Type witness, Adapter.Configuration c)
      Constructor for a leaf array Adapter that is based on a Contract.Array and a char-returning Adapter for the element type.
      Parameters:
      using - the array Contract that will be used to produce the value returned
      adapter - an Adapter producing a representation of the array's element type
      witness - if not null, the top type the resulting adapter will produce, if a Type object can specify that more precisely than the default typing rules.
      c - Configuration instance generated for this class
    • Array

      protected Array(Adapter.Contract.Array<T,Byte,Adapter.AsByte<?>> using, Adapter.AsByte<?> adapter, Type witness, Adapter.Configuration c)
      Constructor for a leaf array Adapter that is based on a Contract.Array and a byte-returning Adapter for the element type.
      Parameters:
      using - the array Contract that will be used to produce the value returned
      adapter - an Adapter producing a representation of the array's element type
      witness - if not null, the top type the resulting adapter will produce, if a Type object can specify that more precisely than the default typing rules.
      c - Configuration instance generated for this class
    • Array

      protected Array(Adapter.Contract.Array<T,Boolean,Adapter.AsBoolean<?>> using, Adapter.AsBoolean<?> adapter, Type witness, Adapter.Configuration c)
      Constructor for a leaf array Adapter that is based on a Contract.Array and a boolean-returning Adapter for the element type.
      Parameters:
      using - the array Contract that will be used to produce the value returned
      adapter - an Adapter producing a representation of the array's element type
      witness - if not null, the top type the resulting adapter will produce, if a Type object can specify that more precisely than the default typing rules.
      c - Configuration instance generated for this class