コード例 #1
0
 /**
  * Gets the prototype of this method as either a {@code static} or instance method. In the case of
  * a {@code static} method, this is the same as the raw prototype. In the case of an instance
  * method, this has an appropriately-typed {@code this} argument as the first one.
  *
  * @param isStatic whether the method should be considered static
  * @return {@code non-null;} the method prototype
  */
 public final Prototype getPrototype(boolean isStatic) {
   if (isStatic) {
     return prototype;
   } else {
     if (instancePrototype == null) {
       Type thisType = getDefiningClass().getClassType();
       instancePrototype = prototype.withFirstParameter(thisType);
     }
     return instancePrototype;
   }
 }