Examples of Closure


Examples of org.springframework.core.closure.Closure

    // This is a hack to get the combo box working even though
    // PetType does not implement equals/hashCode.
    private class PetTypeAdapter extends TypeConverter {
        private PetTypeAdapter(ValueModel valueModel, final Map petTypes) {
            super(valueModel, new Closure() {
                public Object call(Object petType) {                   
                    return petType != null ? ((PetType)petType).getName() : "";
                }
            }, new Closure() {
                public Object call(Object petTypeName) {
                    return petTypes.get(petTypeName);
                }
            });           
        }
View Full Code Here

Examples of org.springframework.rules.closure.Closure

            formBuilder.row();

      this.addFormValueChangeListener("country", new ChangeCountryListener());

      refreshableTownValueHolder = new RefreshableValueHolder(new Closure() {
        public Object call(Object object) {
          Country country = (Country) getValue("country");
          List<Town> towns = getTowns(country);
          if (towns == null) {
                        towns = Collections.EMPTY_LIST;
View Full Code Here

Examples of org.yinwang.yin.value.Closure


    public Value interp(Scope s) {
        // evaluate and cache the properties in the closure
        Scope properties = propertyForm == null ? null : Declare.evalProperties(propertyForm, s);
        return new Closure(this, properties, s);
    }
View Full Code Here

Examples of railo.transformer.bytecode.statement.udf.Closure

  protected  final Function closurePart(ExprData data, String id, int access, String rtnType, Position line,boolean closure) throws TemplateException {   
   
    Body body=new FunctionBody();
    Function func=closure?
        new Closure(data.page,id,access,rtnType,body,line,null)
        :new FunctionImpl(data.page,id,access,rtnType,body,line,null);
   
      comments(data);
      if(!data.cfml.forwardIfCurrent('('))
        throw new TemplateException(data.cfml,"invalid syntax in function head, missing begin [(]");
View Full Code Here

Examples of wyvern.tools.typedAST.core.evaluation.Closure

  public Value evaluate(Environment env) {
    Environment outerEnv = env.lookupBinding("oev", TSLBlock.OuterEnviromentBinding.class)
        .map(oeb->oeb.getStore())
        .orElse(Environment.getEmptyEnvironment());

    return new Closure(this, outerEnv);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.