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

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

public class ClassOption<T>
extends BasicOption<java.lang.Class<? extends T>>
implements PreferenceableOption<java.lang.Class<? extends T>>

Implementation of the PreferenceableOption interface for class OCL options. When persisted as a preference, the representation is a Java-class name. e.g. "org.eclipse.uml2.uml.Association".

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<? extends T> classType
           
 
Constructor Summary
ClassOption(java.lang.String pluginId, java.lang.String key, java.lang.Class<? extends T> defaultValue, java.lang.Class<? extends T> classType)
           
 
Method Summary
 java.lang.Class<? extends 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<? extends T> classType
Constructor Detail

ClassOption

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

getValueOf

public java.lang.Class<? extends 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<java.lang.Class<? extends T>>