src/java.base/share/classes/java/lang/invoke/MethodHandle.java
changeset 53563 a4b7ea85d668
parent 52914 4fa75d8ad418
child 54206 003cc64366da
equal deleted inserted replaced
53559:1ae0b76bb5df 53563:a4b7ea85d668
     1 /*
     1 /*
     2  * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
  1081       * if (makeVarargs == isVarargsCollector())
  1081       * if (makeVarargs == isVarargsCollector())
  1082       *   return this;
  1082       *   return this;
  1083       * else if (makeVarargs)
  1083       * else if (makeVarargs)
  1084       *   return asVarargsCollector(type().lastParameterType());
  1084       *   return asVarargsCollector(type().lastParameterType());
  1085       * else
  1085       * else
  1086       *   return return asFixedArity();
  1086       *   return asFixedArity();
  1087       * }</pre></blockquote>
  1087       * }</pre></blockquote>
  1088       * @param makeVarargs true if the return method handle should have variable arity behavior
  1088       * @param makeVarargs true if the return method handle should have variable arity behavior
  1089       * @return a method handle of the same type, with possibly adjusted variable arity behavior
  1089       * @return a method handle of the same type, with possibly adjusted variable arity behavior
  1090       * @throws IllegalArgumentException if {@code makeVarargs} is true and
  1090       * @throws IllegalArgumentException if {@code makeVarargs} is true and
  1091       *         this method handle does not have a trailing array parameter
  1091       *         this method handle does not have a trailing array parameter