public static SObject loadResource ( String url ) { InputStream is = SObject . class . getResourceAsStream ( url ) ; if ( null == is ) { return null ; } String filename = S . afterLast ( url , "/" ) ; if ( S . blank ( filename ) ) { filename = url ; } return of ( randomKey ( ) , is , ATTR_FILE_NAME , filename ) ; }
Load an sobject from classpath by given url path