Gui4jCall.java :  » XML-UI » gui4j » org » gui4j » core » Java Open Source

Java Open Source » XML UI » gui4j 
gui4j » org » gui4j » core » Gui4jCall.java
package org.gui4j.core;

import java.util.Set;

import org.gui4j.Gui4jCallBase;
import org.gui4j.Gui4jGetValue;



/**
 * Represents the interface for all reflection call. Method calls, field accesses,
 * integer constants, and also string constants are instances of this
 * interface. Parsing of reflection calls is done by

 */
public interface Gui4jCall extends Gui4jGetValue
{
    /**
     * Method getDependantProperties. Returns the list of
     * dependant events.
     * @return Gui4jCall[]
     */
    Gui4jCall[] getDependantProperties();

    /**
     * Method hasTriggerEvents. Returns <code>true</code> if the
     * list of dependant events is non-empty.
     * @return boolean
     */
    boolean hasTriggerEvents();

    /**
     * Method getResultClass. 
     * @return Class the return-type of the reflection call
     */
    Class getResultClass();

    /**
     * Method getValueClass.
     * @return Class the type of the default parameter (name "")
     */
    Class getValueClass();

    /**
     * Method getValueClass.
     * @param paramName
     * @return the type of the given parameter
     */
    Class getValueClass(String paramName);

    /**
     * Returns actually used parameter names.
     * @return a set containing the names of all actually used parameters in this call. The
     * returned set is empty (not <code>null</code>) if no parameters were used. 
     */
    Set getUsedParams();
    
    /**
     * Method getValueNoParams. Evaluates the reflection call and uses
     * no parameter instantiation.
     * @param baseInstance
     * @param defaultValue the value if the call fails
     * @return Object
     */
    Object getValueNoParams(Gui4jCallBase baseInstance, Object defaultValue);

    /**
     * Method getValueUseDefaultParam. Evaluates the reflection call with given
     * value for the default parameter (name "").
     * @param baseInstance
     * @param defaultParamValue
     * @param defaultValue the value if the call fails
     * @return Object
     */
    Object getValueUseDefaultParam(Gui4jCallBase baseInstance, Object defaultParamValue, Object defaultValue);

    /**
     * Method getConfigurationSource.
     * @return String. The name of the XML-file where the reflection call was defined. This
     * is usually used only for error reporting.
     */
    String getConfigurationName();

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.