本文整理汇总了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());
}
示例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());
}
}
示例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
}
示例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
}
示例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
}
示例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;
}
示例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;
}