@Test void testAsAttribute() { EStructuralFeature attribute = mock(EAttribute.class); EStructuralFeature reference = mock(EReference.class); assertThat(EFeatures.asAttribute(attribute)).isInstanceOf(EAttribute.class); assertThat(catchThrowable(() -> EFeatures.asAttribute(reference) )).isExactlyInstanceOf(ClassCastException.class); }
@Nonnull public static EAttribute asAttribute(EStructuralFeature feature) { return (EAttribute) feature; }
EFeatures { @Nonnull public static EAttribute asAttribute(EStructuralFeature feature) { return (EAttribute) feature; } }
EFeatures { @Nonnull public static EAttribute asAttribute(EStructuralFeature feature) { return (EAttribute) feature; } private  EFeatures(); }
EFeatures { @Nonnull public static EAttribute asAttribute(EStructuralFeature feature) { return (EAttribute) feature; } private  EFeatures(); static boolean isAttribute(EStructuralFeature feature); static boolean isReference(EStructuralFeature feature); @Nonnull static EAttribute asAttribute(EStructuralFeature feature); @Nonnull static EReference asReference(EStructuralFeature feature); }
EFeatures { @Nonnull public static EAttribute asAttribute(EStructuralFeature feature) { return (EAttribute) feature; } private  EFeatures(); static boolean isAttribute(EStructuralFeature feature); static boolean isReference(EStructuralFeature feature); @Nonnull static EAttribute asAttribute(EStructuralFeature feature); @Nonnull static EReference asReference(EStructuralFeature feature);  }