Package anvil.script

Examples of anvil.script.Function


  {
    switch(_typecode) {
    case Type.CLASS:
      {
        ClassType type = (ClassType)_type;
        Function ctor = type.getConstructor();
        if (ctor != null) {
          return ctor.execute(context, parameters);
        }
        throw context.InstantiationError("No constructor for "+type);
      }
     
View Full Code Here


  /// Returns the constructor of class.
  /// @synopsis Function getConstructor()
  public Any m_getConstructor()
  {
    if (_typecode == Type.CLASS) {
      Function ctor = ((ClassType)_type).getConstructor();
      if (ctor != null) {
        return new AnyFunction(ctor);
      }
    }
    return UNDEFINED;
View Full Code Here

  /// @synopsis object newInstance(parameters...)
  public static final Object[] p_newInstance = { null, "parameters" };
  public Any m_newInstance(Context context, Any[] parameters)
  {
    if (_typecode == Type.CLASS) {
      Function ctor = ((ClassType)_type).getConstructor();
      if (ctor != null) {
        return ctor.execute(context, parameters);
      }
    }
    return UNDEFINED;
  }
View Full Code Here

    }
    switch(type.getType()) {
    case Type.FUNCTION:
    case Type.METHOD:
      {
        Function func = (Function)type;
        function._self = self;
        function._function = func;
        function._escape = StackFrame.unserialize(unserializer, Grammar.getModuleOf(func), self, func);
        return function;
      }
View Full Code Here

TOP

Related Classes of anvil.script.Function

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.