Package com.caucho.quercus.function

Examples of com.caucho.quercus.function.AbstractFunction.callMethod()


  public void cleanup(Env env)
  {
    AbstractFunction fun = getQuercusClass().getDestructor();
   
    if (fun != null)
      fun.callMethod(env, this);
  }

  private static String toMethod(char []key, int keyLength)
  {
    return new String(key, 0, keyLength);
View Full Code Here


  public Value callMethod(Env env, String methodName, Value []args)
  {
    AbstractFunction fun = _quercusClass.findFunction(methodName);

    if (fun != null)
      return fun.callMethod(env, this, args);
    else
      return env.error(L.l("Call to undefined method {0}::{1}()",
                           _quercusClass.getName(), methodName));
  }
View Full Code Here

  public StringValue toReprString(Env env)
  {
    AbstractFunction fun = _quercusClass.findFunction("__toString");

    if (fun != null)
      return fun.callMethod(env, this, new Expr[0]).toReprString(env);
    else
      return env.createUnicodeBuilder().append(_quercusClass.getName()).append("[]");
  }

  /**
 
View Full Code Here

      initObject(env, objectValue);
     
      AbstractFunction fun = findConstructor();

      if (fun != null)
        fun.callMethod(env, objectValue, args);
      else {
        //  if expr
      }

      return objectValue;
View Full Code Here

    QuercusClass oldClass = env.setCallingClass(this);
    try {
      AbstractFunction fun = _methodMap.get(hash, name, nameLength);
     
      if (fun != null)
        return fun.callMethod(env, thisValue, args);
      else if (getCall() != null) {
        Expr []newArgs = new Expr[args.length + 1];
        String mtd = toMethod(name, nameLength);
        if (env.isUnicodeSemantics())
          newArgs[0] = new UnicodeLiteralExpr(mtd);
View Full Code Here

   
    try {
      AbstractFunction fun = _methodMap.get(methodName.toString());
     
      if (fun != null)
        return fun.callMethod(env, thisValue, args);
      else if (getCall() != null) {
        Expr []newArgs = new Expr[args.length + 1];
        String mtd = methodName.toString();
        if (env.isUnicodeSemantics())
          newArgs[0] = new UnicodeLiteralExpr(mtd);
View Full Code Here

   
    try {
      AbstractFunction fun = _methodMap.get(hash, name, nameLen);

      if (fun != null)
        return fun.callMethod(env, thisValue, args);
      else if (getCall() != null) {
        return getCall().callMethod(env,
                    thisValue,
                    env.createString(name, nameLen),
                    new ArrayValueImpl(args));
View Full Code Here

   
    try {
      AbstractFunction fun = _methodMap.get(name.toString());

      if (fun != null)
        return fun.callMethod(env, thisValue, args);
      else if (getCall() != null) {
        return getCall().callMethod(env,
                    thisValue,
                    name,
                    new ArrayValueImpl(args));
View Full Code Here

   
    try {
      AbstractFunction fun = _methodMap.get(hash, name, nameLen);

      if (fun != null)
        return fun.callMethod(env, thisValue);
      else if (getCall() != null) {
        return getCall().callMethod(env,
                    thisValue,
                    env.createString(name, nameLen),
                    new ArrayValueImpl());
View Full Code Here

   
    try {
      AbstractFunction fun = _methodMap.get(hash, name, nameLen);

      if (fun != null)
        return fun.callMethod(env, thisValue, a1);
      else if (getCall() != null) {
        return getCall().callMethod(env,
                    thisValue,
                    env.createString(name, nameLen),
                    new ArrayValueImpl()
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.