Tabnine Logo
groovy.lang
Code IndexAdd Tabnine to your IDE (free)

How to use groovy.lang

Best Java code snippets using groovy.lang (Showing top 20 results out of 1,755)

origin: spring-projects/spring-framework

public Object invokeMethod(String name, Object args) {
  return this.metaClass.invokeMethod(this, name, args);
}
origin: jenkinsci/jenkins

@Override
public Object getProperty(String property) {
  try {
    return delegate.getProperty(property);
  } catch (MissingPropertyException e) {
    return super.getProperty(property);
  }
}
origin: spring-projects/spring-framework

public void setProperty(String property, Object newValue) {
  this.metaClass.setProperty(this, property, newValue);
}
origin: spring-projects/spring-framework

/**
 * When a method argument is only a closure it is a set of bean definitions.
 * @param callable the closure argument
 * @return this {@code GroovyBeanDefinitionReader} instance
 */
protected GroovyBeanDefinitionReader invokeBeanDefiningClosure(Closure callable) {
  callable.setDelegate(this);
  callable.call();
  finalizeDeferredProperties();
  return this;
}
origin: Netflix/zuul

/**
 * compiles the Groovy source code
 *
 * @param sFilterCode
 * @return
 * @throws org.codehaus.groovy.control.CompilationFailedException
 *
 */
public Class compileGroovy(String sFilterCode) throws org.codehaus.groovy.control.CompilationFailedException {
  GroovyClassLoader loader = new GroovyClassLoader();
  return loader.parseClass(sFilterCode);
}
origin: Netflix/zuul

/**
 * @return a new GroovyClassLoader
 */
GroovyClassLoader getGroovyClassLoader() {
  return new GroovyClassLoader();
}
origin: jenkinsci/jenkins

/**
 * Can be used to customize the environment in which the script runs.
 */
protected GroovyShell createShell() {
  return new GroovyShell(loader, bindings);
}
origin: spring-projects/spring-framework

  @Override
  public void setVariable(String name, Object value) {
    if (currentBeanDefinition != null) {
      applyPropertyToBeanDefinition(name, value);
    }
    else {
      super.setVariable(name, value);
    }
  }
};
origin: jenkinsci/jenkins

protected void execute(GroovyCodeSource s) {
  try {
    createShell().evaluate(s);
  } catch (RuntimeException x) {
    LOGGER.log(WARNING, "Failed to run script " + s.getName(), x);
  }
}
origin: jenkinsci/jenkins

@Override
public Object invokeMethod(String name, Object args) {
  try {
    return delegate.invokeMethod(name,args);
  } catch (MissingMethodException mme) {
    return super.invokeMethod(name, args);
  }
}
origin: jenkinsci/jenkins

  @Override
  public void setProperty(String property, Object newValue) {
    try {
      delegate.setProperty(property,newValue);
    } catch (MissingPropertyException e) {
      super.setProperty(property,newValue);
    }
  }
}
origin: jenkinsci/jenkins

/**
 * Sets the binding (the variables available in the scope of the BeanBuilder)
 * @param b The Binding instance
 */
public void setBinding(Binding b) {
  this.binding = b.getVariables();
}
origin: jenkinsci/jenkins

public GroovyHookScript bind(String name, Object o) {
  bindings.setProperty(name,o);
  return this;
}
origin: spring-projects/spring-framework

  @Override
  public void customize(GroovyObject goo) {
    DelegatingMetaClass dmc = new DelegatingMetaClass(goo.getMetaClass()) {
      @Override
      public Object invokeMethod(Object arg0, String mName, Object[] arg2) {
        if (mName.contains("Missing")) {
          throw new IllegalStateException("Gotcha");
        }
        else {
          return super.invokeMethod(arg0, mName, arg2);
        }
      }
    };
    dmc.initialize();
    goo.setMetaClass(dmc);
  }
}
origin: spring-projects/spring-framework

public Object invokeMethod(String name, Object args) {
  return this.metaClass.invokeMethod(this, name, args);
}
origin: spring-projects/spring-framework

public void setProperty(String property, Object newValue) {
  if (newValue instanceof BeanDefinition) {
    registerBeanDefinition(property, (BeanDefinition) newValue);
  }
  else {
    this.metaClass.setProperty(this, property, newValue);
  }
}
origin: spring-projects/spring-framework

/**
 * Build a {@link GroovyClassLoader} for the given {@code ClassLoader}.
 * @param classLoader the ClassLoader to build a GroovyClassLoader for
 * @since 4.3.3
 */
protected GroovyClassLoader buildGroovyClassLoader(@Nullable ClassLoader classLoader) {
  return (this.compilerConfiguration != null ?
      new GroovyClassLoader(classLoader, this.compilerConfiguration) : new GroovyClassLoader(classLoader));
}
origin: spring-projects/spring-framework

public Object invokeMethod(String name, Object args) {
  return this.metaClass.invokeMethod(this, name, args);
}
origin: Netflix/zuul

/**
 * @return a new GroovyClassLoader
 */
GroovyClassLoader getGroovyClassLoader() {
  return new GroovyClassLoader();
}
origin: jenkinsci/jenkins

public Object invokeMethod(String name, Object args) {
  return this.metaClass.invokeMethod(this, name, args);
}
groovy.lang

Most used classes

  • Binding
    Represents the variable bindings of a script which can be altered from outside the script object or
  • GroovyClassLoader
    A ClassLoader which can load Groovy classes. The loaded classes are cached, classes from other class
  • Closure
    Represents any closure object in Groovy. Groovy allows instances of Closures to be called in a short
  • GroovyShell
    Represents a groovy shell capable of running arbitrary groovy scripts
  • Script
    This object represents a Groovy script
  • GroovyCodeSource,
  • GroovySystem,
  • Writable,
  • GroovyObject,
  • MissingMethodException,
  • MissingPropertyException,
  • GroovyRuntimeException,
  • MetaClassRegistry,
  • MetaMethod,
  • GString,
  • GroovyObjectSupport,
  • DelegatesTo,
  • MetaProperty,
  • Tuple
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now