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


Java SuperMethodInvocation.getQualifier方法代码示例

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


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

示例1: write

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
@Override
public void write(SuperMethodInvocation superMethodInvocation) {
    // TODO: Support this
    if (superMethodInvocation.getQualifier() != null)
        throw sourceNotSupported("Qualified super invocations aren't currently supported");

    matchAndWrite("super", "base");

    copySpaceAndComments();
    matchAndWrite(".");

    copySpaceAndComments();
    writeMethodInvocation(superMethodInvocation, null,
            superMethodInvocation.getName(), superMethodInvocation.typeArguments(),
            superMethodInvocation.arguments(), superMethodInvocation.resolveMethodBinding());
}
 
开发者ID:juniversal,项目名称:juniversal,代码行数:17,代码来源:SuperMethodInvocationWriter.java

示例2: write

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
@Override
public void write(ASTNode node) {
	if (node instanceof SuperMethodInvocation) {
		SuperMethodInvocation superMethodInvocation = (SuperMethodInvocation) node;

		if (superMethodInvocation.getQualifier() != null)
			throw sourceNotSupported("Super method invocations with qualifiers before super aren't currently supported");

		writeMethodInvocation(true, null, superMethodInvocation.resolveMethodBinding(),
				superMethodInvocation.getName(), superMethodInvocation.typeArguments(),
				superMethodInvocation.arguments());
	} else if (node instanceof MethodInvocation) {
		MethodInvocation methodInvocation = (MethodInvocation) node;

		writeMethodInvocation(false, methodInvocation.getExpression(), methodInvocation.resolveMethodBinding(),
				methodInvocation.getName(), methodInvocation.typeArguments(), methodInvocation.arguments());
	}
}
 
开发者ID:juniversal,项目名称:juniversal,代码行数:19,代码来源:MethodInvocationWriter.java

示例3: visit

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
@Override
public boolean visit(SuperMethodInvocation node) {
  if (node.getQualifier() == null) {
    throw new AbortSearchException();
  } else {
    IBinding qualifierType = node.getQualifier().resolveBinding();
    if (qualifierType instanceof ITypeBinding && ((ITypeBinding) qualifierType).isInterface()) {
      throw new AbortSearchException(); // JLS8: new overloaded meaning of
      // 'interface'.super.'method'(..)
    }
  }
  return true; // references to outer scopes are harmless
}
 
开发者ID:eclipse,项目名称:che,代码行数:14,代码来源:LambdaExpressionsFix.java

示例4: visit

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
@Override
public boolean visit(SuperMethodInvocation node) {
	if (node.getQualifier() == null) {
		throw new AbortSearchException();
	} else {
		IBinding qualifierType= node.getQualifier().resolveBinding();
		if (qualifierType instanceof ITypeBinding && ((ITypeBinding) qualifierType).isInterface()) {
			throw new AbortSearchException(); // JLS8: new overloaded meaning of 'interface'.super.'method'(..)
		}
	}
	return true; // references to outer scopes are harmless
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:LambdaExpressionsFix.java

示例5: visit

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
@Override
public boolean visit(SuperMethodInvocation node) {
	if (node.getQualifier() == null) {
		throw new AbortSearchException();
	} else {
		IBinding qualifierType = node.getQualifier().resolveBinding();
		if (qualifierType instanceof ITypeBinding && ((ITypeBinding) qualifierType).isInterface()) {
			throw new AbortSearchException(); // JLS8: new overloaded meaning of 'interface'.super.'method'(..)
		}
	}
	return true; // references to outer scopes are harmless
}
 
开发者ID:vogellacompany,项目名称:codemodify,代码行数:13,代码来源:LambdaConverterFix.java

示例6: visit

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
@Override
public boolean visit(SuperMethodInvocation node) {
	if (node.getQualifier() != null) {
		node.getQualifier().accept(this);
		this.fBuffer.append(".");//$NON-NLS-1$
	}
	this.fBuffer.append("super.");//$NON-NLS-1$
	if (node.getAST().apiLevel() >= JLS3) {
		if (!node.typeArguments().isEmpty()) {
			this.fBuffer.append("<");//$NON-NLS-1$
			for (Iterator<Type> it= node.typeArguments().iterator(); it.hasNext();) {
				Type t= it.next();
				t.accept(this);
				if (it.hasNext()) {
					this.fBuffer.append(",");//$NON-NLS-1$
				}
			}
			this.fBuffer.append(">");//$NON-NLS-1$
		}
	}
	node.getName().accept(this);
	this.fBuffer.append("(");//$NON-NLS-1$
	for (Iterator<Expression> it= node.arguments().iterator(); it.hasNext();) {
		Expression e= it.next();
		e.accept(this);
		if (it.hasNext()) {
			this.fBuffer.append(",");//$NON-NLS-1$
		}
	}
	this.fBuffer.append(")");//$NON-NLS-1$
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:33,代码来源:ASTFlattener.java

示例7: visit

import org.eclipse.jdt.core.dom.SuperMethodInvocation; //导入方法依赖的package包/类
public boolean visit(SuperMethodInvocation node) {
	if (node.getQualifier() != null) {
		node.getQualifier().accept(this);
		this.buffer.append(".");//$NON-NLS-1$
	}
	this.buffer.append("super.");//$NON-NLS-1$
	if (node.getAST().apiLevel() >= JLS3) {
		if (!node.typeArguments().isEmpty()) {
			this.buffer.append("<");//$NON-NLS-1$
			for (Iterator it = node.typeArguments().iterator(); it.hasNext(); ) {
				Type t = (Type) it.next();
				t.accept(this);
				if (it.hasNext()) {
					this.buffer.append(",");//$NON-NLS-1$
				}
			}
			this.buffer.append(">");//$NON-NLS-1$
		}
	}
	node.getName().accept(this);
	this.buffer.append("(");//$NON-NLS-1$
	for (Iterator it = node.arguments().iterator(); it.hasNext(); ) {
		Expression e = (Expression) it.next();
		e.accept(this);
		if (it.hasNext()) {
			this.buffer.append(",");//$NON-NLS-1$
		}
	}
	this.buffer.append(")");//$NON-NLS-1$
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:32,代码来源:NaiveASTFlattener.java


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