/*
 * Copyright 2000-2005 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.psi.util;

import com.intellij.psi.*;

public class MethodSignatureHandMade extends MethodSignatureBase {
  private final String myName;
  MethodSignatureHandMade(String name, PsiParameterList parameterList, PsiTypeParameterList typeParameterList, PsiSubstitutor substitutor) {
    super(substitutor, parameterList, typeParameterList);
    myName = name;
  }

  MethodSignatureHandMade(String name, PsiType[] parameterTypes, PsiTypeParameter[] typeParameters, PsiSubstitutor substitutor) {
    super(substitutor, parameterTypes, typeParameters);
    myName = name;
  }


  public String getName() {
    return myName;
  }

  public boolean isRaw() {
    for (final PsiTypeParameter typeParameter : myTypeParameters) {
      if (getSubstitutor().substitute(typeParameter) == null) return true;
    }
    return false;
  }

  public boolean isInGenericContext() {
    return !isRaw();
  }

}

@@ -652,16 +652,58 @@
 j.psi.*;
+%0Aimport org.jetbrains.annotations.NotNull;
 %0A%0Apublic
@@ -812,32 +812,41 @@
 gnatureHandMade(
+@NotNull 
 String name, Psi
@@ -837,24 +837,33 @@
 String name,
+ @NotNull
  PsiParamete
@@ -878,24 +878,33 @@
 rameterList,
+ @NotNull
  PsiTypePara
@@ -931,16 +931,25 @@
 terList,
+ @NotNull
  PsiSubs
@@ -1079,16 +1079,25 @@
 andMade(
+@NotNull 
 String n
@@ -1100,16 +1100,25 @@
 ng name,
+ @NotNull
  PsiType
@@ -1135,16 +1135,25 @@
 erTypes,
+ @NotNull
  PsiType
@@ -1179,16 +1179,25 @@
 ameters,
+ @NotNull
  PsiSubs

ensure parameters are NotNull