Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » About implemented class name to fullyqualify name!
About implemented class name to fullyqualify name! [message #66825] Wed, 25 June 2003 11:56 Go to next message
Eclipse UserFriend
Originally posted by: soshila.bbc.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 #67337 is a reply to message #66825] Wed, 25 June 2003 12:07 Go to previous messageGo to next message
Eclipse UserFriend
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 #67548 is a reply to message #66825] Wed, 25 June 2003 21:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam.kiezun.gmx.net.remove

it's an FAQ:

IType:resolveType

a.
--
eclipse.org
Re: About implemented class name to fullyqualify name! [message #67758 is a reply to message #66825] Thu, 26 June 2003 01:56 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Jerome Lanneluc is currently offline Jerome LannelucFriend
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!
> >
> >
>
>
Previous Topic:About how to convert readable to Signature!
Next Topic:Indenting simple if statements
Goto Forum:
  


Current Time: Wed Jan 15 04:37:42 GMT 2025

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

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

Back to the top