Examples of FunctionImpl


Examples of org.geotools.filter.FunctionImpl

                        public Function function(String name, List<Expression> args, Literal fallback) {
                            return function(new NameImpl(name), args, fallback);
                        }
                        public Function function(Name name, List<Expression> args, Literal fallback) {
                            if ("foo".equals(name.getLocalPart())) {
                                return new FunctionImpl() {
                                    @Override
                                    public Object evaluate(Object object, Class context) {
                                        return "theResult";
                                    }
                                };
View Full Code Here

Examples of org.geotools.filter.FunctionImpl

                    function.setFallbackValue( fallback );
                }
                return function;
            }
            if(FunctionImpl.class.isAssignableFrom(clazz)) {
                FunctionImpl function = (FunctionImpl) clazz.newInstance();
                if(parameters != null){
                    function.setParameters( parameters );
                }
                if(fallback != null){
                    function.setFallbackValue( fallback );
                }
                return function;
            }
            //Function function = (Function) functionClass.newInstance();
            Constructor<Function> constructor = clazz.getConstructor( new Class[]{ List.class, Literal.class} );
View Full Code Here

Examples of org.geotools.filter.FunctionImpl

                    right.accept(this, rightContext);
                }
            }
            else {
                // wrap both sides in "lower"
                FunctionImpl f = new FunctionImpl() {
                    {
                        functionName = new FunctionNameImpl("lower",
                                parameter("lowercase", String.class),
                                parameter("string", String.class));
                    }
                };
                f.setName("lower");
               
                f.setParameters(Arrays.asList(left));
                f.accept(this, Arrays.asList(leftContext));
               
                out.write(" " + type + " ");
               
                f.setParameters(Arrays.asList(right));
                f.accept(this, Arrays.asList(rightContext));
            }
           
        } catch (java.io.IOException ioe) {
            throw new RuntimeException(IO_ERROR, ioe);
        }
View Full Code Here

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

  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 railo.transformer.bytecode.statement.udf.FunctionImpl

    String strAccess = ((LitString)access).getString();
    int acc = ComponentUtil.toIntAccess(strAccess,-1);
    if(acc==-1)
      throw new BytecodeException("invalid access type ["+strAccess+"], access types are remote, public, package, private",getStart());
       
    Function func = new FunctionImpl(page,name, returnType,returnFormat, output, bufferOutput, acc, displayname,description,
        hint,secureJson,verifyClient,localMode,cachedWithin,_abstract,_final, body, getStart(),getEnd());
    
   
   
   
//     %**%
    Map attrs = getAttributes();
    Iterator it = attrs.entrySet().iterator();
    HashMap<String,Attribute> metadatas=new HashMap<String,Attribute>();
    while(it.hasNext()){
      attr=(Attribute) ((Map.Entry)it.next()).getValue();
      metadatas.put(attr.getName(),attr);
    }
    func.setMetaData(metadatas);
    return func;
  }
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.