org.eclipse.ocl.options
Class EnumeratedOption<T extends java.lang.Enum<T>>

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

public class EnumeratedOption<T extends java.lang.Enum<T>>
extends BasicOption<T>
implements PreferenceableOption<T>

Implementation of the PreferenceableOption interface for enum OCL options.

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<T> enumType
           
 
Constructor Summary
EnumeratedOption(java.lang.String pluginId, java.lang.String key, T defaultValue, java.lang.Class<T> enumType)
           
 
Method Summary
 java.lang.Class<T> getEnumType()
           
 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

enumType

protected final java.lang.Class<T extends java.lang.Enum<T>> enumType
Constructor Detail

EnumeratedOption

public EnumeratedOption(java.lang.String pluginId,
                        java.lang.String key,
                        T defaultValue,
                        java.lang.Class<T> enumType)
Method Detail

getEnumType

public final java.lang.Class<T> getEnumType()

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 extends java.lang.Enum<T>>