本文整理了Java中org.apache.jena.atlas.lib.Lib.className()
方法的一些代码示例,展示了Lib.className()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Lib.className()
方法的具体详情如下:
包路径:org.apache.jena.atlas.lib.Lib
类名称:Lib
方法名:className
[英]Safely return the class short name for an object -- obj.getClass().getSimpleName()
[中]安全地返回对象的类短名称--obj。getClass()。getSimpleName()
代码示例来源:origin: apache/jena
@Override
public final void remove()
{
Log.warn(this, "Call to QueryIterator.remove() : "+Lib.className(this)+".remove") ;
throw new UnsupportedOperationException(Lib.className(this)+".remove") ;
}
代码示例来源:origin: apache/jena
/** final - autoclose and registration relies on it - implement moveToNextBinding() */
@Override
public final T next()
{
if ( ! hasNext() ) throw new NoSuchElementException(Lib.className(this)) ;
T obj = slot ;
slot = null ;
slotIsSet = false ;
return obj ;
}
代码示例来源:origin: apache/jena
@Override
public T next()
{
if ( ! hasNext() )
throw new NoSuchElementException(Lib.className(this)+".next()/finished") ;
return currentStage.next() ;
}
代码示例来源:origin: apache/jena
@Override
public NodeValue exec(List<NodeValue> args) {
if ( args.size() < 2 )
throw new ExprEvalException(Lib.className(this)+": Wrong number of arguments: "+
args.size()+" : [wanted at least 2]") ;
NodeValue v1 = args.get(0) ;
List<NodeValue> allArgs = new ArrayList<>();
for(int i = 1;i < args.size();i++)
allArgs.add(args.get(i));
return XSDFuncOp.javaSprintf(v1, allArgs) ;
}
}
代码示例来源:origin: apache/jena
@Override
public NodeValue exec(List<NodeValue> args) {
if ( args.size() != 2 && args.size() != 3 )
throw new ExprEvalException("Function '"+Lib.className(this)+"' takes two or three arguments") ;
NodeValue value = args.get(0) ;
NodeValue picture = args.get(1) ;
NodeValue decimalFormatName = null ;
if ( args.size() == 3)
decimalFormatName = args.get(2) ;
return XSDFuncOp.formatNumber(value, picture, decimalFormatName) ;
}
}
代码示例来源:origin: apache/jena
@Override
public final NodeValue exec(List<NodeValue> args)
{
if ( args == null )
// The contract on the function interface is that this should not happen.
throw new ARQInternalErrorException("Function '"+Lib.className(this)+" Null args list") ;
if ( args.size() != 0 )
throw new ExprEvalException("Function '"+Lib.className(this)+" Wanted 0, got "+args.size()) ;
return exec() ;
}
代码示例来源:origin: apache/jena
public void setVar(Var v)
{
if (this.var != null)
throw new ARQInternalErrorException(Lib.className(this)+ ": Attempt to set variable to " + v + " when already set as " + this.var) ;
if (v == null)
throw new ARQInternalErrorException(Lib.className(this)+ ": Attempt to set variable to null") ;
_setVar(v) ;
}
代码示例来源:origin: apache/jena
@Override
public void checkBuild(String uri, ExprList args)
{
if ( args.size() != 0 )
throw new QueryBuildException("Function '"+Lib.className(this)+"' takes no arguments") ;
}
代码示例来源:origin: apache/jena
@Override
public void checkBuild(String uri, ExprList args) {
if(args.size() < 2)
throw new QueryBuildException("Function '"+ Lib.className(this)+"' takes at least two arguments") ;
}
代码示例来源:origin: apache/jena
@Override
public void checkBuild(String uri, ExprList args)
{
if ( args.size() != 1 )
throw new QueryBuildException("Function '"+Lib.className(this)+"' takes one argument") ;
}
代码示例来源:origin: apache/jena
@Override
public void checkBuild(String uri, ExprList args) {
if (args.size() != 5) {
throw new QueryBuildException("Function '" + Lib.className(this) + "' takes five arguments");
}
}
代码示例来源:origin: apache/jena
@Override
public void checkBuild(String uri, ExprList args)
{
if ( args.size() != 2 )
throw new QueryBuildException("Function '"+Lib.className(this)+"' takes two arguments") ;
}
代码示例来源:origin: apache/jena
@Override
public void checkBuild(String uri, ExprList args) {
if (args.size() < 1 || args.size() > 2)
throw new QueryBuildException("Function '" + Lib.className(this) + "' takes one/two argument(s)");
}
代码示例来源:origin: apache/jena
@Override
public void checkBuild(String uri, ExprList args)
{
if ( args.size() != 1 && args.size() != 2 )
throw new QueryBuildException("Function '"+ Lib.className(this)+"' takes one or two arguments") ;
}
@Override
代码示例来源:origin: apache/jena
@Override
protected void details(IndentedWriter out, SerializationContext cxt)
{
out.print(Lib.className(this)) ;
out.print(" ") ;
ExprUtils.fmtSPARQL(out, expr, cxt) ;
}
代码示例来源:origin: apache/jena
@Override
public void checkBuild(String uri, ExprList args) {
if (args.size() != 4 && args.size() != 6)
throw new QueryBuildException("Function '" + Lib.className(this) + "' takes 4 or 6 argument(s)");
}
代码示例来源:origin: apache/jena
@Override
public void checkBuild(String uri, ExprList args)
{
if ( args.size() != 1 && args.size() != 2 )
throw new QueryBuildException("Function '"+ Lib.className(this)+"' takes one or two arguments") ;
}
@Override
代码示例来源:origin: apache/jena
@Override
protected void details(IndentedWriter out, SerializationContext sCxt)
{
out.println(Lib.className(this)) ;
out.incIndent() ;
op.output(out, sCxt) ;
out.decIndent() ;
}
}
代码示例来源:origin: apache/jena
public static NodeValue get(Symbol symbol, FunctionEnv env) {
Object obj = env.getContext().get(symbol);
if ( obj == null )
throw new ExprEvalException("null for symbol: " + symbol);
if ( !(obj instanceof Node) )
throw new ExprEvalException("Not a Node: " + Lib.className(obj));
Node n = (Node)obj;
NodeValue nv = NodeValue.makeNode(n);
return nv;
}
}
代码示例来源:origin: apache/jena
@Override
protected void details(IndentedWriter out, SerializationContext sCxt)
{
out.print(Lib.className(this)) ;
out.println() ;
out.incIndent() ;
out.print(triplePath.toString()) ;
out.decIndent() ;
}
}
内容来源于网络,如有侵权,请联系作者删除!