EGF Engine
Release 0.1.0

org.eclipse.egf.common.ui.internal.validators
Class JavaClassValidator

java.lang.Object
  extended by org.eclipse.egf.common.ui.toolkit.validators.AbstractValidator
      extended by org.eclipse.egf.common.ui.toolkit.validators.NotEmptyStringValidator
          extended by org.eclipse.egf.common.ui.internal.validators.JavaClassValidator
All Implemented Interfaces:
org.eclipse.egf.common.ui.toolkit.validators.IValidator

public class JavaClassValidator
extends org.eclipse.egf.common.ui.toolkit.validators.NotEmptyStringValidator

Implements a validator that checks if given fully qualified name is able to instantiated.


Constructor Summary
JavaClassValidator(ClassLoader classLoader_p, Bundle bundle_p, Class<?> expectedClassType_p)
          Constructor.
 
Method Summary
 String isValid(Object value_p)
          Returns a string indicating whether the given value is valid; null means valid, and non-null means invalid, with the result being the error message to display to the end-user.
 void setExpectedClassType(Class<?> expectedClassType_p)
          Set the expected class type to given one.
 
Methods inherited from class org.eclipse.egf.common.ui.toolkit.validators.AbstractValidator
getErrorMessage, setErrorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaClassValidator

public JavaClassValidator(ClassLoader classLoader_p,
                          Bundle bundle_p,
                          Class<?> expectedClassType_p)
Constructor.

Parameters:
errorMessage_p -
classLoader_p -
bundle_p -
expectedClassType_p -
Method Detail

isValid

public String isValid(Object value_p)
Description copied from interface: org.eclipse.egf.common.ui.toolkit.validators.IValidator
Returns a string indicating whether the given value is valid; null means valid, and non-null means invalid, with the result being the error message to display to the end-user.

It is the responsibility of the implementor to fully format the message before returning it.

Specified by:
isValid in interface org.eclipse.egf.common.ui.toolkit.validators.IValidator
Overrides:
isValid in class org.eclipse.egf.common.ui.toolkit.validators.NotEmptyStringValidator
Parameters:
value_p - the value to be validated
Returns:
the error message, or null indicating that the value is valid.
See Also:
IValidator.isValid(java.lang.Object)

setExpectedClassType

public void setExpectedClassType(Class<?> expectedClassType_p)
Set the expected class type to given one.

Parameters:
expectedClassType_p - the expectedClassType to set

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.