1 | public static class InternalSettingDelegateSingleDataDynamic extends InternalSettingDelegateSingleData↵ | | 1 | public static class InternalSettingDelegateSingleDataUnsettableDynamic extends InternalSettingDelegateSingleDataUnsettable↵
|
2 | {↵ | | 2 | {↵
|
3 | protected EDataType eDataType;↵ | | 3 | protected EDataType eDataType;↵
|
|
4 | public InternalSettingDelegateSingleDataDynamic(EDataType eDataType, Object defaultValue, Object intrinsicDefaultValue, EStructuralFeature feature)↵ | | 4 | public InternalSettingDelegateSingleDataUnsettableDynamic(EDataType eDataType, Object defaultValue, Object intrinsicDefaultValue, EStructuralFeature feature)↵
|
5 | {↵ | | 5 | {↵
|
6 | super(defaultValue, intrinsicDefaultValue, feature);↵ | | 6 | super(defaultValue, intrinsicDefaultValue, feature);↵
|
7 | this.eDataType = eDataType;↵ | | 7 | this.eDataType = eDataType;↵
|
8 | }↵ | | 8 | }↵
|
|
9 | @Override↵ | | 9 | @Override↵
|
10 | protected void validate(Object object)↵ | | 10 | protected void validate(Object object)↵
|
11 | {↵ | | 11 | {↵
|
12 | if (!eDataType.isInstance(object))↵ | | 12 | if (!eDataType.isInstance(object))↵
|
13 | {↵ | | 13 | {↵
|
14 | throw new ClassCastException("The value of type '" + object.getClass() + "' must be of type '" + eDataType + "'");↵ | | 14 | throw new ClassCastException("The value of type '" + object.getClass() + "' must be of type '" + eDataType + "'");↵
|
15 | }↵ | | 15 | }↵
|
16 | }↵ | | 16 | }↵
|
17 | }↵ | | 17 | }↵
|
|
18 | public static class InternalSettingDelegateSingleDataStatic extends InternalSettingDelegateSingleData↵ | | 18 | public static class InternalSettingDelegateSingleDataUnsettableStatic extends InternalSettingDelegateSingleDataUnsettable↵
|
19 | {↵ | | 19 | {↵
|
20 | protected Class<?> dataClass;↵ | | 20 | protected Class<?> dataClass;↵
|
|
21 | public InternalSettingDelegateSingleDataStatic(Class<?> dataClass, Object defaultValue, Object intrinsicDefaultValue, EStructuralFeature feature)↵ | | 21 | public InternalSettingDelegateSingleDataUnsettableStatic(Class<?> dataClass, Object defaultValue, Object intrinsicDefaultValue, EStructuralFeature feature)↵
|
22 | {↵ | | 22 | {↵
|
23 | super(defaultValue, intrinsicDefaultValue, feature);↵ | | 23 | super(defaultValue, intrinsicDefaultValue, feature);↵
|
24 | this.dataClass = dataClass;↵ | | 24 | this.dataClass = dataClass;↵
|
25 | }↵ | | 25 | }↵
|
|
26 | @Override↵ | | 26 | @Override↵
|
27 | protected void validate(Object object)↵ | | 27 | protected void validate(Object object)↵
|
28 | {↵ | | 28 | {↵
|
29 | if (!dataClass.isInstance(object))↵ | | 29 | if (!dataClass.isInstance(object))↵
|
30 | {↵ | | 30 | {↵
|
31 | throw new ClassCastException("The value of type '" + object.getClass() + "' must be of type '" + dataClass + "'"); | | 31 | throw new ClassCastException("The value of type '" + object.getClass() + "' must be of type '" + dataClass + "'");
|