Class Args


  • public abstract class Args
    extends java.lang.Object
    Argument bundle class used in ModifyArgs callbacks. See the documentation for ModifyArgs for details. Synthetic subclasses are generated at runtime for specific injectors.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.Object[] values
      Argument values
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Args​(java.lang.Object[] values)
      Ctor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T get​(int index)
      Retrieve the argument value at the specified index
      abstract <T> void set​(int index, T value)
      Set (modify) the specified argument value.
      abstract void setAll​(java.lang.Object... values)
      Set (modify) all argument values.
      int size()
      Return the argument list size.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • values

        protected final java.lang.Object[] values
        Argument values
    • Constructor Detail

      • Args

        protected Args​(java.lang.Object[] values)
        Ctor.
        Parameters:
        values - argument values
    • Method Detail

      • size

        public int size()
        Return the argument list size.
        Returns:
        number of arguments available
      • get

        public <T> T get​(int index)
        Retrieve the argument value at the specified index
        Type Parameters:
        T - the argument type
        Parameters:
        index - argument index to retrieve
        Returns:
        the argument value
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if a value outside the range of available arguments is accessed
      • set

        public abstract <T> void set​(int index,
                                     T value)
        Set (modify) the specified argument value. Internal verification is performed upon supplied values and the following requirements are enforced:
        • Reference types must be assignable to the object type, or can be null.
        • Primitive types must match the target types exactly and cannot be null.
        Type Parameters:
        T - Argument type
        Parameters:
        index - Argument index to set
        value - Argument value
        Throws:
        ArgumentIndexOutOfBoundsException - if the specified argument index is outside the range of available arguments
      • setAll

        public abstract void setAll​(java.lang.Object... values)
        Set (modify) all argument values. The number and type of arguments supplied to this method must precisely match the argument types in the bundle. See set(int, Object) for details.
        Parameters:
        values - Argument values to set