List of usage examples for org.eclipse.jdt.core.dom ThisExpression resolveTypeBinding
public final ITypeBinding resolveTypeBinding()
From source file:com.architexa.diagrams.jdt.extractors.TypeRefExtractor.java
License:Open Source License
@Override public boolean visit(ThisExpression node) { addRefFromCaller(bindingToResource(node.resolveTypeBinding())); return true; }
From source file:com.google.devtools.j2cpp.types.BindingMapBuilder.java
License:Open Source License
@Override public boolean visit(ThisExpression node) { put(node, node.resolveTypeBinding()); return true; }
From source file:edu.cmu.cs.crystal.tac.eclipse.EclipseTAC.java
License:Open Source License
/** * Returns the {@link ThisVariable} for the given <code>this</code> * expression./*from w ww. ja v a 2s .c om*/ * @param node * @return the {@link ThisVariable} for the given <code>this</code> * expression. */ private ThisVariable getThisVariable(ThisExpression node) { Name qualifier = node.getQualifier(); /** * The rule is that the declared, generic type, is the single canonical type. * Parameterized types are actually different type bindings. * @see org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment#createParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) */ ITypeBinding generic_type = node.resolveTypeBinding().getTypeDeclaration(); ThisVariable result = thisVar.get(generic_type); if (result == null) { // explicitly qualified this result = new ThisVariable(this, qualifier); thisVar.put(node.resolveTypeBinding(), result); } if (result.isImplicit()) { // fix up qualifier of previously created implicitly qualified this variable result.explicitQualifier(node.getQualifier()); } return result; }