commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-417) ClassUtils: method for turning FQN into resource path
Date Sun, 09 Mar 2008 04:47:46 GMT

    [ https://issues.apache.org/jira/browse/LANG-417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576704#action_12576704
] 

Paul Benedict commented on LANG-417:
------------------------------------

This method may be better named as getClasspathResourcePath

> ClassUtils: method for turning FQN into resource path
> -----------------------------------------------------
>
>                 Key: LANG-417
>                 URL: https://issues.apache.org/jira/browse/LANG-417
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Paul Benedict
>             Fix For: 2.4
>
>
> I commonly need a FQ path to a resource within the same location as a class file. I recommend
the addition of this method:
> public String getPackageResourcePath(Class clazz, String resourceName)
>     StringBuffer buf = new StringBuffer();
>     buf.append(ClassUtils.getPackageName(getClass()).replace('.', '/'));
>     buf.append("/");
>     buf.append(resourceName);
>     return  buf.toString();
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message