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 StringgetClassResourceAsString(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:
Where the/modifiedPackageName/className/relativeNamemodifiedPackageNameis the package name of this object with'/'substituted for'.'.- Parameters:
type- The codemod type.relativeName- The relative name of the resource.- Returns:
- The resource as a
String. - Throws:
MissingResourceException- If the resource was not found.
-