/* Copyright 2007 Wolfgang S. Kechel

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */

package org.hecl;

/**
 * The ClassCommand interface is the template for all commands
 * implemented in Java working on Hecl ObjectThing.
 * 
 * @author Wolfgang S. Kechel 
 * @version 1.0
 */

public interface ClassCommand {

    /**
     * The method method takes an interpreter, a class
     * information and an array of Things, performs some calculations, and
     * returns a Thing which may be null. The
     * interpreter calls this method when it detects an
     * ObjectThing as first argument of a command on the script
     * level and detects a command handler for the class of the value of the
     * ObjectThing.
     * 
     * @param interp
     *            an Interp value
     * @param context A reference to the ClassInfo> describing
     * further details of th emethod.
     * @param argv A Thing[] array holding the parameters for the
     * method. The 0th element is the object, the 1st element is the method.
     *
     * @exception HeclException
     *                if an error occurs
     */
    public Thing method(Interp interp, ClassCommandInfo context, Thing[] argv)
	throws HeclException;
}

 

Ads help maintain this website.