Package org.eclipse.core.expressions
Interface IPropertyTester
-
- All Known Implementing Classes:
PropertyTester
public interface IPropertyTesterA 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
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhandles(String namespace, String property)Returns whether the property tester can handle the given property or not.IPropertyTesterinstantiate()Loads the implementation class for this property tester and returns an instance of this class.booleanisDeclaringPluginActive()Returnstrueif the implementation class of this property tester can be loaded.booleanisInstantiated()Returns whether the implementation class for this property tester is loaded or not.booleantest(Object receiver, String property, Object[] args, Object expectedValue)Executes the property test determined by the parameterproperty.
-
-
-
Method Detail
-
handles
boolean handles(String namespace, String property)
Returns whether the property tester can handle the given property or not.- Parameters:
namespace- the name space to be consideredproperty- the property to test- Returns:
trueif the tester provides an implementation for the given property; otherwisefalseis returned
-
isInstantiated
boolean isInstantiated()
Returns whether the implementation class for this property tester is loaded or not.- Returns:
trueif the implementation class is loaded;falseotherwise
-
isDeclaringPluginActive
boolean isDeclaringPluginActive()
Returnstrueif the implementation class of this property tester can be loaded. This is the case if the plug-in providing the implementation class is active. Returnsfalseotherwise.- Returns:
- whether the implementation class can be loaded or not
-
instantiate
IPropertyTester instantiate() throws CoreException
Loads the implementation class for this property tester and returns an instance of this class.- Returns:
- an instance of the implementation class for this property tester
- Throws:
CoreException- if the implementation class cannot be loaded
-
test
boolean test(Object receiver, String property, Object[] args, Object expectedValue)
Executes the property test determined by the parameterproperty.- Parameters:
receiver- the receiver of the property testproperty- the property to testargs- additional arguments to evaluate the property. If no arguments are specified in thetestexpression an array of length 0 is passedexpectedValue- the expected value of the property. The value is either of typejava.lang.Stringor a boxed base type. If no value was specified in thetestexpressions thennullis passed- Returns:
- returns
trueif the property is equal to the expected value; otherwisefalseis returned
-
-