当前位置: 首页>>代码示例>>Java>>正文


Java JVMNameUtil.getJVMQualifiedName方法代码示例

本文整理汇总了Java中com.intellij.debugger.engine.JVMNameUtil.getJVMQualifiedName方法的典型用法代码示例。如果您正苦于以下问题:Java JVMNameUtil.getJVMQualifiedName方法的具体用法?Java JVMNameUtil.getJVMQualifiedName怎么用?Java JVMNameUtil.getJVMQualifiedName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.debugger.engine.JVMNameUtil的用法示例。


在下文中一共展示了JVMNameUtil.getJVMQualifiedName方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visitArrayInitializerExpression

import com.intellij.debugger.engine.JVMNameUtil; //导入方法依赖的package包/类
@Override
public void visitArrayInitializerExpression(PsiArrayInitializerExpression expression) {
  PsiExpression[] initializers = expression.getInitializers();
  Evaluator[] evaluators = new Evaluator[initializers.length];
  final PsiType type = expression.getType();
  boolean primitive = type instanceof PsiArrayType && ((PsiArrayType)type).getComponentType() instanceof PsiPrimitiveType;
  for (int idx = 0; idx < initializers.length; idx++) {
    PsiExpression initializer = initializers[idx];
    initializer.accept(this);
    if (myResult != null) {
      final Evaluator coerced =
        primitive ? handleUnaryNumericPromotion(initializer.getType(), myResult) : new BoxingEvaluator(myResult);
      evaluators[idx] = new DisableGC(coerced);
    }
    else {
      throwExpressionInvalid(initializer);
    }
  }
  myResult = new ArrayInitializerEvaluator(evaluators);
  if (type != null && !(expression.getParent() instanceof PsiNewExpression)) {
    myResult = new NewArrayInstanceEvaluator(new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(type)),
                                             null,
                                             myResult);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:EvaluatorBuilderImpl.java

示例2: visitInstanceOfExpression

import com.intellij.debugger.engine.JVMNameUtil; //导入方法依赖的package包/类
@Override
    public void visitInstanceOfExpression(PsiInstanceOfExpression expression) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("visitInstanceOfExpression " + expression);
      }
      PsiTypeElement checkType = expression.getCheckType();
      if(checkType == null) {
        throwEvaluateException(DebuggerBundle.message("evaluation.error.invalid.expression", expression.getText()));
        return;
      }
      PsiType type = checkType.getType();
      expression.getOperand().accept(this);
//    ClassObjectEvaluator typeEvaluator = new ClassObjectEvaluator(type.getCanonicalText());
      Evaluator operandEvaluator = myResult;
      myResult = new InstanceofEvaluator(operandEvaluator, new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(type)));
    }
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:EvaluatorBuilderImpl.java

示例3: visitInstanceOfExpression

import com.intellij.debugger.engine.JVMNameUtil; //导入方法依赖的package包/类
@Override
public void visitInstanceOfExpression(PsiInstanceOfExpression expression)
{
	if(LOG.isDebugEnabled())
	{
		LOG.debug("visitInstanceOfExpression " + expression);
	}
	PsiTypeElement checkType = expression.getCheckType();
	if(checkType == null)
	{
		throwExpressionInvalid(expression);
	}
	PsiType type = checkType.getType();
	expression.getOperand().accept(this);
	//    ClassObjectEvaluator typeEvaluator = new ClassObjectEvaluator(type.getCanonicalText());
	Evaluator operandEvaluator = myResult;
	myResult = new InstanceofEvaluator(operandEvaluator, new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(type)));
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:19,代码来源:EvaluatorBuilderImpl.java

示例4: visitInstanceOfExpression

import com.intellij.debugger.engine.JVMNameUtil; //导入方法依赖的package包/类
@Override
    public void visitInstanceOfExpression(PsiInstanceOfExpression expression) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("visitInstanceOfExpression " + expression);
      }
      PsiTypeElement checkType = expression.getCheckType();
      if(checkType == null) {
        throwExpressionInvalid(expression);
      }
      PsiType type = checkType.getType();
      expression.getOperand().accept(this);
//    ClassObjectEvaluator typeEvaluator = new ClassObjectEvaluator(type.getCanonicalText());
      Evaluator operandEvaluator = myResult;
      myResult = new InstanceofEvaluator(operandEvaluator, new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(type)));
    }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:EvaluatorBuilderImpl.java

示例5: visitClassObjectAccessExpression

