Package com.caucho.quercus.function

Examples of com.caucho.quercus.function.AbstractFunction


  /**
   * Returns the function with the given name.
   */
  public AbstractFunction findFunctionImpl(String name)
  {
    AbstractFunction fun = _funMap.get(name);

    return fun;
  }
View Full Code Here


  /**
   * Returns the function with the given name.
   */
  public AbstractFunction findLowerFunctionImpl(String lowerName)
  {
    AbstractFunction fun = _lowerFunMap.get(lowerName);

    return fun;
  }
View Full Code Here

    _iniDefinitions.addAll(info.getIniDefinitions());

    for (Map.Entry<String, AbstractFunction> entry
           : info.getFunctions().entrySet()) {
      String funName = entry.getKey();
      AbstractFunction fun = entry.getValue();

      _funMap.put(funName, fun);
      _lowerFunMap.put(funName.toLowerCase(), fun);

      setFunction(funName, fun);
View Full Code Here

    return def.getComment();
  }
 
  public ReflectionMethod getConstructor()
  {
    AbstractFunction cons = _cls.getConstructor();
   
    if (cons != null)
      return new ReflectionMethod(_name, cons);
    else
      return null;
View Full Code Here

    return map.containsKey(name);
  }
 
  public ReflectionMethod getMethod(Env env, StringValue name)
  {
    AbstractFunction fun = _cls.findFunction(name);
   
    if (fun == null)
      throw new QuercusLanguageException(
        env.createException("ReflectionException",
                            L.l("method {0}::{1}() does not exist", _name, name)));
View Full Code Here

  /**
   * Finds a function.
   */
  public AbstractFunction findFunction(String name)
  {
    AbstractFunction fun = _funMap.get(name);

    if (fun != null)
      return fun;

    fun = _funMapLowerCase.get(name.toLowerCase());
View Full Code Here

   * Imports the page definitions.
   */
  public void importDefinitions(Env env)
  {
    for (Map.Entry<String,AbstractFunction> entry : _funMap.entrySet()) {
      AbstractFunction fun = entry.getValue();

      if (fun.isGlobal())
        env.addFunction(entry.getKey(), entry.getValue());
    }
   
    for (Map.Entry<String,ClassDef> entry : _classMap.entrySet()) {
      env.addClassDef(entry.getKey(), entry.getValue());
View Full Code Here

  /**
   * Adds a function.
   */
  protected void addFunction(String name, AbstractFunction fun)
  {
    AbstractFunction oldFun = _funMap.put(name, fun);
   
    _funMapLowerCase.put(name.toLowerCase(), fun);
  }
View Full Code Here

  @Override
  public ArrayValue getParameters(Env env)
  {
    ArrayValue array = new ArrayValueImpl();
   
    AbstractFunction fun = getFunction();
    Arg []args = fun.getArgs();
   
    for (int i = 0; i < args.length; i++) {
      array.put(env.wrapJava(new ReflectionParameter(_clsName, fun, args[i])));
    }
   
View Full Code Here

 
  public static ReflectionParameter __construct(Env env,
                                                String funName,
                                                StringValue paramName)
  {
    AbstractFunction fun = env.findFunction(funName);
   
    Arg []args = fun.getArgs();
   
    for (int i = 0; i < args.length; i++) {
      if (args[i].getName().equals(paramName))
        return new ReflectionParameter(fun, args[i]);
    }
View Full Code Here

TOP

Related Classes of com.caucho.quercus.function.AbstractFunction

Copyright © 2018 www.massapicom. 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.