[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.jdt] Programmatic ITypeBinding to be used for isAssignmentCompatible
|
- From: asashour@xxxxxxxxx (Ahmed Ashour)
- Date: Mon, 10 Apr 2006 05:37:53 +0000 (UTC)
- Newsgroups: eclipse.tools.jdt
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Dear All,
I am interested to evaluate whether a given
ITypeBinding.isAssignmentCompatible with let's say
"java.util.logging.Logger"
I couldn't find a way to created the needed ITypeBinding
QualifiedType loggerType = ast.newQualifiedType( ast.newSimpleType(
ast.newName( new String[] { "java", "util", "logging" } ) ),
ast.newSimpleName("Logger" ) );
//loggerType.resolveBinding now is null
To be used in:
ITypeBinding typeBinding = .....;
if( typeBinding.isAssignmentCompatible( loggerType.resolveBinding() ) ) {
AST.newTypeLiteral(), and setType( loggerType ), again doesn't evalute it.
Any ideas, many thanks for your help.
Ahmed Ashour