Codota Logo
Script.setProperty
Code IndexAdd Codota to your IDE (free)

How to use
setProperty
method
in
groovy.lang.Script

Best Java code snippets using groovy.lang.Script.setProperty (Showing top 20 results out of 315)

  • Common ways to obtain Script
private void myMethod () {
Script s =
  • Codota IconGroovyShell shell;String scriptText;shell.parse(scriptText)
  • Codota IconClass scriptClass;(Script) scriptClass.newInstance()
  • Codota IconClass scriptClass;Binding context;InvokerHelper.createScript(scriptClass, context)
  • Smart code suggestions by Codota
}
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");
}
groovy.langScriptsetProperty

Popular methods of Script

  • run
    A helper method to allow scripts to be run taking command line arguments
  • setBinding
  • getProperty
  • getBinding
  • invokeMethod
    Invoke a method (or closure in the binding) defined.
  • getMetaClass
  • setMetaClass
  • evaluate
    A helper method to allow the dynamic evaluation of groovy expressions using this scripts binding as

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now