import com.intellij.debugger.engine.JVMNameUtil; //导入方法依赖的package包/类
@Override
public void visitClassObjectAccessExpression(PsiClassObjectAccessExpression expression) {
  PsiType type = expression.getOperand().getType();

  if (type instanceof PsiPrimitiveType) {
    final JVMName typeName = JVMNameUtil.getJVMRawText(((PsiPrimitiveType)type).getBoxedTypeName());
    myResult = new FieldEvaluator(new TypeEvaluator(typeName), FieldEvaluator.TargetClassFilter.ALL, "TYPE");
  }
  else {
    myResult = new ClassObjectEvaluator(new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(type)));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:EvaluatorBuilderImpl.java

示例6: wrapVarargs

import com.intellij.debugger.engine.JVMNameUtil; //导入方法依赖的package包/类
private static Evaluator[] wrapVarargs(final PsiParameter[] declaredParams,
                                       final PsiExpression[] actualArgumentExpressions,
                                       final PsiSubstitutor methodResolveSubstitutor,
                                       final Evaluator[] argumentEvaluators) {
  int lastParam = declaredParams.length - 1;
  if (lastParam >= 0 && declaredParams[lastParam].isVarArgs() && argumentEvaluators.length > lastParam) {
    // only wrap if the first varargs parameter is null for now
    if (!TypeConversionUtil.isNullType(actualArgumentExpressions[lastParam].getType())) {
      return argumentEvaluators;
    }
    // do not wrap arrays twice
    if (argumentEvaluators.length - lastParam == 1 && actualArgumentExpressions[lastParam].getType() instanceof PsiArrayType) {
      return argumentEvaluators;
    }
    PsiEllipsisType declaredParamType = (PsiEllipsisType)methodResolveSubstitutor.substitute(declaredParams[lastParam].getType());
    ArrayInitializerEvaluator varargArrayEvaluator =
      new ArrayInitializerEvaluator(Arrays.copyOfRange(argumentEvaluators, lastParam, argumentEvaluators.length));
    NewArrayInstanceEvaluator evaluator =
      new NewArrayInstanceEvaluator(new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(declaredParamType.toArrayType())), null,
                                    varargArrayEvaluator);
    Evaluator[] res = new Evaluator[declaredParams.length];
    System.arraycopy(argumentEvaluators, 0, res, 0, lastParam);
    res[lastParam] = new DisableGC(evaluator);
    return res;
  }
  return argumentEvaluators;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:EvaluatorBuilderImpl.java

示例7: visitClassObjectAccessExpression

import com.intellij.debugger.engine.JVMNameUtil; //导入方法依赖的package包/类
@Override
public void visitClassObjectAccessExpression(PsiClassObjectAccessExpression expression)
{
	PsiType type = expression.getOperand().getType();

	if(type instanceof PsiPrimitiveType)
	{
		final JVMName typeName = JVMNameUtil.getJVMRawText(((PsiPrimitiveType) type).getBoxedTypeName());
		myResult = new FieldEvaluator(new TypeEvaluator(typeName), FieldEvaluator.TargetClassFilter.ALL, "TYPE");
	}
	else
	{
		myResult = new ClassObjectEvaluator(new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(type)));
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:16,代码来源:EvaluatorBuilderImpl.java

示例8: visitArrayInitializerExpression

import com.intellij.debugger.engine.JVMNameUtil; //导入方法依赖的package包/类
@Override
public void visitArrayInitializerExpression(PsiArrayInitializerExpression expression)
{
	PsiExpression[] initializers = expression.getInitializers();
	Evaluator[] evaluators = new Evaluator[initializers.length];
	final PsiType type = expression.getType();
	boolean primitive = type instanceof PsiArrayType && ((PsiArrayType) type).getComponentType() instanceof PsiPrimitiveType;
	for(int idx = 0; idx < initializers.length; idx++)
	{
		PsiExpression initializer = initializers[idx];
		initializer.accept(this);
		if(myResult != null)
		{
			final Evaluator coerced = primitive ? handleUnaryNumericPromotion(initializer.getType(), myResult) : new BoxingEvaluator(myResult);
			evaluators[idx] = DisableGC.create(coerced);
		}
		else
		{
			throwExpressionInvalid(initializer);
		}
	}
	myResult = new ArrayInitializerEvaluator(evaluators);
	if(type != null && !(expression.getParent() instanceof PsiNewExpression))
	{
		myResult = new NewArrayInstanceEvaluator(new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(type)), null, myResult);
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:28,代码来源:EvaluatorBuilderImpl.java


注:本文中的com.intellij.debugger.engine.JVMNameUtil.getJVMQualifiedName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。