Package com.intellij.psi

Examples of com.intellij.psi.PsiType


        return false;
      }
      final PsiParameter[] parameters = parameterList.getParameters();
      for (int i = 0; i < parameters.length; i++) {
        final PsiParameter parameter = parameters[i];
        final PsiType type = parameter.getType();
        final PsiType parameterType = parameterTypes.get(i);
        if (PsiType.NULL.equals(parameterType)) {
          continue;
        }
        if (parameterType != null &&
            !typesAreEquivalent(type,
                parameterType)) {
          return false;
        }
      }
    }
    if (returnType != null) {
      final PsiType methodReturnType = method.getReturnType();
      if (!typesAreEquivalent(returnType,
          methodReturnType)) {
        return false;
      }
    }
View Full Code Here


        return false;
      }
      final PsiParameter[] methodParameters = methodParameterList.getParameters();
      final PsiParameter[] otherParameters = parameterList.getParameters();
      for (int i = 0; i < methodParameters.length; i++) {
        final PsiType type = methodParameters[i].getType();
        final PsiType parameterType = otherParameters[i].getType();
        if (PsiType.NULL.equals(parameterType)) {
          continue;
        }
        if (!typesAreEquivalent(type,
            parameterType)) {
          return false;
        }
      }
    }
    if (returnType != null) {
      final PsiType methodReturnType = method.getReturnType();
      if (!typesAreEquivalent(returnType,
          methodReturnType)) {
        return false;
      }
    }
View Full Code Here

    PsiParameter[] firstMethodParameterListParameters = firstMethodParameterList.getParameters();
    PsiParameter[] secondMethodParameterListParameters = secondMethodParameterList.getParameters();
    PsiSubstitutor firstSubstitutor = firstPair.getSecond();
    PsiSubstitutor secondSubstitutor = secondPair.getSecond();
    for (int i = 0; i < firstMethodParameterListParameters.length; i++) {
      PsiType firstMethodParameterListParameterType = firstSubstitutor.substitute(firstMethodParameterListParameters[i].getType());
      PsiType secondMethodParameterListParameterType = secondSubstitutor.substitute(secondMethodParameterListParameters[i].getType());
      if (PsiType.NULL.equals(firstMethodParameterListParameterType)) {
        continue;
      }
      if (!typesAreEquivalent(firstMethodParameterListParameterType, secondMethodParameterListParameterType)) {
        return false;
View Full Code Here

    if (beanProperties == null || beanProperties.isEmpty()) {
      return null;
    }

    final BeanProperty property = beanProperties.get(beanProperties.size() - 1);
    final PsiType type = property.getPropertyType();
    return ParamValueConvertersRegistry.getInstance().getConverter(domElement, type);
  }
View Full Code Here

      case SELF:
        assertEquals(expression.getNavigationElement(), resolveElement);
        break;
      case TYPE:
        final String expectedType = (String)expectedResolveTarget;
        final PsiType type = getJavaFacade().getElementFactory().createTypeFromText(expectedType, expression);
        assertNotNull(type);
        assertEquals(expectedType, type.getCanonicalText());
        break;
    }
  }
View Full Code Here

  private void runBigIntegerLiteral(@Language(value = OgnlLanguage.ID,
                                              prefix = OgnlLanguage.EXPRESSION_PREFIX,
                                              suffix = OgnlLanguage.EXPRESSION_SUFFIX) final String bigIntegerExpression) {
    final OgnlLiteralExpression expression = parse(bigIntegerExpression);

    final PsiType type = expression.getType();
    assertNotNull(type);
    assertEquals("java.math.BigInteger", type.getCanonicalText());
    assertEquals(new BigInteger(bigIntegerExpression.substring(0, bigIntegerExpression.length() - 1)),
                 expression.getConstantValue());
  }
View Full Code Here

  private void runBigDecimalLiteral(@Language(value = OgnlLanguage.ID,
                                              prefix = OgnlLanguage.EXPRESSION_PREFIX,
                                              suffix = OgnlLanguage.EXPRESSION_SUFFIX) final String bigDecimalExpression) {
    final OgnlLiteralExpression expression = parse(bigDecimalExpression);

    final PsiType type = expression.getType();
    assertNotNull(type);
    assertEquals("java.math.BigDecimal", type.getCanonicalText());
    assertEquals(new BigDecimal(bigDecimalExpression.substring(0, bigDecimalExpression.length() - 1)),
                 expression.getConstantValue());
  }
View Full Code Here

          // getting javaloader type
          PsiElement secondChild = functionCallEl.getFirstChild().getFirstChild();
          if (!(secondChild instanceof CfmlReferenceExpression)) {
            return super.getReferences();
          }
          PsiType type = ((CfmlReferenceExpression)secondChild).getPsiType();
          if (!(type instanceof CfmlJavaLoaderClassType)) {
            return super.getReferences();
          }
          final GlobalSearchScope ss = ((CfmlJavaLoaderClassType)type).getSearchScope();
View Full Code Here

    throw new AssertionError(this);
  }

  @Nullable
  private static PsiType checkAndReturnNumeric(@NotNull CfmlExpression leftOperand, @NotNull CfmlExpression rightOperand) {
    PsiType rightType = rightOperand.getPsiType();
    if (rightType == null) {
      return null;
    }
    PsiType leftType = leftOperand.getPsiType();
    if (leftType == null) {
      return null;
    }
    if (isNumericType(leftType) && isNumericType(rightType)) {
      PsiClassType boxedType =
View Full Code Here

    return result;
  }

  protected void generatePsiElements(@NotNull PsiField psiField, @NotNull PsiAnnotation psiAnnotation, @NotNull List<? super PsiElement> target) {
    final String fieldName = psiField.getName();
    final PsiType psiFieldType = psiField.getType();

    final String methodName = getFindByName(psiField);

    PsiClass psiClass = psiField.getContainingClass();
    assert psiClass != null;
View Full Code Here

TOP

Related Classes of com.intellij.psi.PsiType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.