本文整理了Java中bsh.Interpreter.getu()
方法的一些代码示例,展示了Interpreter.getu()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interpreter.getu()
方法的具体详情如下:
包路径:bsh.Interpreter
类名称:Interpreter
方法名:getu
[英]Unchecked get for internal use
[中]未选中获取供内部使用
代码示例来源:origin: beanshell/beanshell
/**
Localize a path to the file name based on the bsh.cwd interpreter
working directory.
*/
public File pathToFile( String fileName )
throws IOException
{
File file = new File( fileName );
// if relative, fix up to bsh.cwd
if ( !file.isAbsolute() ) {
String cwd = (String)getu("bsh.cwd");
file = new File( cwd + File.separator + fileName );
}
// The canonical file name is also absolute.
// No need for getAbsolutePath() here...
return new File( file.getCanonicalPath() );
}
代码示例来源:origin: jitlogic/zorka
/**
Localize a path to the file name based on the bsh.cwd interpreter
working directory.
*/
public File pathToFile( String fileName )
throws IOException
{
File file = new File( fileName );
// if relative, fix up to bsh.cwd
if ( !file.isAbsolute() ) {
String cwd = (String)getu("bsh.cwd");
file = new File( cwd + File.separator + fileName );
}
// The canonical file name is also absolute.
// No need for getAbsolutePath() here...
return new File( file.getCanonicalPath() );
}
内容来源于网络,如有侵权,请联系作者删除!