[ 
http://jira.codehaus.org/browse/QDOX-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=229660#action_229660
 ] 

Robert Scholte commented on QDOX-213:
-------------------------------------

Even if it's that hard to locate these resources, this might be the start of 
trouble. I would strongly advise you to let QDox resolve the classes. A more 
acceptable solution is to add the name of the class to the ClassLibrary 
([ClassLibrary.add(String)|http://qdox.codehaus.org/apidocs/com/thoughtworks/qdox/model/ClassLibrary.html#add(java.lang.String)]).
 QDox won't fail if the real class isn't there, but it can use it while 
building it's model.

> getSimpleName as in java.lang.Class
> -----------------------------------
>
>                 Key: QDOX-213
>                 URL: http://jira.codehaus.org/browse/QDOX-213
>             Project: QDox
>          Issue Type: Improvement
>          Components: Java API
>    Affects Versions: 2.0
>            Reporter: Stefan Ackermann
>            Priority: Minor
>
> Type does have a field name. As far as I understand that would be the Simple 
> Name of the type. There is no getter for that field.
> My use case is this:
> I do have a java class and want to check if there is an annotation like 
> javax.persistence.Entity. The class file has the import:
> import javax.persistence.*;
> qdox is thus not able to resolve the fully qualified name, since it does not 
> have access to that sources. 
> Now I know that the full class name is javax.persistence.Entity, and I assume 
> the class to have no compile errors. So I can check the imports myself. 
> However if I do getValue, it first tries to resolve it which always fails and 
> takes something like 16 ms. Its by far the slowest part (it tries to load the 
> class?) in a performance critical part of my project.
> With getSimpleName though I could check the imports myself and save some time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to