Class GosuArrayClass

    • Constructor Detail

      • GosuArrayClass

        public GosuArrayClass​(IType componentType,
                              ITypeLoader typeLoader)
    • Method Detail

      • getDims

        private int[] getDims​(java.lang.Integer depth,
                              int iLength)
      • getArrayComponent

        public java.lang.Object getArrayComponent​(java.lang.Object array,
                                                  int iIndex)
                                           throws java.lang.IllegalArgumentException,
                                                  java.lang.ArrayIndexOutOfBoundsException
        Description copied from interface: IType
        Returns the value of the indexed component in the specified array object.
        Specified by:
        getArrayComponent in interface IType
        Overrides:
        getArrayComponent in class DefaultArrayType
        Parameters:
        array - An array instance of this intrinsic type.
        iIndex - The index of the component to get.
        Returns:
        The value of the indexed component in the specified array.
        Throws:
        java.lang.IllegalArgumentException - If the specified object is not an array.
        java.lang.ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
      • setArrayComponent

        public void setArrayComponent​(java.lang.Object array,
                                      int iIndex,
                                      java.lang.Object value)
                               throws java.lang.IllegalArgumentException,
                                      java.lang.ArrayIndexOutOfBoundsException
        Description copied from interface: IType
        Sets the value of the indexed component in the specified array object.
        Specified by:
        setArrayComponent in interface IType
        Overrides:
        setArrayComponent in class DefaultArrayType
        Parameters:
        array - An array instance of this intrinsic type.
        iIndex - The index of the component to set.
        value - The new value of the indexed component.
        Throws:
        java.lang.IllegalArgumentException - If the specified object is not an array.
        java.lang.ArrayIndexOutOfBoundsException - If the specified index argument is negative, or if it is greater than or equal to the length of the specified array
      • getArrayLength

        public int getArrayLength​(java.lang.Object array)
                           throws java.lang.IllegalArgumentException
        Description copied from interface: IType
        Returns the length of the specified array object.
        Specified by:
        getArrayLength in interface IType
        Overrides:
        getArrayLength in class DefaultArrayType
        Parameters:
        array - An array instance of this intrinsic type.
        Returns:
        The length of the array.
        Throws:
        java.lang.IllegalArgumentException - If the object argument is not an array.
      • hasGosuClassAtRoot

        public boolean hasGosuClassAtRoot​(IType component)
      • getGosuClassDepthPair

        private Pair<java.lang.Integer,​java.lang.Class> getGosuClassDepthPair​(IType component,
                                                                                    int depth)