List of usage examples for org.eclipse.jdt.core.dom InstanceofExpression getRightOperand
public Type getRightOperand()
From source file:at.bestsolution.fxide.jdt.corext.dom.ASTFlattener.java
License:Open Source License
@Override public boolean visit(InstanceofExpression node) { node.getLeftOperand().accept(this); this.fBuffer.append(" instanceof ");//$NON-NLS-1$ node.getRightOperand().accept(this); return false; }
From source file:boa.datagen.util.Java7Visitor.java
License:Apache License
@Override public boolean visit(InstanceofExpression node) { boa.types.Ast.Expression.Builder b = boa.types.Ast.Expression.newBuilder(); // b.setPosition(pos.build()); b.setKind(boa.types.Ast.Expression.ExpressionKind.TYPECOMPARE); node.getLeftOperand().accept(this); b.addExpressions(expressions.pop()); boa.types.Ast.Type.Builder tb = boa.types.Ast.Type.newBuilder(); tb.setName(getIndex(typeName(node.getRightOperand()))); tb.setKind(boa.types.Ast.TypeKind.OTHER); b.setNewType(tb.build());//from w w w .j a v a2 s. c om expressions.push(b.build()); return false; }
From source file:ca.mcgill.cs.swevo.jayfx.ASTCrawler.java
License:Open Source License
@Override public boolean visit(final InstanceofExpression pNode) { if (ASTCrawler.checkForNull(this.aCurrMethod)) return false; final ITypeBinding lBinding = pNode.getRightOperand().resolveBinding(); if (lBinding != null) { final IElement lClass = ASTCrawler.convertBinding(lBinding); this.aDB.addElement(lClass, lBinding.getModifiers() | (lBinding.isInterface() ? ASTCrawler.ABSTRACT_FLAG : 0)); this.aDB.addRelationAndTranspose(this.aCurrMethod, Relation.CHECKS, lClass); }/*from w w w . j a v a 2 s . co m*/ return true; }
From source file:coloredide.utils.CopiedNaiveASTFlattener.java
License:Open Source License
public boolean visit(InstanceofExpression node) { node.getLeftOperand().accept(this); this.buffer.append(" instanceof ");//$NON-NLS-1$ node.getRightOperand().accept(this); return false; }
From source file:com.architexa.diagrams.jdt.extractors.TypeRefExtractor.java
License:Open Source License
@Override public boolean visit(InstanceofExpression instOfExpr) { addRefFromCaller(bindingToResource(instOfExpr.getRightOperand().resolveBinding())); return true;//from w w w.j a v a 2 s. c o m }
From source file:com.google.dart.java2dart.SyntaxTranslator.java
License:Open Source License
@Override public boolean visit(org.eclipse.jdt.core.dom.InstanceofExpression node) { return done(isExpression(translateExpression(node.getLeftOperand()), false, (TypeName) translate(node.getRightOperand()))); }
From source file:com.google.devtools.j2cpp.gen.CppStatementGenerator.java
License:Open Source License
@Override public boolean visit(InstanceofExpression node) { ITypeBinding leftBinding = Types.getTypeBinding(node.getLeftOperand()); ITypeBinding rightBinding = Types.getTypeBinding(node.getRightOperand()); if (rightBinding.isArray()) { buffer.append("[[(IOSArray *) "); node.getLeftOperand().accept(this); buffer.append(" elementType] isEqual:["); buffer.append(NameTable.getFullName(rightBinding.getElementType())); buffer.append(" class]]"); return false; }/* ww w. java 2 s. c o m*/ buffer.append('['); if (leftBinding.isInterface()) { // Obj-C complains when a id<Protocol> is tested for a different // protocol, so cast it to a generic id. buffer.append("(id) "); } node.getLeftOperand().accept(this); if (rightBinding.isInterface()) { buffer.append(" conformsToProtocol: @protocol("); node.getRightOperand().accept(this); buffer.append(")"); } else { buffer.append(" isKindOfClass:["); node.getRightOperand().accept(this); buffer.append(" class]"); } buffer.append(']'); return false; }
From source file:com.google.devtools.j2cpp.types.ImplementationImportCollector.java
License:Open Source License
@Override public boolean visit(InstanceofExpression node) { addReference(node.getRightOperand()); return super.visit(node); }
From source file:com.google.devtools.j2objc.ast.DebugASTPrinter.java
License:Apache License
@Override public boolean visit(InstanceofExpression node) { node.getLeftOperand().accept(this); sb.print(" instanceof "); node.getRightOperand().accept(this); return false; }
From source file:com.google.googlejavaformat.java.JavaInputAstVisitor.java
License:Apache License
/** Visitor method for {@link InstanceofExpression}s. */ @Override// w w w . jav a2 s. c o m public boolean visit(InstanceofExpression node) { sync(node); builder.open(plusFour); node.getLeftOperand().accept(this); builder.breakOp(" "); builder.open(ZERO); token("instanceof"); builder.breakOp(" "); node.getRightOperand().accept(this); builder.close(); builder.close(); return false; }