本文整理了Java中groovy.lang.Binding.getProperty()
方法的一些代码示例,展示了Binding.getProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.getProperty()
方法的具体详情如下:
包路径:groovy.lang.Binding
类名称:Binding
方法名:getProperty
[英]Overloaded to make variables appear as bean properties or via the subscript operator
[中]重载以使变量显示为bean属性或通过下标运算符
代码示例来源:origin: org.codehaus.groovy/groovy
private Object doGetProperty(String property) {
Closure[] accessors = resolveExplicitProperty(property);
if (accessors != null) {
if (accessors[0] == null) {
// write only property
throw new MissingPropertyException(property + " is declared as write only");
} else {
return accessors[0].call();
}
} else {
return super.getProperty(property);
}
}
代码示例来源:origin: com.tinkerpop/gremlin-groovy
/**
* Retrieve a script as defined in the shell context. This allows for multi-line scripts to be submitted.
*/
public static String getScript(final String submittedScript, final Groovysh shell) {
return submittedScript.startsWith("@") ? shell.getInterp().getContext().getProperty(submittedScript.substring(1)).toString() : submittedScript;
}
}
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
private Object doGetProperty(String property) {
Closure[] accessors = resolveExplicitProperty(property);
if (accessors != null) {
if (accessors[0] == null) {
// write only property
throw new MissingPropertyException(property + " is declared as write only");
} else {
return accessors[0].call();
}
} else {
return super.getProperty(property);
}
}
代码示例来源:origin: org.kohsuke.droovy/groovy
private Object doGetProperty(String property) {
Closure[] accessors = resolveExplicitProperty(property);
if (accessors != null) {
if (accessors[0] == null) {
// write only property
throw new MissingPropertyException(property + " is declared as write only");
} else {
return accessors[0].call();
}
} else {
return super.getProperty(property);
}
}
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
private Object doGetProperty(String property) {
Closure[] accessors = resolveExplicitProperty(property);
if (accessors != null) {
if (accessors[0] == null) {
// write only property
throw new MissingPropertyException(property + " is declared as write only");
} else {
return accessors[0].call();
}
} else {
return super.getProperty(property);
}
}
代码示例来源:origin: jenkinsci/acceptance-test-harness
@Override
public void setBinding(Binding binding) {
super.setBinding(binding);
setDelegate(binding.getProperty("delegate"));
}
内容来源于网络,如有侵权,请联系作者删除!