Package anvil.script.statements

Source Code of anvil.script.statements.InterfaceMethodStatement

/*
* $Id: InterfaceMethodStatement.java,v 1.4 2002/09/16 08:05:06 jkl Exp $
*
* Copyright (c) 2002 Njet Communications Ltd. All Rights Reserved.
*
* Use is subject to license terms, as defined in
* Anvil Sofware License, Version 1.1. See LICENSE
* file, or http://njet.org/license-1.1.txt
*/
package anvil.script.statements;

import anvil.Location;
import anvil.codec.ClassRoom;
import anvil.codec.ClassRoom;
import anvil.codec.Method;
import anvil.codec.Field;
import anvil.script.compiler.ByteCompiler;
import anvil.script.Type;
import anvil.script.ParameterListDeclaration;
import java.io.IOException;

/**
* class InterfaceMethodStatement
*
* @author: Jani Lehtim�ki
*/
public class InterfaceMethodStatement extends FunctionStatement
{


  public InterfaceMethodStatement(
      Location location,
      InterfaceStatement intrface,
      String name,
      String document,
      ParameterListDeclaration parameters)
  {
    super(location, intrface, null, false, name, document, parameters);
  }



  public int getType()
  {
    return INTERFACE_METHOD;
  }


  public InterfaceStatement getInterfaceType()
  {
    return (InterfaceStatement)_parent;
  }


  public void compile(ByteCompiler context)
  {
    ClassRoom clazz = context.getClassRoom();
    clazz.createField("m_"+_name, "Lanvil/script/Function;", ACC_PUBLIC|ACC_STATIC);
    clazz.createField("M_"+_name, "Lanvil/core/Any;", ACC_PUBLIC|ACC_STATIC);
    clazz.createMethod("m_"+_name, getSignature(), ACC_PUBLIC|ACC_ABSTRACT);
  }


}
TOP

Related Classes of anvil.script.statements.InterfaceMethodStatement

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.