Package io.codemodder
Class CodemodResources
java.lang.Object
io.codemodder.CodemodResources
A utility class for accessing a codemod's resources in it's "default location" the classpath.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getClassResourceAsString
(Class<?> type, String relativeName) Returns a class resource as aString
.
-
Method Details
-
getClassResourceAsString
Returns a class resource as aString
.The absolute name of the class resource is of the following form:
/modifiedPackageName/className/relativeName
modifiedPackageName
is the package name of this object with'/'
substituted for'.'
.- Parameters:
relativeName
- The relative name of the resource.- Returns:
- The resource as a
String
. - Throws:
MissingResourceException
- If the resource was not found.
-