public static Type [ ] postpendToArray ( Type [ ] types , Type newType ) { if ( types . length == Integer . MAX_VALUE ) { throw new Error ( "array " + types + " is too large to extend" ) ; } Type [ ] newTypes = new Type [ types . length + 1 ] ; System . arraycopy ( types , 0 , newTypes , 0 , types . length ) ; newTypes [ types . length ] = newType ; return newTypes ; }
Returns a copy of the given type array with newType added to the end .