public PsiTypePattern classType(final ElementPattern<? extends PsiClass> pattern) {
    return with(new PatternCondition<PsiType>("classType") {
      @Override
      public boolean accepts(@NotNull final PsiType psiType, final ProcessingContext context) {
        return psiType instanceof PsiClassType &&
               pattern.accepts(((PsiClassType)psiType).resolve(), context);
      }
    });
  }
public PsiTypePattern classType(final ElementPattern<? extends PsiClass> pattern)