org.eclipse.ocl.options
Class ObjectOption<T>

java.lang.Object
  extended by org.eclipse.ocl.options.BasicOption<T>
      extended by org.eclipse.ocl.options.ObjectOption<T>
All Implemented Interfaces:
PreferenceableOption<T>, Option<T>

public class ObjectOption<T>
extends BasicOption<T>
implements PreferenceableOption<T>

Implementation of the PreferenceableOption interface for object OCL options. When persisted as a preference, the representation is a Java-class name followed by a dot and then the static object name. e.g. "org.eclipse.emf.ecore.EPackage$Literals.EOBJECT" or "null".

Since:
3.2

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.common.preferences.PreferenceableOption
PreferenceableOption.Listener, PreferenceableOption.PreferenceableOption2<T>
 
Field Summary
protected  java.lang.Class<?> classType
           
 
Constructor Summary
ObjectOption(java.lang.String pluginId, java.lang.String key, T defaultValue, java.lang.Class<? extends T> classType)
           
 
Method Summary
 T getValueOf(java.lang.String string)
          Returns an option value from a String typically obtained from an Eclipse Preference file.
 
Methods inherited from class org.eclipse.ocl.options.BasicOption
getDefaultValue, getKey, getPluginId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.common.preferences.PreferenceableOption
getDefaultValue, getKey, getPluginId
 

Field Detail

classType

protected final java.lang.Class<?> classType
Constructor Detail

ObjectOption

public ObjectOption(java.lang.String pluginId,
                    java.lang.String key,
                    T defaultValue,
                    java.lang.Class<? extends T> classType)
Method Detail

getValueOf

public T getValueOf(java.lang.String string)
Description copied from interface: PreferenceableOption
Returns an option value from a String typically obtained from an Eclipse Preference file.

Specified by:
getValueOf in interface PreferenceableOption<T>