Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Trying to compare two types for subtype compatibility
Trying to compare two types for subtype compatibility [message #250063] Thu, 06 December 2007 12:54
Eclipse UserFriend
Originally posted by: cchristo.cs.cmu.edu

I'm writing a static analysis tool, and my ASTVisitor needs to check the
compatibility of two types.

The problem is that one of the two objects is an ITypeBinding, while the
other is an IType. ITypeBinding has a isSubTypeCompatible method, but I
need another ITypeBinding.

The only thing I have found so far is to get the ASTNodes from the
IType, search for the TypeDeclaration I want, and get its ITypeBinding.
This has two problems:

1) I'd like to avoid loading in the entire AST for this type.

2) It doesn't appear to work anyway, presumably due to bug 80715.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=80715

Is there either another way to determine a subtyping relationship, or a
way to work around this bug?


Thanks,
Ciera
Previous Topic:jdbc connector
Next Topic:Create java project in code
Goto Forum:
  


Current Time: Sun Jul 13 13:25:27 EDT 2025

Powered by FUDForum. Page generated in 0.02249 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top