当前位置: 首页>>代码示例>>Java>>正文


Java RubyInstanceConfig.DEBUG_LOAD_SERVICE属性代码示例

本文整理汇总了Java中org.jruby.RubyInstanceConfig.DEBUG_LOAD_SERVICE属性的典型用法代码示例。如果您正苦于以下问题:Java RubyInstanceConfig.DEBUG_LOAD_SERVICE属性的具体用法?Java RubyInstanceConfig.DEBUG_LOAD_SERVICE怎么用?Java RubyInstanceConfig.DEBUG_LOAD_SERVICE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.jruby.RubyInstanceConfig的用法示例。


在下文中一共展示了RubyInstanceConfig.DEBUG_LOAD_SERVICE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: debugLogFound

protected void debugLogFound( LoadServiceResource resource ) {
    if (RubyInstanceConfig.DEBUG_LOAD_SERVICE) {
        String resourceUrl;
        try {
            resourceUrl = resource.getURL().toString();
        } catch (IOException e) {
            resourceUrl = e.getMessage();
        }
        LOG.info( "found: " + resourceUrl );
    }
}
 
开发者ID:rholder,项目名称:jfss,代码行数:11,代码来源:LoadService.java

示例2: tryResourceFromLoadPath

protected LoadServiceResource tryResourceFromLoadPath( String namePlusSuffix,String loadPathEntry) throws RaiseException {
    LoadServiceResource foundResource = null;

    try {
        if (!Ruby.isSecurityRestricted()) {
            String reportedPath = loadPathEntry + "/" + namePlusSuffix;
            boolean absolute = true;
            // we check length == 0 for 'load', which does not use load path
            if (!new File(reportedPath).isAbsolute()) {
                absolute = false;
                // prepend ./ if . is not already there, since we're loading based on CWD
                if (reportedPath.charAt(0) != '.') {
                    reportedPath = "./" + reportedPath;
                }
                loadPathEntry = JRubyFile.create(runtime.getCurrentDirectory(), loadPathEntry).getAbsolutePath();
            }
            JRubyFile actualPath = JRubyFile.create(loadPathEntry, RubyFile.expandUserPath(runtime.getCurrentContext(), namePlusSuffix));
            if (RubyInstanceConfig.DEBUG_LOAD_SERVICE) {
                debugLogTry("resourceFromLoadPath", "'" + actualPath.toString() + "' " + actualPath.isFile() + " " + actualPath.canRead());
            }
            if (actualPath.canRead()) {
                foundResource = new LoadServiceResource(actualPath, reportedPath, absolute);
                debugLogFound(foundResource);
            }
        }
    } catch (SecurityException secEx) {
    }

    return foundResource;
}
 
开发者ID:rholder,项目名称:jfss,代码行数:30,代码来源:LoadService.java

示例3: debugLogTry

protected void debugLogTry(String what, String msg) {
    if (RubyInstanceConfig.DEBUG_LOAD_SERVICE) {
        LOG.info( "trying " + what + ": " + msg );
    }
}
 
开发者ID:rholder,项目名称:jfss,代码行数:5,代码来源:LoadService.java


注:本文中的org.jruby.RubyInstanceConfig.DEBUG_LOAD_SERVICE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。