@NotNull
authorDaniil Ovchinnikov <daniil.ovchinnikov@jetbrains.com>
Thu, 20 Oct 2016 19:37:31 +0000 (22:37 +0300)
committerDaniil Ovchinnikov <daniil.ovchinnikov@jetbrains.com>
Fri, 21 Oct 2016 19:14:15 +0000 (22:14 +0300)
java/java-psi-api/src/com/intellij/patterns/PsiMethodPattern.java
java/java-psi-api/src/com/intellij/patterns/PsiNameValuePairPattern.java
platform/core-api/src/com/intellij/patterns/TreeElementPattern.java

index d4f60967aff4ce5cb71dfd02756c5298f0291a9d..cd62b8a3478d6c5029581d46e019b08b88f78fa3 100644 (file)
@@ -95,10 +95,12 @@ public class PsiMethodPattern extends PsiMemberPattern<PsiMethod,PsiMethodPatter
     });
   }
 
+  @NotNull
   public PsiMethodPattern definedInClass(@NonNls final String qname) {
     return definedInClass(PsiJavaPatterns.psiClass().withQualifiedName(qname));
   }
 
+  @NotNull
   public PsiMethodPattern definedInClass(final ElementPattern<? extends PsiClass> pattern) {
     return with(new PatternConditionPlus<PsiMethod, PsiClass>("definedInClass", pattern) {
 
index 3943aafbf211f23d14a7e8ce9d7fe9191a9fe0db..1ab272297bf8ef30c282172a85abb7127e24f593 100644 (file)
@@ -32,6 +32,7 @@ public class PsiNameValuePairPattern extends PsiElementPattern<PsiNameValuePair,
     super(PsiNameValuePair.class);
   }
 
+  @NotNull
   public PsiNameValuePairPattern withName(@NotNull @NonNls final String requiredName) {
     return with(new PatternCondition<PsiNameValuePair>("withName") {
       public boolean accepts(@NotNull final PsiNameValuePair psiNameValuePair, final ProcessingContext context) {
@@ -41,6 +42,7 @@ public class PsiNameValuePairPattern extends PsiElementPattern<PsiNameValuePair,
     });
   }
 
+  @NotNull
   @Override
   public PsiNameValuePairPattern withName(@NotNull final ElementPattern<String> name) {
     return with(new PsiNamePatternCondition<PsiNameValuePair>("withName", name) {
index 77f5d1d8a538c703025b0950bfeb7bae465ec590..4c29e06abf9726b4c68731e2e534f55bcc4c95ee 100644 (file)
@@ -61,6 +61,7 @@ public abstract class TreeElementPattern<ParentType, T extends ParentType, Self
     return withParent(StandardPatterns.instanceOf(type));
   }
 
+  @NotNull
   public Self withParent(@NotNull final ElementPattern<? extends ParentType> pattern) {
     return withSuperParent(1, pattern);
   }