All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.core.expressions.IPropertyTester Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * Copyright (c) 2000, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.core.expressions;

import org.eclipse.core.runtime.CoreException;

/**
 * A property tester can be used to add additional properties to test to an
 * existing type.
 * 

* This interface is not intended to be implemented by clients. Clients * should subclass type PropertyTester. *

* * @since 3.0 * * @noimplement This interface is not intended to be implemented by clients. * @noextend This interface is not intended to be extended by clients. */ public interface IPropertyTester { /** * Returns whether the property tester can handle the given * property or not. * * @param namespace the name space to be considered * @param property the property to test * @return true if the tester provides an implementation * for the given property; otherwise false is returned */ public boolean handles(String namespace, String property); /** * Returns whether the implementation class for this property tester is * loaded or not. * * @return trueif the implementation class is loaded; * false otherwise */ public boolean isInstantiated(); /** * Returns true if the implementation class of this property * tester can be loaded. This is the case if the plug-in providing * the implementation class is active. Returns false otherwise. * * @return whether the implementation class can be loaded or not */ public boolean isDeclaringPluginActive(); /** * Loads the implementation class for this property tester and returns an * instance of this class. * * @return an instance of the implementation class for this property tester * * @throws CoreException if the implementation class cannot be loaded */ public IPropertyTester instantiate() throws CoreException; /** * Executes the property test determined by the parameter property. * * @param receiver the receiver of the property test * @param property the property to test * @param args additional arguments to evaluate the property. If no arguments are specified in * the test expression an array of length 0 is passed * @param expectedValue the expected value of the property. The value is either of type * java.lang.String or a boxed base type. If no value was specified in * the test expressions then null is passed * * @return returns true if the property is equal to the expected value; otherwise * false is returned */ public boolean test(Object receiver, String property, Object[] args, Object expectedValue); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy