Class SignatureBuilder.ParameterTable

All Implemented Interfaces:
Serializable, Cloneable, Iterable<SignatureBuilder.ParameterList>, Collection<SignatureBuilder.ParameterList>, List<SignatureBuilder.ParameterList>, RandomAccess, SequencedCollection<SignatureBuilder.ParameterList>
Enclosing class:
SignatureBuilder

private static class SignatureBuilder.ParameterTable extends ArrayList<SignatureBuilder.ParameterList>
The ParameterTable is used to build a table of parameters to represent a constructor. Each column of parameters mirrors the index of the parameter in the constructor with each parameter containing its type and the annotation it uses.
  • Constructor Details

    • ParameterTable

      public ParameterTable()
      Constructor for the ParameterTable object. This creates a table of parameters that can be used to represent each permutation of parameter and annotation pairs.
  • Method Details

    • height

      private int height()
      This represents the number of parameters for each index in the table. This is determined from the first column within the table, if the table is empty this returns zero.
      Returns:
      the height of the table using the first column
    • width

      private int width()
      This is used to determine the width of this table. The width is the number of columns the table contains. Each column in represents a parameter at its index in the constructor.
      Returns:
      this returns the width of the table
    • insert

      public void insert(Parameter value, int column)
      This will add a a parameter at the specified column in the table. The parameter is typically added to the table at an index mirroring the index it appears within the constructor.
      Parameters:
      value - this is the parameter to be added in the table
      column - this is the index to added the parameter to
    • get

      public SignatureBuilder.ParameterList get(int column)
      This is used to acquire the column of parameters from the table. If no column exists at the specified index then one is created and added to the table at the column index.
      Specified by:
      get in interface List<SignatureBuilder.ParameterList>
      Overrides:
      get in class ArrayList<SignatureBuilder.ParameterList>
      Parameters:
      column - this is the column to acquire from the table
      Returns:
      the column of parameters from the table
    • get

      public Parameter get(int column, int row)
      This is used to get a Parameter at the row and column specified. This if the parameter does not exist the an index out of bounds exception is thrown.
      Parameters:
      column - the column to acquire the parameter for
      row - the row to acquire the parameter for
      Returns:
      this returns the parameter at the specified cell