本文整理了Java中groovy.lang.Script.setProperty()
方法的一些代码示例,展示了Script.setProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Script.setProperty()
方法的具体详情如下:
包路径:groovy.lang.Script
类名称:Script
方法名:setProperty
暂无
代码示例来源:origin: org.codehaus.groovy/groovy
@Override
public void setProperty(String property, Object newValue) {
try {
metaClass.setProperty(delegate,property,newValue);
} catch (MissingPropertyException e) {
super.setProperty(property,newValue);
}
}
代码示例来源:origin: jenkinsci/jenkins
@Override
public void setProperty(String property, Object newValue) {
try {
delegate.setProperty(property,newValue);
} catch (MissingPropertyException e) {
super.setProperty(property,newValue);
}
}
}
代码示例来源:origin: spockframework/spock
@Override
public void setProperty(String property, Object newValue) {
try {
GroovyRuntimeUtil.setProperty($delegate, property, newValue);
} catch (MissingPropertyException e) {
super.setProperty(property, newValue);
}
}
代码示例来源:origin: org.codehaus.groovy/groovy
@Override
public void setProperty(final String property, final Object newValue) {
try {
InvokerHelper.setProperty(extension, property, newValue);
} catch (Exception e) {
super.setProperty(property, newValue);
}
}
代码示例来源:origin: groovy/groovy-core
public Writer writeTo(Writer out) {
Script scriptObject = InvokerHelper.createScript(script.getClass(), binding);
PrintWriter pw = new PrintWriter(out);
scriptObject.setProperty("out", pw);
scriptObject.run();
pw.flush();
return out;
}
代码示例来源:origin: org.codehaus.groovy/groovy
public void run() {
try {
String line = null;
script.setProperty("out", writer);
script.setProperty("socket", socket);
script.setProperty("init", Boolean.TRUE);
while ((line = reader.readLine()) != null) {
script.setProperty("line", line);
Object o = script.run();
script.setProperty("init", Boolean.FALSE);
if (o != null) {
if ("success".equals(o)) {
代码示例来源:origin: groovy/groovy-core
/**
* Write the template document with the set binding applied to the writer.
*
* @see groovy.lang.Writable#writeTo(java.io.Writer)
*/
public Writer writeTo(Writer writer) {
Binding binding;
if (map == null)
binding = new Binding();
else
binding = new Binding(map);
Script scriptObject = InvokerHelper.createScript(script.getClass(), binding);
PrintWriter pw = new PrintWriter(writer);
scriptObject.setProperty("out", pw);
scriptObject.run();
pw.flush();
return writer;
}
代码示例来源:origin: org.codehaus.groovy/groovy
String line;
String lineCountName = "count";
s.setProperty(lineCountName, BigInteger.ZERO);
String autoSplitName = "split";
s.setProperty("out", pw);
s.setProperty("line", line);
s.setProperty(lineCountName, ((BigInteger)s.getProperty(lineCountName)).add(BigInteger.ONE));
s.setProperty(autoSplitName, line.split(splitPattern));
代码示例来源:origin: jenkinsci/acceptance-test-harness
@Override
public void setProperty(String property, Object newValue) {
try {
delegateMetaClass.setProperty(delegate,property,newValue);
} catch (MissingPropertyException e) {
super.setProperty(property, newValue);
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
public void setProperty(String property, Object newValue) {
try {
delegate.setProperty(property,newValue);
} catch (MissingPropertyException e) {
super.setProperty(property,newValue);
}
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
@Override
public void setProperty(String property, Object newValue) {
try {
delegate.setProperty(property,newValue);
} catch (MissingPropertyException e) {
super.setProperty(property,newValue);
}
}
}
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
public Writer writeTo(Writer out) {
Script scriptObject = InvokerHelper.createScript(script.getClass(), binding);
PrintWriter pw = new PrintWriter(out);
scriptObject.setProperty("out", pw);
scriptObject.run();
pw.flush();
return out;
}
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
public Writer writeTo(Writer out) {
Script scriptObject = InvokerHelper.createScript(script.getClass(), binding);
PrintWriter pw = new PrintWriter(out);
scriptObject.setProperty("out", pw);
scriptObject.run();
pw.flush();
return out;
}
代码示例来源:origin: org.kohsuke.droovy/groovy
public Writer writeTo(Writer out) {
Script scriptObject = InvokerHelper.createScript(script.getClass(), binding);
PrintWriter pw = new PrintWriter(out);
scriptObject.setProperty("out", pw);
scriptObject.run();
pw.flush();
return out;
}
代码示例来源:origin: org.codehaus.groovy/groovy-templates
public Writer writeTo(Writer out) {
Script scriptObject = InvokerHelper.createScript(script.getClass(), binding);
PrintWriter pw = new PrintWriter(out);
scriptObject.setProperty("out", pw);
scriptObject.run();
pw.flush();
return out;
}
代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-core
@Override
public Service call() throws ServiceException {
Script script = getScript(profile.getProfileName());
script.setProperty(PROFILE, profile.getEntry(getName()));
script.setProperty(SERVICE, this);
script.setProperty(NAME, getName());
script.setProperty(THREADS, getThreads());
injectScript(script);
script.run();
return this;
}
代码示例来源:origin: org.codehaus.groovyfx/groovyfx
@Override
public void set(T newValue) {
((Script)getBean()).setProperty(getName(), newValue);
super.set(newValue);
}
}
代码示例来源:origin: org.codehaus.groovyfx/groovyfx
@Override
public void set(boolean newValue) {
((Script)getBean()).setProperty(getName(), newValue);
super.set(newValue);
}
}
代码示例来源:origin: org.codehaus.groovyfx/groovyfx
@Override
public void set(int newValue) {
((Script)getBean()).setProperty(getName(), newValue);
super.set(newValue);
}
代码示例来源:origin: eu.mihosoft.vrl/vrl
@Override
public Double run(Double x, Double y, Double z) {
getScript().setProperty(getXVarName(), x);
getScript().setProperty(getYVarName(), y);
getScript().setProperty(getZVarName(), z);
getScript().run();
return (Double) getScript().getProperty("result");
}
内容来源于网络,如有侵权,请联系作者删除!