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


Java SuperMethodInvocation.resolveMethodBinding方法代码示例

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


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

示例1: visit

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
public boolean visit(SuperMethodInvocation node) {
	IMethodBinding mmtb = node.resolveMethodBinding();

	if (mtbStack.isEmpty()) // not part of a method
		return true;

	// make field access fact
	try {
		facts.add(Fact.makeCallsFact(getQualifiedName(mtbStack.peek()),
				getQualifiedName(mmtb)));
	} catch (Exception e) {
		System.err.println("Cannot resolve method invocation \""
				+ node.getName().toString() + "\"");
	}
	return true;
}
 
开发者ID:aserg-ufmg,项目名称:RefDiff,代码行数:17,代码来源:ASTVisitorAtomicChange.java

示例2: visit

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
public boolean visit(SuperMethodInvocation node)
{
  IMethodBinding mmtb = node.resolveMethodBinding();
  if (this.mtbStack.isEmpty()) {
    return true;
  }
  try
  {
    this.facts.add(Fact.makeCallsFact(getQualifiedName((IMethodBinding)this.mtbStack.peek()), 
      getQualifiedName(mmtb)));
  }
  catch (Exception e)
  {
    System.err.println("Cannot resolve method invocation \"" + 
      node.getName().toString() + "\"");
  }
  return true;
}
 
开发者ID:SEAL-UCLA,项目名称:Ref-Finder,代码行数:19,代码来源:ASTVisitorAtomicChange.java

示例3: visit

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
public boolean visit(SuperMethodInvocation node)
{
  IMethodBinding mmtb = node.resolveMethodBinding();
  if (this.mtbStack.isEmpty()) {
    return true;
  }
  try
  {
    this.facts.add(Fact.makeCallsFact(getQualifiedName((IMethodBinding)this.mtbStack.peek()), 
      getQualifiedName(mmtb)));
  }
  catch (Exception localException)
  {
    System.err.println("Cannot resolve method invocation \"" + 
      node.getName().toString() + "\"");
  }
  return true;
}
 
开发者ID:SEAL-UCLA,项目名称:Ref-Finder,代码行数:19,代码来源:ASTVisitorAtomicChange.java

示例4: retrieveResultReference

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
private VariableReference retrieveResultReference(
        SuperMethodInvocation superMethodInvocation) {
	// TODO Duplicate code from retrieveResultReference(MethodInvocation)
	// too bad they don't have a common matching interface
	VariableReference result = calleeResultMap.get(superMethodInvocation.toString());
	if (result != null) {
		return result;
	}
	ASTNode parent = superMethodInvocation.getParent();
	if (parent instanceof VariableDeclarationFragment) {
		return retrieveVariableReference(parent, null);
	}
	if (parent instanceof Assignment) {
		Assignment assignment = (Assignment) parent;
		return retrieveVariableReference(assignment.getLeftHandSide(), null);
	}
	IMethodBinding methodBinding = superMethodInvocation.resolveMethodBinding();
	result = retrieveVariableReference(methodBinding.getReturnType(), null);
	calleeResultMap.put(superMethodInvocation.toString(), result);
	return result;
}
 
开发者ID:EvoSuite,项目名称:evosuite,代码行数:22,代码来源:TestExtractingVisitor.java

示例5: endVisit

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
@Override
public final void endVisit(final SuperMethodInvocation node) {
	final IMethodBinding superBinding= node.resolveMethodBinding();
	if (superBinding != null) {
		endVisit(node.arguments(), superBinding);
		final MethodDeclaration declaration= fCurrentMethods.peek();
		if (declaration != null) {
			final IMethodBinding subBinding= declaration.resolveBinding();
			if (subBinding != null) {
				final ConstraintVariable2 ancestor= fModel.createReturnTypeVariable(superBinding);
				if (ancestor != null) {
					node.setProperty(PROPERTY_CONSTRAINT_VARIABLE, ancestor);
					final ConstraintVariable2 descendant= fModel.createReturnTypeVariable(subBinding);
					if (descendant != null)
						fModel.createEqualityConstraint(descendant, ancestor);
				}
			}
		}
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:21,代码来源:SuperTypeConstraintsCreator.java

示例6: visit

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
@Override
public boolean visit(SuperMethodInvocation loc) {
	if (currentMethod == null)
		return false;
	if (loc.resolveMethodBinding() == null)
		return false;
	if (loc.resolveMethodBinding().getMethodDeclaration() == null || loc.resolveMethodBinding().getMethodDeclaration().getJavaElement() == null)
		return true;
	if (loc.resolveMethodBinding().getMethodDeclaration().getJavaElement().isReadOnly())
		return true;
	addCalledMethod(loc.resolveMethodBinding().getMethodDeclaration());
	return true;
}
 
开发者ID:ioanaverebi,项目名称:Sparrow,代码行数:14,代码来源:OutCodeVisitor.java

示例7: visit

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
@Override
public boolean visit(SuperMethodInvocation node) {
	IMethodBinding methodBinding = node.resolveMethodBinding();
	if (methodBinding != null)
		if (methodBinding.getJavaElement().equals(accessedMethod))
			this.encounteredThisReceiver = true;
	return super.visit(node);
}
 
开发者ID:ponder-lab,项目名称:Migrate-Skeletal-Implementation-to-Interface-Refactoring,代码行数:9,代码来源:MethodReceiverAnalysisVisitor.java

示例8: create

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
@Override
public ITypeConstraint[] create(SuperMethodInvocation invocation) {
  List<Expression> arguments = invocation.arguments();
  List<ITypeConstraint> result = new ArrayList<ITypeConstraint>(arguments.size());
  IMethodBinding methodBinding = invocation.resolveMethodBinding();
  ITypeConstraint[] returnTypeConstraint = getReturnTypeConstraint(invocation, methodBinding);
  result.addAll(Arrays.asList(returnTypeConstraint));
  result.addAll(Arrays.asList(getArgumentConstraints(arguments, methodBinding)));
  return result.toArray(new ITypeConstraint[result.size()]);
}
 
开发者ID:eclipse,项目名称:che,代码行数:11,代码来源:FullConstraintCreator.java

示例9: create

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
@Override
public ITypeConstraint[] create(SuperMethodInvocation invocation){
	List<Expression> arguments= invocation.arguments();
	List<ITypeConstraint> result= new ArrayList<ITypeConstraint>(arguments.size());
	IMethodBinding methodBinding= invocation.resolveMethodBinding();
	ITypeConstraint[] returnTypeConstraint= getReturnTypeConstraint(invocation, methodBinding);
	result.addAll(Arrays.asList(returnTypeConstraint));
	result.addAll(Arrays.asList(getArgumentConstraints(arguments, methodBinding)));
	return result.toArray(new ITypeConstraint[result.size()]);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:11,代码来源:FullConstraintCreator.java


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