|
Re: About implemented class name to fullyqualify name! [message #67337 is a reply to message #66825] |
Wed, 25 June 2003 12:07 |
Eclipse User |
|
|
|
Originally posted by: scheglov_ke.nlmk.ru
soshila <soshila@bbc.com> wrote:
> Such as IMethod , i can get parameter name from it and look like "QString;"
> or "QComponent;",
> But how can i get the fullyqualify of them?
Hm...
May be something like this?
private boolean isSuccessorOf(ITypeBinding type, String name) {
if (type == null)
return false;
if (type.getQualifiedName().toString().equals(name))
return true;
return isSuccessorOf(type.getSuperclass(), name);
}
System.out.println(
"class: "
+ type.getName()
+ " is XXX: "
+ isSuccessorOf(type.resolveBinding(), "com.abc.XXX"));
--
SY, Konstantin.
|
|
|
|
Re: About implemented class name to fullyqualify name! [message #67758 is a reply to message #66825] |
Thu, 26 June 2003 01:56 |
Eclipse User |
|
|
|
Originally posted by: soshila.bbc.com
Sorry, i have try ITye ty resolve super class, it's work.
But in method, i use the parameter type to resolve by it's parent IType, but
it will return null, why?
Thx so much
"soshila" <soshila@bbc.com> wrote in message
news:bdc2cf$r3n$1@rogue.oti.com...
> Such as IMethod , i can get parameter name from it and look like
"QString;"
> or "QComponent;",
> But how can i get the fullyqualify of them?
>
> Thx so much!
>
>
|
|
|
Re: About implemented class name to fullyqualify name! [message #68023 is a reply to message #67758] |
Thu, 26 June 2003 10:58 |
Jerome Lanneluc Messages: 572 Registered: July 2009 |
Senior Member |
|
|
According to the spec, it returns <code>null</code> if unable to find any
matching type.
Make sure you pass a simple name (not the signature). Make sure the targeted
type is visible.
If you think it should find it, enter a bug report against JDT/Core with
build number and detailed steps to reproduce the problem.
Jerome
"soshila" <soshila@bbc.com> wrote in message
news:bddjkt$alb$1@rogue.oti.com...
> Sorry, i have try ITye ty resolve super class, it's work.
> But in method, i use the parameter type to resolve by it's parent IType,
but
> it will return null, why?
>
> Thx so much
> "soshila" <soshila@bbc.com> wrote in message
> news:bdc2cf$r3n$1@rogue.oti.com...
> > Such as IMethod , i can get parameter name from it and look like
> "QString;"
> > or "QComponent;",
> > But how can i get the fullyqualify of them?
> >
> > Thx so much!
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03412 seconds